Skip to content

Commit

Permalink
Updated hotkeys for xfce4
Browse files Browse the repository at this point in the history
  • Loading branch information
rbreaves committed May 5, 2021
1 parent 9a3521d commit 7375dd7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
24 changes: 8 additions & 16 deletions linux/kinto.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,11 @@
# K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
K("RC-Q"): K("M-F4"), # Default SL - not-popos
K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora)
K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default
K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
K("RC-Grave"): K("M-Grave"), # Default - Cmd ` - Same App Switching
K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default - Cmd ` - Same App Switching
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
Expand All @@ -455,10 +455,6 @@
# Basic App hotkey functions
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
# Cmd Tab - App Switching Default
# K("RC-Tab"): K("RC-backslash"), # xfce4
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
# In-App Tab switching
# K("M-Tab"): K("C-Tab"), # Chromebook/IBM - In-App Tab switching
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
Expand Down Expand Up @@ -668,13 +664,9 @@
K("LC-Tab") : K("LC-PAGE_DOWN"),
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
K("LC-Grave") : K("LC-PAGE_UP"),
# K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default
# K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
# Cmd Tab - App Switching Default
# K("RC-Tab"): K("RC-backslash"), # xfce4
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
# K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
# K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
# Converts Cmd to use Ctrl-Shift
K("RC-MINUS"): K("C-Shift-MINUS"),
K("RC-EQUAL"): K("C-Shift-EQUAL"),
Expand Down
21 changes: 20 additions & 1 deletion xkeysnail_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ function uninstall {
mv ~/.config/kglobalshortcutsrc ~/.config/kglobalshortcutsrc.kinto
elif [ "$dename" == "xfce" ];then
echo "Resetting DE hotkeys..."
cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
if test -f "/etc/mx-version";then
cp /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
else
cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
fi
fi
elif [ "$yn" == "r" ]; then
echo "Restore original user shortcuts"
Expand Down Expand Up @@ -84,6 +88,12 @@ function uninstall {
echo -e "\nWill still be restoring the overlay key"
echo -e "gsettings set org.gnome.mutter overlay-key 'super'\n"
gsettings set org.gnome.mutter overlay-key 'super'
# Repetitive - xfce restore factory or backup does this
# Also needs to check if whiskermenu is even being used
# elif [[ $dename == "xfce" ]]; then
# echo -e "\nWill still be restoring the overlay key"
# echo -e "xfconf-query --channel xfce4-keyboard-shortcuts --property \"/commands/custom/Super_L\" --create --type string --set \"xfce4-popup-whiskermenu\""
# xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "xfce4-popup-whiskermenu"
fi
}

Expand Down Expand Up @@ -244,6 +254,15 @@ if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
echo "Overlay key, " $bound ", detected. Will be removing so Super-Space can remap to Cmd-Space for app launching.."
gsettings set org.gnome.mutter overlay-key ''
fi
elif [[ $dename == 'xfce' ]];then
# xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --reset
launcher=$(cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep 'name="Super_L"' | sed 's:.*="::')
nlauncher=${launcher::-3}
# Replace Alt-F1 help file w/ whisker menu alternative hotkey
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --reset
# Clear Alt-F3 App Finder for sublime text global replace
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F3" --reset
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --create --type string --set "$nlauncher" && echo "$nlauncher has been set to Alt-F1 for Cmd-Space to work."
fi

# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
Expand Down

0 comments on commit 7375dd7

Please sign in to comment.