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
|
(use-modules (wm))
(define config
(make-config
;; Border sizes
2 ; inner-border-width
0 ; outer-border-width
16 ; magnet-border-width
;; Margins
0 ; offset-x
0 ; offset-y
0 ; offset-width
0 ; offset-height
;; Colors
"#35586c" ; focused-color
"#333333" ; unfocused-color
"#ff6666" ; unkillable-color
"#000000" ; empty-color
"#0d131a" ; outer-color
))
(define wm-keybindings
`((,(make-shift-key "q") . ,wm-quit)
(,(make-key "q") . ,wm-focus-close)
;; Focus
(,(make-key "Tab") . ,wm-focus-prev)
(,(make-shift-key "Tab") . ,wm-focus-next)
(,(make-key "k") . ,wm-focus-prev)
(,(make-key "j") . ,wm-focus-next)
;; Packing
(,(make-shift-key "Left") . ,wm-pack-left)
(,(make-shift-key "Right") . ,wm-pack-left)
(,(make-shift-key "Up") . ,wm-pack-top)
(,(make-shift-key "Down") . ,wm-pack-bottom)
;; Toggle between normal and tiled in a certain position
(,(make-key "s") . ,wm-toggle-maximize)
(,(make-key "a") . ,wm-toggle-half-left)
(,(make-key "Left") . ,wm-toggle-half-left)
(,(make-key "d") . ,wm-toggle-half-right)
(,(make-key "Right") . ,wm-toggle-half-right)
(,(make-key "w") . ,wm-toggle-half-top)
(,(make-key "Up") . ,wm-toggle-half-top)
(,(make-key "x") . ,wm-toggle-half-bottom)
(,(make-key "Down") . ,wm-toggle-half-bottom)
(,(make-key "q") . ,wm-toggle-top-left)
(,(make-key "e") . ,wm-toggle-top-right)
(,(make-key "z") . ,wm-toggle-bottom-left)
(,(make-key "c") . ,wm-toggle-bottom-right)
;; Set current workspace
(,(make-key "1") . ,wm-set-workspace)
(,(make-key "2") . ,wm-set-workspace)
(,(make-key "3") . ,wm-set-workspace)
(,(make-key "4") . ,wm-set-workspace)
(,(make-key "5") . ,wm-set-workspace)
(,(make-key "6") . ,wm-set-workspace)
(,(make-key "7") . ,wm-set-workspace)
(,(make-key "8") . ,wm-set-workspace)
(,(make-key "9") . ,wm-set-workspace)
;; Send client to workspace
(,(make-shift-key "1") . ,wm-set-focused-client-workspace)
(,(make-shift-key "2") . ,wm-set-focused-client-workspace)
(,(make-shift-key "3") . ,wm-set-focused-client-workspace)
(,(make-shift-key "4") . ,wm-set-focused-client-workspace)
(,(make-shift-key "5") . ,wm-set-focused-client-workspace)
(,(make-shift-key "6") . ,wm-set-focused-client-workspace)
(,(make-shift-key "7") . ,wm-set-focused-client-workspace)
(,(make-shift-key "8") . ,wm-set-focused-client-workspace)
(,(make-shift-key "9") . ,wm-set-focused-client-workspace)
;; Send client to monitor
(,(make-shift-key "i") . ,wm-client-monitor-prev)
(,(make-shift-key "o") . ,wm-client-monitor-next)))
(when (wm-init)
(wm-grab-keys wm-keybindings)
(wm-set-key-press-handler!
(lambda (mod keysym)
(display (list mod keysym))
(newline)))
(wm-run)
(wm-quit))
|