From dc52aa597fea74a7e63e4af84e55e086d0acfcf2 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sat, 2 Oct 2021 13:05:15 +0200 Subject: [PATCH] [StumpWM] Add convenience keybindings --- org/config/stumpwm.org | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/org/config/stumpwm.org b/org/config/stumpwm.org index 612cca8..e39388a 100644 --- a/org/config/stumpwm.org +++ b/org/config/stumpwm.org @@ -1057,6 +1057,12 @@ similar keybinds. (define-key *groups-map* (kbd "G") "vgroups") #+end_src +I grew accustomed to ~s-ESC~ bringing me to the previous group when +using AwesomeWM, so let’s define that: +#+begin_src lisp + (define-key *top-map* (kbd "s-ESC") "gother") +#+end_src + ** Frames and Windows management :PROPERTIES: :CUSTOM_ID: Keybinds-Frames-and-Windows-management-g4s6j371v5j0 @@ -1174,6 +1180,12 @@ redefine it: ((kbd "r") "resize-direction right")) #+end_src +As with groups management, I grew used to ~s-TAB~ in AwesomeWM bringing +me back to the previously focused window. +#+begin_src lisp + (define-key *top-map* (kbd "s-TAB") "other-window") +#+end_src + ** Windows management :PROPERTIES: :CUSTOM_ID: Keybinds-Windows-management-ylf903j0x5j0 @@ -1293,6 +1305,7 @@ anywhere else: | Keychord | Function | |----------+------------| | ~B~ | ~beckon~ | +| ~C-b~ | ~banish~ | | ~l~ | ~exec plock~ | | ~r~ | ~reload~ | @@ -1300,6 +1313,25 @@ anywhere else: <> #+end_src +From time to time, I need to switch between different keyboard +layouts, especially to the US Qwerty layout when I’m playing some +games and the bépo layout most of the time. I’ll use the command +~switch-layout~ defined above. +#+name: keyboard-layout-map +| Keychord | Function | +|----------+------------------------------| +| ~b~ | ~exec setxkbmap fr bepo_afnor~ | +| ~u~ | ~exec setxkbmap us~ | + +#+begin_src lisp + (defvar *my-keyboard-layout-keymap* + (let ((m (make-sparse-keymap))) + <> + m)) + + (define-key *root-map* (kbd "k") '*my-keyboard-layout-keymap*) +#+end_src + * org functions :noexport: :PROPERTIES: :CUSTOM_ID: org-functions-syqgzgg0m6j0