When deleting files using “Move to Trash” option or delete keyboard key in Ubuntu via Nautilus, a ‘xxx’ deleted dialog will pop up with Undo button.
It is quite annoying as the notification bubble locates in the top center of file browser. It makes some files un-clickable before you closing the popup.
This is a design issue of the GNOME Desktop. Some one has reported this issue, but the developers seem not willing to even add an option to disable this feature.
If you don’t like this in-app notification like me, here’s a workaround by settings a negative number as margin value in theme’s CSS file.
NOTE: This tutorial targets for Ubuntu 20.04 and Ubuntu 22.04 with Default Yaru theme! For other Linux (e.g., Fedora Workstation) and/or other GTK themes, you need to edit the CSS file accordingly.
Step 1: Disable/Hide in-app notification for Yaru Light Theme:
Ubuntu’s Yaru theme seems to use different CSS files for rendering its light and dark app appearance.
1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to edit the CSS file for Yaru theme and its variables.
- For Ubuntu 22.04, use command:
sudo gedit /usr/share/themes/Yaru*/gtk-3.0/gtk.css
- And, Ubuntu 20.04 use this command instead:
sudo gedit /usr/share/themes/Yaru*/gtk-3.20/gtk.css
This command will open text editor with many tabs. There are 3 for Ubuntu 20.04, and 20 for Ubuntu 22.04 since it has 10 accent colors in both light and dark. And for Ubuntu 22.10, Fedora, replace gedit with gnome-text-editor in command.
2. When files open, paste the following line to the end in each tab and save them all.
.app-notification { padding: 0; margin: -80px 0 0 0; opacity: 0;}
Tip: You may press Ctrl+Alt+PageUp/PageDn to switch tab quickly!
Step 2: Disable/Hide the undo pop-up for Yaru Dark Theme:
Similarly, press Ctrl+Alt+T key combination on keyboard to open terminal. And, select run the command below to edit the CSS files for dark mode:
- For Ubuntu 22.04, use command:
sudo gedit /usr/share/themes/Yaru*/gtk-3.0/gtk-dark.css
- And, Ubuntu 20.04 use this command instead:
sudo gedit /usr/share/themes/Yaru*/gtk-3.20/gtk-dark.css
When all files open in text editor in tabs, copy and paste the line below in each tab and save all.
.app-notification { padding: 0; margin: -80px 0 0 0; opacity: 0;}
Step 3: Apply change
After made changes to all the Yaru themes, you need to refresh the current theme to make it work.
To do so, simply open “Settings” (aka Gnome Control Center), switch to dark or light mode or select another accent color.
And, finally try deleting files in file manager to see effect!
Recent Comments