-
Notifications
You must be signed in to change notification settings - Fork 1
/
keys.lisp
61 lines (53 loc) · 1.76 KB
/
keys.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
(in-package :stumpwm)
;;(define-key *root-map* (kbd "h") '*help-map*)
(defparameter *top-map-keys*
'(#|("M-space" . "only")
("M-S-space" . "restart-hard")
("C-Escape" . "delete")
("C-S-Escape" . "kill-window")|#
("M-Tab" . "next")
("M-S-Tab" . "prev")
("M-quoteleft" . "gnext")
("M-S-quoteleft" . "gprev")
("H-F2" . "disable-touchpad")
("H-F3" . "enable-touchpad")
("H-F11" . "stop-chrome")
("H-F12" . "continue-chrome")
("XF86AudioMute" . "toggle-volume")
("XF86AudioLowerVolume" . "lower-volume")
("XF86AudioRaiseVolume" . "raise-volume")
("C-XF86AudioLowerVolume" . "minimize-sound")
("C-XF86AudioRaiseVolume" . "maximize-sound")
("XF86AudioMicMute" . "toggle-microphone")
("XF86MonBrightnessDown" . "brightness-down")
("XF86MonBrightnessUp" . "brightness-up"))
"alist of keyboard commands for *top-map*")
(defparameter *root-map-keys*
'(("." . "loadrc")
("c" . "activate-terminator")
("C-c" . "activate-terminator")
("C-q" . "quit")
("E" . "activate-emacs")
("C" . "activate-chromium")
("L" . "lock-screen")
("=" . "show-current-time")
("C-=" . "show-current-time")
("\\" . "reconnect-wifi")
("P" . "activate-pidgin")
("H" . "activate-hexchat")
("e" . "capture-screen")
("Up" . "screen-up")
("Right" . "screen-right")
("Down" . "screen-down")
("Left" . "screen-left"))
"alist of keyboard commands for *root-map*")
(defun map-keys (map keys)
"Map the given keyboard commands KEYS into the MAP"
(loop :for (key . val) :in keys :do
(define-key map (kbd key) val)))
(defun my-keys ()
(set-prefix-key (kbd "C-t"))
(map-keys *top-map* *top-map-keys*)
(map-keys *root-map* *root-map-keys*)
nil)
(register-stumpwm-start-hook 'my-keys)