mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
- Added all shortcuts but minimize and change workspace due to conflict issues
This commit is contained in:
@@ -29,6 +29,103 @@
|
|||||||
// ]
|
// ]
|
||||||
// };
|
// };
|
||||||
default partial xkb_symbols "mac_levelssym" {
|
default partial xkb_symbols "mac_levelssym" {
|
||||||
|
// // Minimize window Cmd + H = Alt + F9
|
||||||
|
// replace key <AC06> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// F9
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<FK09>,modifiers=Mod1,clearmods=Control)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
// Maximize Window Ctrl + Cmd + F = Alt+F10
|
||||||
|
replace key <AC04> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
f,
|
||||||
|
F,
|
||||||
|
f,
|
||||||
|
F,
|
||||||
|
f,
|
||||||
|
F,
|
||||||
|
f,
|
||||||
|
F,
|
||||||
|
f,
|
||||||
|
F10
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Super+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Close App Cmd + Q/W = Alt + F4
|
||||||
|
replace key <AD01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
q,
|
||||||
|
Q,
|
||||||
|
q,
|
||||||
|
Q,
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
replace key <AD02> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
w,
|
||||||
|
w,
|
||||||
|
W,
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Show Desktop Cmd + F3 = Super + D
|
||||||
|
replace key <FK03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
F3,
|
||||||
|
F3,
|
||||||
|
F3,
|
||||||
|
F3,
|
||||||
|
d
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
// Fix the G key for Sublime Text
|
// Fix the G key for Sublime Text
|
||||||
replace key <AC05> {
|
replace key <AC05> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
@@ -27,6 +27,75 @@ partial xkb_symbols "mac_win" {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
partial xkb_symbols "mac_global" {
|
partial xkb_symbols "mac_global" {
|
||||||
|
// // Minimize Window Cmd + H = Alt+F9
|
||||||
|
// replace key <AC06> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// H
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control+Shift)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
// Maximize Window Ctrl + Cmd + F = Alt+F10
|
||||||
|
replace key <AC04> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
f,
|
||||||
|
F,
|
||||||
|
F
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Close App Cmd + Q/W = Alt + F4
|
||||||
|
replace key <AD01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
q,
|
||||||
|
Q,
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
replace key <AD02> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
w,
|
||||||
|
W,
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Show Desktop Cmd + F3 = Super + D
|
||||||
|
replace key <FK03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
F3,
|
||||||
|
F3,
|
||||||
|
D
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
// Cycle App and In App Tab Switching
|
// Cycle App and In App Tab Switching
|
||||||
key <FK13> { [ F13 ] };
|
key <FK13> { [ F13 ] };
|
||||||
key <FK14> { [ F14 ] };
|
key <FK14> { [ F14 ] };
|
||||||
|
27
setup.py
27
setup.py
@@ -78,26 +78,39 @@ if len(check_xdotool) == 0:
|
|||||||
if runpkg != 0:
|
if runpkg != 0:
|
||||||
requirements(pkgm)
|
requirements(pkgm)
|
||||||
|
|
||||||
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").lower()
|
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip()
|
||||||
distroVersion = cmdline("awk -F= '$1==\"VERSION_ID\" { print $2 ;}' /etc/os-release").lower()
|
distroVersion = cmdline("awk -F= '$1==\"VERSION_ID\" { print $2 ;}' /etc/os-release").replace('"','').strip()
|
||||||
dename = cmdline("./system-config/dename.sh")
|
dename = cmdline("./system-config/dename.sh").replace('"','').strip()
|
||||||
|
|
||||||
print("Detected\nOS: " + distro + " " + distroVersion + "\nDE: " + dename + "\n")
|
print("\nIf Kinto is already running it will be stopped...")
|
||||||
addhotkeys = yn_choice("Do you want to apply system level shortcuts?\nThis will add standardized shortcuts for Kinto to fully operate.\n")
|
print("If you cancel the installer you can re-run Kinto via\n systemctl --user start keyswap")
|
||||||
|
|
||||||
|
cmdline("systemctl --user stop keyswap")
|
||||||
|
addhotkeys = yn_choice("\nDo you want to apply system level shortcuts?")
|
||||||
if(addhotkeys):
|
if(addhotkeys):
|
||||||
|
print("\nDetected " + distro + " " + distroVersion.strip() + " DE: " + dename)
|
||||||
|
distro = distro.lower()
|
||||||
if dename == "gnome":
|
if dename == "gnome":
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>F13','<Primary><Shift>F13','<Alt>Tab']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>F13','<Primary><Shift>F13','<Alt>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 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 panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
||||||
if distro == "ubuntu" and dename == "gnome":
|
if distro == "ubuntu" and dename == "gnome":
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left \"['<Primary><Alt>Left','<Super>Left']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left \"['<Primary><Alt>Left','<Super>Left']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right \"['<Primary><Alt>Right','<Super>Right']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right \"['<Primary><Alt>Right','<Super>Right']\"")
|
||||||
|
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']\"")
|
||||||
elif distro == "pop!_os" and dename == "gnome":
|
elif distro == "pop!_os" and dename == "gnome":
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings close \"['<Alt>F4','<Super>w']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings close \"['<Alt>F4','<Super>w']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Primary><Super>Up']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Primary><Super>Up']\"")
|
||||||
|
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']\"")
|
||||||
elif distro == "elementaryos" and dename == "gnome":
|
elif distro == "elementaryos" and dename == "gnome":
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d','<Super>Down']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d','<Super>Down']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Super>Up']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Super>Up']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space','<Super>Space']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space','<Super>Space']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Super>Space','<Primary>Space']\"")
|
||||||
elif distro == "galliumos" and dename == "xfce":
|
elif distro == "galliumos" and dename == "xfce":
|
||||||
cmdline("xfconf-query --channel xfce4-keyboard-shortcuts --property \"/xfwm4/custom/<Super>d\" --create --type string --set \"show_desktop_key\"")
|
cmdline("xfconf-query --channel xfce4-keyboard-shortcuts --property \"/xfwm4/custom/<Super>d\" --create --type string --set \"show_desktop_key\"")
|
||||||
cmdline("xfconf-query --channel xfce4-keyboard-shortcuts --property \"/xfwm4/custom/<Alt><Shift>Tab\" --set \"cycle_reverse_windows_key\"")
|
cmdline("xfconf-query --channel xfce4-keyboard-shortcuts --property \"/xfwm4/custom/<Alt><Shift>Tab\" --set \"cycle_reverse_windows_key\"")
|
||||||
@@ -112,6 +125,8 @@ if(addhotkeys):
|
|||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left \"['<Primary><Alt>Left','<Super>Left']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left \"['<Primary><Alt>Left','<Super>Left']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right \"['<Primary><Alt>Right','<Super>Right']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right \"['<Primary><Alt>Right','<Super>Right']\"")
|
||||||
|
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']\"")
|
||||||
elif distro == "manjaro linux" and dename == "kde":
|
elif distro == "manjaro linux" and dename == "kde":
|
||||||
cmdline("kwriteconfig5 --file \"$HOME/.config/kglobalshortcutsrc\" --group \"kwin\" --key \"Maximize Window\" \"Alt+F10,Meta+PgUp,Maximize Window\"")
|
cmdline("kwriteconfig5 --file \"$HOME/.config/kglobalshortcutsrc\" --group \"kwin\" --key \"Maximize Window\" \"Alt+F10,Meta+PgUp,Maximize Window\"")
|
||||||
cmdline("kwriteconfig5 --file \"$HOME/.config/kglobalshortcutsrc\" --group \"kwin\" --key \"Minimize Window\" \"Meta+h,Meta+PgDown,Minimize Window\"")
|
cmdline("kwriteconfig5 --file \"$HOME/.config/kglobalshortcutsrc\" --group \"kwin\" --key \"Minimize Window\" \"Meta+h,Meta+PgDown,Minimize Window\"")
|
||||||
@@ -282,7 +297,7 @@ if len(defaultde) != 0:
|
|||||||
|
|
||||||
user_config['config'][0]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
user_config['config'][0]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
||||||
user_config['config'][1]['run'] = keyboardconfigs[defaultkb-1]['term']
|
user_config['config'][1]['run'] = keyboardconfigs[defaultkb-1]['term']
|
||||||
user_config['config'][2]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
user_config['config'][2]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.browsers")
|
||||||
user_config['config'][3]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.chrome")
|
user_config['config'][3]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.chrome")
|
||||||
|
|
||||||
os.remove(user_file)
|
os.remove(user_file)
|
||||||
|
Reference in New Issue
Block a user