Merge pull request #178 from rbreaves/dev

- Improved xfce4 support, added xfce4-terminal. Fixed xkeysnail issue.
This commit is contained in:
Ben Reaves
2020-05-16 01:03:40 -05:00
committed by GitHub
4 changed files with 23 additions and 15 deletions

View File

@@ -156,7 +156,7 @@ def setShortcuts():
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui') cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
# elif distro == "budgie" and dename == "gnome": # elif distro == "budgie" and dename == "gnome":
# print("Apply budgie shortcuts here") # print("Apply budgie shortcuts here")
elif distro == "galliumos" and dename == "xfce": elif (distro == "galliumos" and dename == "xfce") or (distro == "ubuntu" and dename == "xfce"):
print("Applying GalliumOS (xfce) shortcuts...") print("Applying GalliumOS (xfce) shortcuts...")
cmdline('cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ./xfce4-keyboard-shortcuts_`date +"%Y.%m.%d-%s"`.xml') cmdline('cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ./xfce4-keyboard-shortcuts_`date +"%Y.%m.%d-%s"`.xml')
# Reset Show desktop # Reset Show desktop

View File

@@ -16,7 +16,7 @@
"symbols":"", "symbols":"",
"types":"", "types":"",
"de":[], "de":[],
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix" ] "appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal" ]
}, },
{ {
"name": "firefox", "name": "firefox",

View File

@@ -3,7 +3,7 @@
import re import re
from xkeysnail.transform import * from xkeysnail.transform import *
terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix"] terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal"]
terminals = [term.casefold() for term in terminals] terminals = [term.casefold() for term in terminals]
termStr = "|".join(str(x) for x in terminals) termStr = "|".join(str(x) for x in terminals)
@@ -68,19 +68,19 @@ define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
define_keymap(None,{ define_keymap(None,{
# Cmd Tab - App Switching Default # Cmd Tab - App Switching Default
K("RC-Tab"): K("RC-F13"), # Default K("RC-Tab"): K("RC-F13"), # Default not-xfce4
K("RC-Shift-Tab"): K("RC-Shift-F13"), # Default K("RC-Shift-Tab"): K("RC-Shift-F13"), # Default not-xfce4
K("RC-Grave"): K("M-F6"), # Default K("RC-Grave"): K("M-F6"), # Default not-xfce4
K("RC-Shift-Grave"): K("M-Shift-F6"), # Default K("RC-Shift-Grave"): K("M-Shift-F6"), # Default not-xfce4
# K("RC-Tab"): K("RC-backslash"), # Chromebook # K("RC-Tab"): K("RC-backslash"), # xfce4
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # Chromebook # K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
# K("RC-Grave"): K("RC-Shift-backslash"), # Chromebook # K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
# In-App Tab switching # In-App Tab switching
# K("M-Tab"): K("C-Tab"), # Chromebook - In-App Tab switching # K("M-Tab"): K("C-Tab"), # Chromebook - In-App Tab switching
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook - In-App Tab switching # K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook - In-App Tab switching
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook - In-App Tab switching # K("M-Grave") : K("C-Shift-Tab"), # Chromebook - In-App Tab switching
K("Super-Tab"): K("LC-Tab"), # Default K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
# Wordwise # Wordwise
K("RC-Left"): K("Home"), # Beginning of Line K("RC-Left"): K("Home"), # Beginning of Line

View File

@@ -5,11 +5,11 @@
typeset -l distro typeset -l distro
distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release) distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release)
function uninstall {
typeset -l dename typeset -l dename
dename=$(./system-config/dename.sh | cut -d " " -f1) dename=$(./system-config/dename.sh | cut -d " " -f1)
function uninstall {
while true; do while true; do
read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts. (f/r)\n' yn read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts. (f/r)\n' yn
case $yn in case $yn in
@@ -229,10 +229,19 @@ fi
if [[ $1 == "1" || $1 == "winmac" ]]; then if [[ $1 == "1" || $1 == "winmac" ]]; then
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
perl -pi -e "s/(# )(.*)(# WinMac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(# )(.*)(# WinMac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
if [[ $dename == "xfce" ]]; then
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi
elif [[ $1 == "2" || $1 == "mac" ]]; then elif [[ $1 == "2" || $1 == "mac" ]]; then
perl -pi -e "s/(# )(.*)(# Mac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(# )(.*)(# Mac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
if [[ $dename == "xfce" ]]; then
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi
elif [[ $1 == "3" || $1 == "chromebook" ]]; then elif [[ $1 == "3" || $1 == "chromebook" ]]; then
perl -pi -e "s/(# )(.*)(# Chromebook)/\$2\$3/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(# )(.*)(# Chromebook)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(\w.*)(# Default)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi fi
@@ -263,7 +272,6 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
cd xkeysnail cd xkeysnail
git checkout 51c369084e0045a8410d227bab52411bf84fb65b git checkout 51c369084e0045a8410d227bab52411bf84fb65b
fi fi
git pull origin master
sudo pip3 install --upgrade . sudo pip3 install --upgrade .
cd .. cd ..
sudo systemctl daemon-reload sudo systemctl daemon-reload