How to disable Nautilus popup on Ubuntu 20.04?

On Ubuntu 20.04, Nautilus shows pop-ups when a copy is finished, or when a file is deleted ("undo"). However, the pop-ups are annoying because they cover the files underneath for quite a while.

  1. How to disable all the pop-ups completely?

  2. How to selectively disable only the "undo" pop-up, keeping the other pop-ups active?

I tried to follow this procedure (for Ubuntu 18.04), How to remove the "Undo" popup when deleting a file in Nautilus but in Ubuntu 20.04 the ~/.themes folder does not exist.


  1. Checked in /usr/share/themes/;
  2. Found Yaru-dark (theme currently in use, double checked on GNOME Tweaks);
  3. Opened in folder in Terminal (right click on the folder);
  4. Ran

    sudo gedit gtk.css
    
  5. added the line

    .app-notification { padding: 0; margin: -80px 0 0 0; opacity: 0;}
    

    at the end

  6. Saved file, closed, refreshed the theme by using GNOME Tweaks;

Now all pop-ups are off.