- Added App Cycle tab switcher

This commit is contained in:
Ben Reaves
2020-02-28 21:57:50 -06:00
parent 8c2c53cdcd
commit d695c3f734
5 changed files with 86 additions and 65 deletions

View File

@@ -183,34 +183,6 @@ default partial xkb_symbols "mac_levelssym" {
RedirectKey(key=<DELE>,clearmods=Mod1) RedirectKey(key=<DELE>,clearmods=Mod1)
] ]
}; };
// // Cycle App and In App Tab Switching
// replace key <TAB> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [
// Tab,
// Tab,
// NoSymbol,
// NoSymbol,
// backslash,
// backslash,
// Tab,
// Tab
// ],
// actions[Group1]= [
// NoAction(),
// NoAction(),
// // FK18 is just to clear Alt
// RedirectKey(key=<FK18>,clearmods=Mod1),
// RedirectKey(key=<FK18>,clearmods=Mod1),
// // Also need to remap on the DE level
// // to backslash \ for Cmd+Tab
// RedirectKey(key=<BKSL>),
// RedirectKey(key=<BKSL>),
// RedirectKey(key=<TAB>,modifiers=Control,clearmods=Mod4),
// RedirectKey(key=<TAB>,modifiers=Control+Shift,clearmods=Mod4)
// ]
// };
// // Full Print Screen // // Full Print Screen
// // GalliumOS // // GalliumOS
// replace key <AE03> { // replace key <AE03> {
@@ -240,6 +212,54 @@ default partial xkb_symbols "mac_levelssym" {
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ] // actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ]
// }; // };
}; };
partial xkb_symbols "mac_appcycle" {
// Cycle App and In App Tab Switching
key <FK13> { [ F13 ] };
key <FK14> { [ F14 ] };
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Tab,
Tab,
F14,
F13,
NoSymbol,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
Redirect(key=<FK14>),
Redirect(key=<FK13>),
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super),
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super)
]
};
};
partial xkb_symbols "mac_browsers" {
// Cycle App and In App Tab Switching
key <FK13> { [ F13 ] };
key <FK14> { [ F14 ] };
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Tab,
Tab,
F14,
F13,
NoSymbol,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
Redirect(key=<FK14>),
Redirect(key=<FK13>),
Redirect(key=<PGDN>,mods=Control,clearmods=Mod4+Super),
Redirect(key=<PGUP>,mods=Control,clearmods=Mod4+Super+Shift)
]
};
};
partial xkb_symbols "mac_chrome" { partial xkb_symbols "mac_chrome" {
// Back Button // Back Button
replace key <LEFT> { replace key <LEFT> {

View File

@@ -28,37 +28,23 @@ partial xkb_symbols "mac_win" {
}; };
partial xkb_symbols "mac_global" { partial xkb_symbols "mac_global" {
// Cycle App and In App Tab Switching // Cycle App and In App Tab Switching
// replace key <TAB> { key <FK13> { [ F13 ] };
// type[Group1]= "ONE_LEVEL_CTRL", key <FK14> { [ F14 ] };
// symbols[Group1]= [ replace key <TAB> {
// Tab, type[Group1]= "ONE_LEVEL_CMD",
// Tab, symbols[Group1]= [
// // backslash, Tab,
// Tab, Tab,
// // NoSymbol, F13,
// NoSymbol, NoSymbol
// // backslash, ],
// Tab, actions[Group1]= [
// Tab, NoAction(),
// Tab NoAction(),
// ], Redirect(key=<FK13>),
// actions[Group1]= [ Redirect(key=<PGDN>,mods=Control,clearmods=Mod4+Super)
// NoAction(), ]
// NoAction(), };
// // RedirectKey(key=<BKSL>,clearmods=Shift),
// NoAction(),
// // FK18 is just to clear Alt
// // RedirectKey(key=<FK18>,clearmods=Mod1),
// // Clears Alt + Shift
// RedirectKey(key=<FK18>,clearmods=Mod1),
// // Also need to remap on the DE level
// // to backslash \ for Cmd+Tab
// // RedirectKey(key=<TAB>),
// NoAction(),
// RedirectKey(key=<TAB>,modifiers=Control,clearmods=Mod4),
// RedirectKey(key=<TAB>,modifiers=Control+Shift,clearmods=Mod4)
// ]
// };
// Page Up // Page Up
replace key <UP> { replace key <UP> {
type[Group1]= "ONE_LEVEL_CMD", type[Group1]= "ONE_LEVEL_CMD",

View File

@@ -27,11 +27,17 @@ default partial xkb_types "addmac_levels" {
level_name[12] = "Super Control Alt"; level_name[12] = "Super Control Alt";
}; };
type "ONE_LEVEL_CMD" { type "ONE_LEVEL_CMD" {
modifiers = Shift+Control; modifiers = Shift+Control+Super;
map[Shift] = Level2; map[Shift] = Level2;
map[Control] = Level2; map[Shift+Control] = Level3;
map[Control] = Level4;
map[Super] = Level5;
map[Shift+Super] = Level6;
level_name[Level1] = "Base"; level_name[Level1] = "Base";
level_name[Level2] = "Shift"; level_name[Level2] = "Shift";
level_name[Level3] = "Control"; level_name[Level3] = "Control Shift";
level_name[Level4] = "Control";
level_name[Level5] = "Super";
level_name[Level6] = "Super Shift";
}; };
}; };

View File

@@ -27,11 +27,17 @@ default partial xkb_types "addmac_levels" {
level_name[12] = "Super Control Alt"; level_name[12] = "Super Control Alt";
}; };
type "ONE_LEVEL_CMD" { type "ONE_LEVEL_CMD" {
modifiers = Shift+Control; modifiers = Shift+Control+Super;
map[Shift] = Level2; map[Shift] = Level2;
map[Shift+Control] = Level2; map[Shift+Control] = Level3;
map[Control] = Level4;
map[Super] = Level5;
map[Shift+Super] = Level6;
level_name[Level1] = "Base"; level_name[Level1] = "Base";
level_name[Level2] = "Shift"; level_name[Level2] = "Shift";
level_name[Level3] = "Shift Control"; level_name[Level3] = "Control Shift";
level_name[Level4] = "Control";
level_name[Level5] = "Super";
level_name[Level6] = "Super Shift";
}; };
}; };

View File

@@ -85,6 +85,9 @@ dename = cmdline("./system-config/dename.sh")
print("Detected\nOS: " + distro + " " + distroVersion + "\nDE: " + dename + "\n") print("Detected\nOS: " + distro + " " + distroVersion + "\nDE: " + dename + "\n")
addhotkeys = yn_choice("Do you want to apply system level shortcuts?\nThis will add standardized shortcuts for Kinto to fully operate.\n") addhotkeys = yn_choice("Do you want to apply system level shortcuts?\nThis will add standardized shortcuts for Kinto to fully operate.\n")
if(addhotkeys): if(addhotkeys):
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-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"")
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']\"")