Compare commits
No commits in common. "5d9229a879a75609300e2aa8ffe40650f3562edd" and "6e2f094c75ba9dc4a0670f5e7f5ad93f96341104" have entirely different histories.
5d9229a879
...
6e2f094c75
|
@ -2,7 +2,6 @@
|
||||||
data=/usr/share/tromjaro-layout-switcher
|
data=/usr/share/tromjaro-layout-switcher
|
||||||
icons=$data/icons
|
icons=$data/icons
|
||||||
profiles=$data/profiles
|
profiles=$data/profiles
|
||||||
|
|
||||||
enable-top-bar-integration() {
|
enable-top-bar-integration() {
|
||||||
# Enable global menus
|
# Enable global menus
|
||||||
pacman -Qq vala-panel-appmenu-registrar ||
|
pacman -Qq vala-panel-appmenu-registrar ||
|
||||||
|
@ -17,7 +16,6 @@ enable-top-bar-integration() {
|
||||||
# Put window buttons on left side
|
# Put window buttons on left side
|
||||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "CMH|"
|
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "CMH|"
|
||||||
}
|
}
|
||||||
|
|
||||||
disable-top-bar-integration() {
|
disable-top-bar-integration() {
|
||||||
# Disable global menus
|
# Disable global menus
|
||||||
! pacman -Qq vala-panel-appmenu-registrar ||
|
! pacman -Qq vala-panel-appmenu-registrar ||
|
||||||
|
@ -33,26 +31,35 @@ disable-top-bar-integration() {
|
||||||
# Put window buttons on right side
|
# Put window buttons on right side
|
||||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC"
|
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC"
|
||||||
}
|
}
|
||||||
|
|
||||||
choice=$(
|
choice=$(
|
||||||
yad --no-buttons --center --keep-icon-size --separator='' --use-interp --title 'TROMjaro Layout Switcher' --text-align=center --text 'Changing to or from any layout that has global menus, will require your admin password' --form --columns 3 \
|
yad --no-buttons --center --keep-icon-size --separator='' --use-interp --title 'TROMjaro Layout Switcher' --text-align=center --text 'Changing to or from any layout that has global menus, will require your admin password' --form --columns 3 \
|
||||||
--field=!"$icons/windows.png"!'Windows-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Windows-Like'" \
|
--field=!"$icons/windows.png"!'Windows-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Windows-Like'" \
|
||||||
--field=!"$icons/macos.png"!'MacOS-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MacOS-Like'" \
|
--field=!"$icons/macos.png"!'MacOS-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MacOS-Like'" \
|
||||||
--field=!"$icons/mx.png"!'MX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MX-Like'" \
|
--field=!"$icons/mx.png"!'MX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MX-Like'" \
|
||||||
--field=!"$icons/gnome.png"!'Gnome-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Gnome-Like'" \
|
--field=!"$icons/gnome.png"!'Gnome-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Gnome-Like'" \
|
||||||
--field=!"$icons/unity.png"!'Unity-Like (default)':BTN "kill -USR1 \$YAD_PID; echo -n 'Unity-Like'" \
|
--field=!"$icons/unity.png"!'Unity-Like (default)':BTN "kill -USR1 \$YAD_PID; echo -n 'Unity-Like (default)'" \
|
||||||
--field=!"$icons/topx.png"!'TopX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'TopX-Like'"
|
--field=!"$icons/topx.png"!'TopX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'TopX-Like'"
|
||||||
)
|
)
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
'Windows-Like'|'MX-Like'|'Gnome-Like'|'TopX-Like')
|
'Windows-Like')
|
||||||
disable-top-bar-integration ;;
|
disable-top-bar-integration
|
||||||
'Unity-Like'|'MacOS-Like')
|
xfce4-panel-profiles load "$profiles"/Windows-Like.tar.bz2 ;;
|
||||||
enable-top-bar-integration ;;
|
'Unity-Like (default)')
|
||||||
|
enable-top-bar-integration
|
||||||
|
xfce4-panel-profiles load "$profiles"/Unity-Like.tar.bz2 ;;
|
||||||
|
'MX-Like')
|
||||||
|
disable-top-bar-integration
|
||||||
|
xfce4-panel-profiles load "$profiles"/MX-Like.tar.bz2 ;;
|
||||||
|
'MacOS-Like')
|
||||||
|
enable-top-bar-integration
|
||||||
|
xfce4-panel-profiles load "$profiles"/MacOS-Like.tar.bz2 ;;
|
||||||
|
'Gnome-Like')
|
||||||
|
disable-top-bar-integration
|
||||||
|
xfce4-panel-profiles load "$profiles"/Gnome-Like.tar.bz2 ;;
|
||||||
|
'TopX-Like')
|
||||||
|
disable-top-bar-integration
|
||||||
|
xfce4-panel-profiles load "$profiles"/TopX-Like.tar.bz2 ;;
|
||||||
*) exit ;;
|
*) exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Apply the XFCE panel profiles for the chosen layout
|
|
||||||
xfce4-panel-profiles load "$profiles/$choice.tar.bz2"
|
|
||||||
|
|
||||||
sleep 2.5 && notify-send "$choice layout was enabled"
|
sleep 2.5 && notify-send "$choice layout was enabled"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user