mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
Merge pull request #155 from rbreaves/dev
- Added terminals & improved uninstaller
This commit is contained in:
20
setup.py
20
setup.py
@@ -70,6 +70,7 @@ def setShortcuts():
|
|||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
||||||
|
cmdline("gsettings set org.gnome.mutter overlay-key ''")
|
||||||
if distro == "ubuntu" and dename == "gnome":
|
if distro == "ubuntu" and dename == "gnome":
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"")
|
||||||
@@ -251,6 +252,10 @@ def Uninstall():
|
|||||||
cmdline("gsettings reset-recursively org.gnome.desktop.wm.keybindings")
|
cmdline("gsettings reset-recursively org.gnome.desktop.wm.keybindings")
|
||||||
print("gsettings reset-recursively org.gnome.mutter.keybindings")
|
print("gsettings reset-recursively org.gnome.mutter.keybindings")
|
||||||
cmdline("gsettings reset-recursively org.gnome.mutter.keybindings")
|
cmdline("gsettings reset-recursively org.gnome.mutter.keybindings")
|
||||||
|
print("gsettings set org.gnome.mutter overlay-key 'super'")
|
||||||
|
cmdline("gsettings set org.gnome.mutter overlay-key 'super'")
|
||||||
|
cmdline('dconf dump /org/gnome/mutter/ > mutter.conf')
|
||||||
|
cmdline('dconf load /org/gnome/mutter/ < mutter.conf')
|
||||||
elif dename == "kde":
|
elif dename == "kde":
|
||||||
print("Resetting DE hotkeys...\n")
|
print("Resetting DE hotkeys...\n")
|
||||||
cmdline('mv ~/.config/kwinrc ~/.config/kwinrc.kinto')
|
cmdline('mv ~/.config/kwinrc ~/.config/kwinrc.kinto')
|
||||||
@@ -357,7 +362,12 @@ color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ]
|
|||||||
|
|
||||||
print("\nKinto - Type in Linux like it's a Mac.\n")
|
print("\nKinto - Type in Linux like it's a Mac.\n")
|
||||||
|
|
||||||
kintotype = int(input(color_arr[2] + "1) Kinto - xkeysnail (udev/x11) - Recommended\n" + color_arr[0] + "2) Kinto - Original xkb/x11 implementation\n\n" + bcolors.ENDC))
|
kintotype = int(input(color_arr[2] +
|
||||||
|
"1) Kinto - xkeysnail (udev/x11) - Recommended\n" + color_arr[0] +
|
||||||
|
"2) Kinto - Original xkb/x11 implementation\n" + color_arr[3] +
|
||||||
|
"3) Uninstall Kinto - xkeysnail\n" +
|
||||||
|
"4) Uninstall Kinto - Original xkb\n\n"
|
||||||
|
+ bcolors.ENDC))
|
||||||
print("")
|
print("")
|
||||||
if(kintotype == 1):
|
if(kintotype == 1):
|
||||||
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
|
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
|
||||||
@@ -365,6 +375,14 @@ if(kintotype == 1):
|
|||||||
setShortcuts()
|
setShortcuts()
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
if(kintotype == 3):
|
||||||
|
subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
|
||||||
|
exit()
|
||||||
|
|
||||||
|
if(kintotype == 4):
|
||||||
|
Uninstall()
|
||||||
|
exit()
|
||||||
|
|
||||||
for index, item in enumerate(data['defaulttypes']):
|
for index, item in enumerate(data['defaulttypes']):
|
||||||
ossym = ""
|
ossym = ""
|
||||||
if item == "windows":
|
if item == "windows":
|
||||||
|
@@ -14,5 +14,6 @@ rm ~/.config/systemd/user/keyswap.timer
|
|||||||
rm -rf ~/.config/autostart/kinto.desktop
|
rm -rf ~/.config/autostart/kinto.desktop
|
||||||
rm -rf ~/.config/kinto
|
rm -rf ~/.config/kinto
|
||||||
rm -rf ~/.xkb
|
rm -rf ~/.xkb
|
||||||
systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sed -i '/xkb/d' ~/.Xsession 2>/dev/null
|
sed -i '/xkb/d' ~/.Xsession 2>/dev/null
|
||||||
|
exit 0
|
@@ -16,7 +16,7 @@
|
|||||||
"symbols":"",
|
"symbols":"",
|
||||||
"types":"",
|
"types":"",
|
||||||
"de":[],
|
"de":[],
|
||||||
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty" ]
|
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "firefox",
|
"name": "firefox",
|
||||||
|
@@ -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"]
|
terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty"]
|
||||||
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)
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ define_keymap(re.compile("konsole", re.IGNORECASE),{
|
|||||||
|
|
||||||
}, "Konsole tab switching")
|
}, "Konsole tab switching")
|
||||||
|
|
||||||
define_keymap(re.compile("Io.elementary.terminal", re.IGNORECASE),{
|
define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
|
||||||
# Ctrl Tab - In App Tab Switching
|
# Ctrl Tab - In App Tab Switching
|
||||||
K("LC-Tab") : K("LC-Shift-Right"),
|
K("LC-Tab") : K("LC-Shift-Right"),
|
||||||
K("LC-Shift-Tab") : K("LC-Shift-Left"),
|
K("LC-Shift-Tab") : K("LC-Shift-Left"),
|
||||||
|
@@ -27,6 +27,10 @@ function uninstall {
|
|||||||
gsettings reset-recursively org.gnome.desktop.wm.keybindings
|
gsettings reset-recursively org.gnome.desktop.wm.keybindings
|
||||||
echo "gsettings reset-recursively org.gnome.mutter.keybindings"
|
echo "gsettings reset-recursively org.gnome.mutter.keybindings"
|
||||||
gsettings reset-recursively org.gnome.mutter.keybindings
|
gsettings reset-recursively org.gnome.mutter.keybindings
|
||||||
|
echo "gsettings set org.gnome.mutter overlay-key 'super'"
|
||||||
|
gsettings set org.gnome.mutter overlay-key 'super'
|
||||||
|
dconf dump /org/gnome/mutter/ > mutter.conf
|
||||||
|
dconf load /org/gnome/mutter/ < mutter.conf
|
||||||
elif [ "$dename" == "kde" ];then
|
elif [ "$dename" == "kde" ];then
|
||||||
echo "Resetting DE hotkeys..."
|
echo "Resetting DE hotkeys..."
|
||||||
mv ~/.config/kwinrc ~/.config/kwinrc.kinto
|
mv ~/.config/kwinrc ~/.config/kwinrc.kinto
|
||||||
@@ -73,7 +77,7 @@ if [ $# -eq 0 ]; then
|
|||||||
echo " 1) Windows & Mac (HID driver)"
|
echo " 1) Windows & Mac (HID driver)"
|
||||||
echo " 2) Mac Only & VMs on Macbooks"
|
echo " 2) Mac Only & VMs on Macbooks"
|
||||||
echo " 3) Chromebook"
|
echo " 3) Chromebook"
|
||||||
echo " 4) Uninstall"
|
# echo " 4) Uninstall"
|
||||||
|
|
||||||
read n
|
read n
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user