From c4db31bdf00509748bf1d03f90768421da5ab7d1 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 26 Feb 2020 18:15:46 -0600 Subject: [PATCH] - Added early support for app switching on Gnome --- .xkb/symbols/mac_gui | 54 ++++++++++++++++----------------- .xkb/symbols/mac_term | 54 ++++++++++++++++----------------- system-config/cleanup.sh | 3 ++ system-config/system_hotkeys.sh | 10 ++++++ 4 files changed, 67 insertions(+), 54 deletions(-) create mode 100755 system-config/system_hotkeys.sh diff --git a/.xkb/symbols/mac_gui b/.xkb/symbols/mac_gui index 88d7eda..63a9b72 100644 --- a/.xkb/symbols/mac_gui +++ b/.xkb/symbols/mac_gui @@ -183,33 +183,33 @@ default partial xkb_symbols "mac_levelssym" { RedirectKey(key=,clearmods=Mod1) ] }; - // Cycle App and In App Tab Switching - replace key { - 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=,clearmods=Mod1), - RedirectKey(key=,clearmods=Mod1), - // Also need to remap on the DE level - // to backslash \ for Cmd+Tab - RedirectKey(key=), - RedirectKey(key=), - RedirectKey(key=,modifiers=Control,clearmods=Mod4), - RedirectKey(key=,modifiers=Control+Shift,clearmods=Mod4) - ] - }; + // // Cycle App and In App Tab Switching + // replace key { + // 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=,clearmods=Mod1), + // RedirectKey(key=,clearmods=Mod1), + // // Also need to remap on the DE level + // // to backslash \ for Cmd+Tab + // RedirectKey(key=), + // RedirectKey(key=), + // RedirectKey(key=,modifiers=Control,clearmods=Mod4), + // RedirectKey(key=,modifiers=Control+Shift,clearmods=Mod4) + // ] + // }; // // Full Print Screen // // GalliumOS diff --git a/.xkb/symbols/mac_term b/.xkb/symbols/mac_term index 4620e3d..9898f02 100644 --- a/.xkb/symbols/mac_term +++ b/.xkb/symbols/mac_term @@ -27,33 +27,33 @@ partial xkb_symbols "mac_win" { }; }; partial xkb_symbols "mac_global" { - // Cycle App and In App Tab Switching - replace key { - type[Group1]= "ONE_LEVEL_CTRL", - symbols[Group1]= [ - Tab, - Tab, - backslash, - // NoSymbol, - NoSymbol, - backslash, - Tab, - Tab - ], - actions[Group1]= [ - NoAction(), - NoAction(), - RedirectKey(key=,clearmods=Shift), - // FK18 is just to clear Alt - // RedirectKey(key=,clearmods=Mod1), - RedirectKey(key=,clearmods=Mod1), - // Also need to remap on the DE level - // to backslash \ for Cmd+Tab - RedirectKey(key=), - RedirectKey(key=,modifiers=Control,clearmods=Mod4), - RedirectKey(key=,modifiers=Control+Shift,clearmods=Mod4) - ] - }; + // // Cycle App and In App Tab Switching + // replace key { + // type[Group1]= "ONE_LEVEL_CTRL", + // symbols[Group1]= [ + // Tab, + // Tab, + // backslash, + // // NoSymbol, + // NoSymbol, + // backslash, + // Tab, + // Tab + // ], + // actions[Group1]= [ + // NoAction(), + // NoAction(), + // RedirectKey(key=,clearmods=Shift), + // // FK18 is just to clear Alt + // // RedirectKey(key=,clearmods=Mod1), + // RedirectKey(key=,clearmods=Mod1), + // // Also need to remap on the DE level + // // to backslash \ for Cmd+Tab + // RedirectKey(key=), + // RedirectKey(key=,modifiers=Control,clearmods=Mod4), + // RedirectKey(key=,modifiers=Control+Shift,clearmods=Mod4) + // ] + // }; // Page Up replace key { type[Group1]= "ONE_LEVEL_CTRL", diff --git a/system-config/cleanup.sh b/system-config/cleanup.sh index fe99548..62efa16 100755 --- a/system-config/cleanup.sh +++ b/system-config/cleanup.sh @@ -4,3 +4,6 @@ setxkbmap -option # force command to run silently and report true killall xbindkeys > /dev/null 2>&1 || : # rm /tmp/kinto/caret + +gsettings set org.gnome.desktop.wm.keybindings switch-applications "['Tab']" +gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['Tab']" diff --git a/system-config/system_hotkeys.sh b/system-config/system_hotkeys.sh new file mode 100755 index 0000000..dc04fe6 --- /dev/null +++ b/system-config/system_hotkeys.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ "$1" = "term" ]; + then + gsettings set org.gnome.desktop.wm.keybindings switch-applications "['Tab']" + gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['']" +else + gsettings set org.gnome.desktop.wm.keybindings switch-applications "['Tab']" + gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['Tab']" +fi