2

I am using the Pixel Saver extension for GNOME Shell, similar to the old Maximus extension for GNOME 2 / Unity. When I maximise a window, the title and menu bars are hidden.

But I don't want the minimise, maximise or close buttons to appear in the Activity Bar. Instead of messing with window buttons itself, Pixel Saver honours the GNOME settings, so I have been able to remove the minimise and maximise buttons by disabling them in Tweak Tool.

How do I similarly disable/remove the close (X) button?

(I guess this is the opposite of "No close button in GNOME 3")

2

You may try one of the following.

1. Tweak Pixel Saver code

You may tweak Pixel Saver to get rid of the buttons by following these steps:

  1. Go to Pixel Saver directory viz. ~/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/ (if it is installed locally).
  2. Open the extension.js file with a text editor.
  3. Look for the three lines

    • Buttons.init(extensionMeta);
    • Buttons.enable();
    • Buttons.disable();

    and comment them out by putting // before the lines (i.e. change Buttons.init(extensionMeta); to //Buttons.init(extensionMeta); and so on).

  4. Save the extension.js file.
  5. Restart GNOME shell by pressing alt+f2 and then entering r and pressing enter.

Note: These changes to the extension.js file will most probably be overwritten by each update of the extension.

This will get rid of window buttons for maximised windows from the "Activities" bar at the top. I believe that's what you wish to achieve.

2. GNOME settings

If you want to get rid of all the buttons from all windows, run the following command in Terminal:

gsettings set org.gnome.desktop.wm.preferences button-layout :

3. Use a different extension

No Title Bar is a fork of Pixel Saver that specifically implements this functionality.

  • About the solution #2: is this persistent? If so, how do I turn it back on in case I want my buttons back? Also, it doesn't seem to work for me on Fedora+i3wm, do you know why that may be? – Błażej Michalik Nov 5 '18 at 15:06
  • @BłażejMichalik You can always fallback to the default option with reset (in this case gsettings reset org.gnome.desktop.wm.preferences button-layout). – pomsky Nov 5 '18 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.