From 5d5dd9d0bcd4bfadd04d58fc7b3303ca5f640afc Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Fri, 5 May 2023 01:45:51 +0200 Subject: [PATCH] Steamline the keyboard shortcuts - beautify the file: + group and re-order the keys in a logical way + put some spaces between the sections - adjust the keyboard shortcuts a bit --- .config/gnome-settings/key-bindings.ini | 252 +++++++++++++++--------- 1 file changed, 157 insertions(+), 95 deletions(-) diff --git a/.config/gnome-settings/key-bindings.ini b/.config/gnome-settings/key-bindings.ini index 23eeb14..9383745 100644 --- a/.config/gnome-settings/key-bindings.ini +++ b/.config/gnome-settings/key-bindings.ini @@ -1,80 +1,102 @@ # Unify all key bindings in this file to conveniently keep them consistent + [org/gnome/desktop/wm/keybindings] -begin-move=@as [] -begin-resize=@as [] + # q is i3wm's default -close=['q'] -cycle-group=@as [] -cycle-group-backward=@as [] -cycle-panels=['Tab'] -cycle-panels-backward=['Escape'] -cycle-windows=@as [] -cycle-windows-backward=@as [] -# 1-5 is i3wm's default way -move-to-workspace-1=['1'] -move-to-workspace-2=['2'] -move-to-workspace-3=['3'] -move-to-workspace-4=['4'] -move-to-workspace-5=['5'] -move-to-workspace-6=['6'] -move-to-workspace-7=['7'] -move-to-workspace-8=['8'] -move-to-workspace-9=['9'] -move-to-workspace-10=['0'] -move-to-workspace-last=@as [] -move-to-workspace-left=['Left'] -move-to-workspace-right=['Right'] -switch-applications=['Tab'] -switch-applications-backward=['Tab'] -switch-group=@as [] -switch-group-backward=@as [] -switch-input-source=@as [] -switch-input-source-backward=@as [] -# - Left/Right is the default to move left/right => 1-5 -# - 1-5 is i3wm's default way -switch-to-workspace-1=['1'] -switch-to-workspace-2=['2'] -switch-to-workspace-3=['3'] -switch-to-workspace-4=['4'] -switch-to-workspace-5=['5'] -switch-to-workspace-6=['6'] -switch-to-workspace-7=['7'] -switch-to-workspace-8=['8'] -switch-to-workspace-9=['9'] -switch-to-workspace-10=['0'] -switch-to-workspace-last=['End'] -switch-to-workspace-left=['Left'] -switch-to-workspace-right=['Right'] -toggle-maximized=['m'] +close=['Q', 'Q', 'Q', 'F4'] + maximize=@as [] unmaximize=@as [] +toggle-maximized=['M'] + +switch-applications=['Tab', 'Tab'] +switch-applications-backward=['Tab', 'Tab'] + +switch-input-source=@as [] +switch-input-source-backward=@as [] + +switch-group=@as [] +switch-group-backward=@as [] +switch-panels=@as [] +switch-panels-backward=@as [] + +cycle-group=@as [] +cycle-group-backward=@as [] +cycle-panels=@as [] +cycle-panels-backward=@as [] +cycle-windows=@as [] +cycle-windows-backward=@as [] + +begin-move=@as [] +begin-resize=@as [] + +# - Left/Right is the default to move left/right => 1-5 +# - 1-5 is i3wm's default way +switch-to-workspace-1=['1', '1'] +switch-to-workspace-2=['2', '2'] +switch-to-workspace-3=['3', '3'] +switch-to-workspace-4=['4', '4'] +switch-to-workspace-5=['5', '5'] +switch-to-workspace-6=['6', '6'] +switch-to-workspace-7=['7', '7'] +switch-to-workspace-8=['8', '8'] +switch-to-workspace-9=['9', '9'] +switch-to-workspace-10=['0', '0'] +switch-to-workspace-last=['End', 'End'] +switch-to-workspace-left=['Left'] +switch-to-workspace-right=['Right'] + +# 1-5 is i3wm's default +move-to-workspace-1=['1', '1'] +move-to-workspace-2=['2', '2'] +move-to-workspace-3=['3', '3'] +move-to-workspace-4=['4', '4'] +move-to-workspace-5=['5', '5'] +move-to-workspace-6=['6', '6'] +move-to-workspace-7=['7', '7'] +move-to-workspace-8=['8', '8'] +move-to-workspace-9=['9', '9'] +move-to-workspace-10=['0', '0'] +move-to-workspace-last=['End', 'End'] +move-to-workspace-left=['Left', 'Left'] +move-to-workspace-right=['Right', 'Right'] + [org/gnome/mutter/keybindings] toggle-tiled-left=@as [] toggle-tiled-right=@as [] + [org/gnome/settings-daemon/plugins/media-keys] -custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/'] -email=['e'] + +email=['E'] help=@as [] -home=['f'] +home=['F'] +search=['slash'] +terminal=@as [] +www=['B'] + +screensaver=['Escape'] logout=@as [] + +# Besides the numkeys, we use "/", ".", and "," to control the media +play=['KP_5', 'Slash'] +next=['KP_6', 'Period'] +previous=['KP_4', 'Comma'] +# Note: I often type "m" for "mute" intuitively +volume-mute=['KP_0', 'Slash', 'M', 'M'] +volume-up=['KP_8', 'Period'] +volume-down=['KP_2', 'Comma'] + magnifier=@as [] magnifier-zoom-in=@as [] magnifier-zoom-out=@as [] -next=['KP_6', 'Period'] + on-screen-keyboard=@as [] -play=['KP_5', 'Slash'] -previous=['KP_4', 'Comma'] screenreader=@as [] -screensaver=['Escape'] -search=['slash'] -terminal=@as [] -volume-down=['KP_2', 'Comma'] -volume-mute=['KP_0', 'Slash'] -volume-up=['KP_8', 'Period'] -www=['b'] + +custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom12/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom13/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom14/'] [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0] binding='Home' @@ -97,7 +119,7 @@ command='gnome-session-quit --logout' name='Log out (2)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4] -binding='g' +binding='G' command='flatpak run com.google.Chrome' name='Google Chrome' @@ -109,69 +131,102 @@ name='Terminal (1)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6] # Faster than the default t -binding='t' +binding='T' command='alacritty' name='Terminal (2)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7] -binding='l' +# Gnome's actual default, but with a custom terminal emulator +binding='T' +command='alacritty' +name='Terminal (3)' + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8] +binding='L' command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/toggle_keylights.py' name='Toggle Keylights in the Office (1)' -[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8] -binding='Slash' +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9] +binding='L' command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/toggle_keylights.py' name='Toggle Keylights in the Office (2)' -[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9] -binding='Period' -command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/inc_brightness.py' -name='Increase Brightness of Keylights in the Office' - [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10] -binding='Comma' -command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/dec_brightness.py' -name='Decrease Brightness of Keylights in the Office' +binding='Apostrophe' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/inc_brightness.py' +name='Increase Brightness of Keylights in the Office (1)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11] -binding='u' +binding='Apostrophe' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/inc_brightness.py' +name='Increase Brightness of Keylights in the Office (2)' + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom12] +binding='Semicolon' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/dec_brightness.py' +name='Decrease Brightness of Keylights in the Office (1)' + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom13] +binding='Semicolon' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/dec_brightness.py' +name='Decrease Brightness of Keylights in the Office (2)' + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom14] +binding='U' command='/usr/bin/flatpak run com.spotify.Client' name='Spotify' + [org/gnome/shell/extensions/pop-shell] + +# The launcher does not work without Pop!OS activate-launcher=@as [] + +# "toggle-floating" only puts the active window into floating mode +# while "toggle-tiling" turns the tiling mode on and off for all windows +toggle-floating=['Y'] +toggle-tiling=['Y'] + +focus-up=['Up'] focus-down=['Down'] focus-left=['Left'] focus-right=['Right'] -focus-up=['Up'] -pop-monitor-down=['Down'] -pop-monitor-left=['Left'] -pop-monitor-right=['Right'] -pop-monitor-up=['Up'] -pop-workspace-down=['Down'] -pop-workspace-up=['Up'] + +# Extends the move-to-workspace-* options above; in particular, +# "Up" and "Down" can be used to move windows to the upper monitors +pop-monitor-up=['Up', 'Up', 'Up'] +pop-monitor-down=['Down', 'Down', 'Down'] +pop-monitor-left=['Left'] +pop-monitor-right=['Right'] +pop-workspace-down=@as [] +pop-workspace-up=@as [] + # Return instead of the default Return # so that Return opens terminal (like i3wm) above +tile-enter=['Return', 'Return'] tile-accept=['Return'] -tile-enter=['Return'] + +tile-move-up=['Up'] tile-move-down=['Down'] tile-move-left=['Left'] tile-move-right=['Right'] -tile-move-up=['Up'] + +tile-resize-up=['Down'] tile-resize-down=['Up'] tile-resize-left=['Left'] tile-resize-right=['Right'] -tile-resize-up=['Down'] + +tile-swap-up=['Up'] tile-swap-down=['Down'] tile-swap-left=['Left'] tile-swap-right=['Right'] -tile-swap-up=['Up'] -toggle-floating=['y'] -toggle-tiling=['y'] + [org/gnome/shell/keybindings] + focus-active-notification=@as [] open-application-menu=@as [] + # Disable Gnome's default behavior of opening "favorite" apps # with 1-10 and instead switch workspaces # (goes together with [org/gnome/shell/extensions/dash-to-dock] > hot-keys) @@ -186,17 +241,24 @@ switch-to-application-7=@as [] switch-to-application-8=@as [] switch-to-application-9=@as [] switch-to-application-10=@as [] -toggle-message-tray=['v'] + +toggle-message-tray=['V'] toggle-overview=@as [] + [org/gnome/terminal/legacy/keybindings] -close-tab='w' -close-window='q' -find='f' -find-clear='j' -find-next='n' -find-previous='h' -new-tab='t' -new-window='n' -zoom-in='plus' + +close-tab='W' +close-window='Q' + +find='F' +find-clear='J' +find-next='N' +find-previous='H' + +new-tab='T' +new-window='N' + +zoom-in='Plus' # default: zoom-out='minus' +