Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Place "Power Off" as last option in the system menu?

I have been using Ubuntu 21.10 for about slightly more than a month now and there is a design choice that irritates me.

The "Log Out" button is placed below the "Power Off" button in the system menu. You can see the image link below.

Image depicting menu with "Lock", followed by a seperator, then "Restart", "Power Off", and "Log Out"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

It irritates me as I am used to clicking the last option in the menu, like Mac OS. Is there a way to put the "Power Off" button below the "Log Out?"

I have installed a few different Extensions to try and fix this.

"Bring Out SubMenu of Power Off/Logout Button"
enter image description here
As you can see there is no option for me to reaarange. :/

"Top Bar Organiser"

A few others, but just haven’t been able to put the Power Off Button below the Logout Button. Does anyone have a clue on how to reorder the options?

Also, I chanced on a few menu designs that look good like the link below.

A different menu design

I believe this was Gnome3 in 18.04? I much prefer the round buttons. I will be okay switching to this look too.

Thanks in advance for helping me!

>Solution :

you can tweak the order by editing the extensions extension.js file.

Open the extensions extension.js file with below command

gedit $HOME/.local/share/gnome-shell/extensions/BringOutSubmenuOfPowerOffLogoutButton@pratap.fastmail.fm/extension.js

Reorder the menu as you wish from _nextAction() funtion, for example

_nextAction() {
let boolean;
    // Separator1
boolean = this.gsettings.get_boolean('remove-separator-1');
if (!boolean) { SystemMenu.addMenuItem(separator1); };
    // Suspend
boolean = this.gsettings.get_boolean('remove-suspend-button');
if (!boolean) { SystemMenu.addMenuItem(suspend); };
    // Switch User
SystemMenu.addMenuItem(switchUser);
let bindFlags = GObject.BindingFlags.DEFAULT | GObject.BindingFlags.SYNC_CREATE;
DefaultActions.bind_property('can-switch-user', switchUser, 'visible', bindFlags);
    // Separator2
boolean = this.gsettings.get_boolean('remove-separator-2');
if (!boolean) { SystemMenu.addMenuItem(separator2); };
    // Logout
boolean = this.gsettings.get_boolean('remove-logout-button');
if (!boolean) { SystemMenu.addMenuItem(logout); };
    //Restart
boolean = this.gsettings.get_boolean('remove-restart-button');  
if (!boolean) { SystemMenu.addMenuItem(restart); };
    // Power
boolean = this.gsettings.get_boolean('remove-power-button');
if (!boolean) { SystemMenu.addMenuItem(power); };
}

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading