-
Notifications
You must be signed in to change notification settings - Fork 0
/
keybindings.lisp
109 lines (100 loc) · 2.82 KB
/
keybindings.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
(uiop:define-package :stumpwm-init/keybindings
(:use :cl)
(:import-from :stumpwm
#:set-prefix-key #:kbd)
(:import-from :stumpwm-init/volume)
(:import-from :stumpwm-init/keybinding-macros
#:super-key-maps
#:windowed-app-launcher
#:s-
#:s-l
#:bind)
(:import-from :stumpwm-init/personal-keys)
(:export
#:s-x
#:s-e
#:s-h
#:s-t
#:s-g
#:alsamixer
#:pavucontrol
#:nmtui
#:firefox
#:thunderbird
#:emacsclient
#:google-chrome
#:uxterm
#:retroarch))
(cl:in-package :stumpwm-init/keybindings)
;; (set-prefix-key (kbd "s-F11"))
(set-prefix-key (kbd "C-'"))
(super-key-maps (*s-x-map* x)
(*emacs-map* e)
(stumpwm:*help-map* h)
(stumpwm:*root-map* t)
(stumpwm:*groups-map* g))
;;; s-
;; n and p move to the next and previous group
(s- "n" "gnext")
(s- "N" "gnext-with-window")
(s- "p" "gprev")
(s- "P" "gprev-with-window")
;; f and b move forward and backward frames
(s- "f" "next-frame")
(s- "F" "move-window-next-frame")
(s- "b" "previous-frame")
(s- "B" "move-window-previous-frame")
;; tab and shift-tab switch windows within a frame
(s- "TAB" "pull-hidden-next")
;; on my laptop, shift+tab sends ISO_Left_Tab.
(s- "ISO_Left_Tab" "pull-hidden-previous")
;; this is analogous to emacs' M-x, it reads a command name from the user & runs it
(s- ";" "colon")
;; these bindings mimic emacs' M-: (eval) and M-! (run-shell-command).
(s- ":" "eval")
(s- "!" "exec")
;;; s-l
;; a for alsamixer
(windowed-app-launcher alsamixer a :xterm-wrapper t)
;; p for pavucontrol
(windowed-app-launcher pavucontrol p)
;; w for wifi
(windowed-app-launcher nmtui w :xterm-wrapper t)
;; f for firefox
(windowed-app-launcher firefox f)
;; m for mail
(windowed-app-launcher thunderbird m)
;; e for emacs
(windowed-app-launcher emacsclient e :command-line-args "-c"
:class "Emacs")
;; c for chrome
;; (windowed-app-launcher google-chrome c)
;; t for terminal
(windowed-app-launcher uxterm t)
;; r for retroarch
(windowed-app-launcher retroarch r)
;;; s-x
;; k for kill (even tho stumpwm calls it "delete" sometimes)
(s-x "k" "delete")
(s-x "K" "kill")
;; m for modeline
(s-x "m" "mode-line")
;; these mimic emacs' C-x 0, C-x 1, C-x 2, and C-x 3
(s-x "0" "remove-split")
(s-x "1" "only")
(s-x "2" "vsplit")
(s-x "3" "hsplit")
;; these emacsclient aliases don't exist in this config.
;;; s-e
(s-e "c" "emacsclient-create-window")
(s-e ";" "emacsclient-eval")
(s-e "d" "emacsclient-debug")
(s-e "s" "emacs-status")
;;; multimedia keys
(bind "XF86MonBrightnessUp" "brightness-5%+")
(bind "S-XF86MonBrightnessUp" "brightness-1%+")
(bind "XF86MonBrightnessDown" "brightness-5%-")
(bind "S-XF86MonBrightnessDown" "brightness-1%-")
(bind "XF86AudioRaiseVolume" "volume-10+")
(bind "XF86AudioLowerVolume" "volume-10-")
(bind "XF86AudioMute" "toggle-mute")