GNOME 3.36
I am trying to remove the "Poweroff/logout" button from System Menu.
For removing this button, I am using the below command in Terminal
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.statusArea.aggregateMenu._system.menu.box.remove_actor(Main.panel.statusArea.aggregateMenu._system._sessionSubMenu)'
This works fine.
The problem is that when am adding it back with the below command, and when I select this PowerOff/Logout button.. This button is going down while popping up the sub menu of it.
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.statusArea.aggregateMenu._system.menu.box.add_actor(Main.panel.statusArea.aggregateMenu._system._sessionSubMenu)'
How can I make it work like the 2nd Image with out restarting the gnome-shell?