diff options
author | Thanos Apollo <[email protected]> | 2023-09-03 15:30:20 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-09-03 15:30:20 +0300 |
commit | f7c3db0c688b9b98762464cc9e4cc7c87a9dbe96 (patch) | |
tree | 5d42eadea41d1e6270007c7a82129ee5c93ac5f0 /.stumpwm.d/keybindings.lisp | |
parent | 1d570b3c17d23ae9813769d99a3ed48133d7ee44 (diff) |
stumpwm: modularize
Diffstat (limited to '.stumpwm.d/keybindings.lisp')
-rw-r--r-- | .stumpwm.d/keybindings.lisp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/.stumpwm.d/keybindings.lisp b/.stumpwm.d/keybindings.lisp new file mode 100644 index 0000000..f091ccf --- /dev/null +++ b/.stumpwm.d/keybindings.lisp @@ -0,0 +1,75 @@ + +(defcommand colon1 (&optional (initial "")) (:rest) + (let ((cmd (read-one-line (current-screen) ": " :initial-input initial))) + (when cmd + (eval-command cmd t)))) + +(define-key *root-map* (kbd "C-r") "exec emacsclient -e '(thanos/app-launcher\)'") +(define-key *root-map* (kbd ",") "exec flameshot gui") +(define-key *root-map* (kbd "C-R") "restart-hard") +(define-key *root-map* (kbd "M-r") "restart-soft") +(define-key *root-map* (kbd "p") "exec emacsclient -e '(thanos/pass-launcher)'") +(define-key *root-map* (kbd "F") "float-this") +(define-key *root-map* (kbd "U") "unfloat-this") +(define-key *root-map* (kbd "b") "windowlist") +(define-key *root-map* (kbd "d") "delete-window") +(define-key *root-map* (kbd "C-d") "remove") +;; Focus +(define-key *root-map* (kbd "C-f") "move-focus right") +(define-key *root-map* (kbd "C-b") "move-focus left") + +(defvar *thanos-buffers-map* + (let ((m (make-sparse-keymap))) + (define-key m (kbd "0") "delete-window-and-frame") + (define-key m (kbd "3") "hsplit-and-focus") + (define-key m (kbd "b") "windowlist") + m)) + +(define-key *root-map* (kbd "C-x") *thanos-buffers-map*) + +(define-key *root-map* (kbd "e") "exec emacsclient -c") + +(define-key *root-map* (kbd "C-e") "exec emacs") + +;; Ssh somewhere +(define-key *root-map* (kbd "C-S") "colon1 exec xterm -e ssh ") + +;; Lock screen +(define-key *root-map* (kbd "C-l") "exec slock") + +(define-key *top-map* (kbd "F11") "fullscreen") +;; Audio +(define-key *top-map* (kbd "XF86AudioLowerVolume") "exec pamixer -d 5") +(define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec pamixer -i 5") + +;; x220 specific +(define-key *top-map* (kbd "F1") "exec brightnessctl --device='intel_backlight' set 5%-") +(define-key *top-map* (kbd "F2") "exec brightnessctl --device='intel_backlight' set +5%") +(define-key *top-map* (kbd "F3") "exec ~/.scripts/keyboard-light-x220.sh") + + ;;; Groups +;; Switch to group +(define-key *root-map* (kbd "M-1") "gselect 1") +(define-key *root-map* (kbd "M-2") "gselect 2") +(define-key *root-map* (kbd "M-3") "gselect 3") +(define-key *root-map* (kbd "M-4") "gselect 4") +(define-key *root-map* (kbd "M-5") "gselect 5") +(define-key *root-map* (kbd "M-6") "gselect 6") +(define-key *root-map* (kbd "M-7") "gselect 7") +(define-key *root-map* (kbd "M-0") "gselect 5") +(define-key *root-map* (kbd "M-9") "gselect") +;; Move window to group +(define-key *root-map* (kbd "M-!") "gmove 1") +(define-key *root-map* (kbd "M-@") "gmove 2") +(define-key *root-map* (kbd "M-#") "gmove 3") +(define-key *root-map* (kbd "M-$") "gmove 4") +(define-key *root-map* (kbd "M-%") "gmove 5") +(define-key *root-map* (kbd "M-^") "gmove 6") +(define-key *root-map* (kbd "M-)") "gmove 5") +(define-key *root-map* (kbd "M-(") "gmove") +;; Focus +(define-key *root-map* (kbd "M-b") "move-window left") +(define-key *root-map* (kbd "M-f") "move-window right") +(define-key *root-map* (kbd "M-n") "move-window down") + +(define-key *root-map* (kbd "s") "Duck") |