28 lines
1000 B
Bash
Executable File
28 lines
1000 B
Bash
Executable File
#! /bin/bash
|
|
FILE1=/usr/lib/vala-panel/appmenu-registrar
|
|
FILE2=/usr/lib/vala-panel/appmenu-registrar.OFF
|
|
if [ -f "$FILE1" ]; then
|
|
## Disable Global Menu
|
|
sudo -A mv "$FILE1" "$FILE2" || exit
|
|
xfconf-query -c xfce4-panel -p /plugins/plugin-3/plugins/plugin-3/compact-mode -n -t bool -s true
|
|
killall appmenu-registrar
|
|
## Reset panels and windows
|
|
xfce4-panel -r &
|
|
xfwm4 --replace &
|
|
xfce4-panel &
|
|
sleep 4 && notify-send 'Top menu DISABLED !' 'Restart your computer in order for this to work properly!'
|
|
|
|
elif [ -f "$FILE2" ]; then
|
|
## Enable Global Menu
|
|
sudo -A mv "$FILE2" "$FILE1" || exit
|
|
xfconf-query -c xfce4-panel -p /plugins/plugin-3/plugins/plugin-3/compact-mode -n -t bool -s false
|
|
## Reset panels and windows
|
|
xfce4-panel -r &
|
|
xfwm4 --replace &
|
|
xfce4-panel &
|
|
sleep 4 && notify-send 'The top menu ENABLED !' 'Restart your computer in order for this to work properly!'
|
|
|
|
else
|
|
notify-send 'ERROR: is the Global Menu installed ?'
|
|
fi
|