Created
November 30, 2018 01:54
-
-
Save Hainish/bb024ad484a34528dca4e9f1cd44cbd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" == "awesome" ]; then | |
for x in `seq 1 8`; do | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super><Shift>$x" -n -t string -s "move_window_workspace_${x}_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>KP_$x" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>$x" -n -t string -s "workspace_${x}_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary>F$x" -r | |
done | |
for x in `seq 9 9`; do | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>KP_$x" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary>F$x" -r | |
done | |
for x in `seq 10 12`; do | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary>F$x" -r | |
done | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>F4" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super><Shift>c" -n -t string -s "close_window_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>Tab" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>j" -n -t string -s "cycle_windows_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt><Shift>Tab" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>k" -n -t string -s "cycle_reverse_windows_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>Left" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>h" -n -t string -s "prev_workspace_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>Right" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>l" -n -t string -s "next_workspace_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>F10" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>g" -n -t string -s "maximize_window_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>F11" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>f" -n -t string -s "fullscreen_key" | |
elif [ "$1" == "default" ]; then | |
for x in `seq 1 6`; do | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super><Shift>$x" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>KP_$x" -n -t string -s "move_window_workspace_${x}_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>$x" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary>F$x" -n -t string -s "workspace_${x}_key" | |
done | |
for x in `seq 9 9`; do | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>KP_$x" -n -t string -s "move_window_workspace_${x}_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary>F$x" -n -t string -s "workspace_${x}_key" | |
done | |
for x in `seq 10 12`; do | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary>F$x" -n -t string -s "workspace_${x}_key" | |
done | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>F4" -n -t string -s "close_window_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super><Shift>c" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>Tab" -n -t string -s "cycle_windows_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>j" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt><Shift>Tab" -n -t string -s "cycle_reverse_windows_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>k" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>Left" -n -t string -s "prev_workspace_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>h" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Primary><Alt>Right" -n -t string -s "next_workspace_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>l" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>F10" -n -t string -s "maximize_window_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>g" -r | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>F11" -n -t string -s "fullscreen_key" | |
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Super>f" -r | |
else | |
echo "Usage: $0 [awesome|default]" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment