Blob


1 # calm window manager
3 The calm window manager, cwm for short, is my favourite window manager.
4 It's *the* window manager that convinced me that using a floating window
5 manager was actually worth it.
7 My configuration is unusually long.
9 First I have a list of applications for the built-in menu:
11 command emacsclient "emacsclient -c"
12 command firefox firefox
13 command gimp gimp
14 command godot godot
15 command inkscape inkscape
16 command iridium iridium
17 command keepassxc keepassxc
18 command lock xlock
19 command term xterm
20 command xterm.jp xterm.jp
22 I found these color by random I guess, but they're fine
24 color activeborder "#0abeff"
25 color inactiveborder "#777"
27 set a decently-sized border around every window
29 borderwidth 2
31 I've started to use cwm without "sticky" tags. Enabling the sticky mode
32 makes cwm behave like other windows managers with "tags" (or
33 "workspaces".) Without sticky tags, you can decide with more granularly
34 which window to show and which not.
36 # sticky yes
38 I also prefer to "snap" windows close to the edges
40 snapdist 5
42 I don't want to give focus to some applications via alt-tab
44 ignore sshmenu
45 ignore stalonetray
46 ignore stats
47 ignore termbar
48 ignore xclock
49 ignore xconsole
50 ignore Catclock
51 ignore "Speedbar 1.0"
53 autogroup does what it seems: it automatically moves some windows in a
54 specific group (aka workspace.) The group 0 is sticky across all groups
56 autogroup 0 XClock
57 autogroup 0 Catclock
58 autogroup 0 XConsole
59 autogroup 0 sshmenu,Xmessage
60 autogroup 0 stalonetray
61 autogroup 0 stats
62 autogroup 0 termbar
63 autogroup 2 Firefox
64 autogroup 3 Gajim
65 autogroup 3 TelegramDesktop
67 Most cwm keybindings use `alt' which conflicts with emacs. So I unbind
68 everything and re-bind most of the keys on the mod4 (super) key
70 unbind-key all
72 bind-key 4-Tab group-last
73 bind-mouse C-3 menu-exec-wm
74 bind-key C4-slash menu-window
76 control the playback
78 bind-key XF86AudioPrev "amused prev"
79 bind-key XF86AudioNext "amused next"
80 bind-key XF86AudioPlay "amused toggle"
81 bind-key XF86AudioStop "amused stop"
83 "gamemode" swiches the keyboard from my custom dvp-eu to an us querty
84 and vice-versa, and the mouse buttons too. it's useful when playing
85 some games, hence the name, or when in need to share the keyboard with
86 someone else.
88 bind-key 4-F5 "gamemode"
90 I don't have a dedicated key for screenshot on this machine, but
91 Scroll_Lock is not too awkward to press
93 bind-key 4-Scroll_Lock "sshot -c"
94 bind-key 4S-Scroll_Lock "sshot -cs"
96 manage the notifications
98 bind-key 4-space "pkill -SIGUSR1 xnotify"
100 basics window movements
102 bind-key 4-h window-move-left
103 bind-key 4-j window-move-down
104 bind-key 4-k window-move-up
105 bind-key 4-l window-move-right
107 bind-key S4-h window-move-left-big
108 bind-key S4-j window-move-down-big
109 bind-key S4-k window-move-up-big
110 bind-key S4-l window-move-right-big
112 bind-key C4-h window-resize-left
113 bind-key C4-j window-resize-down
114 bind-key C4-k window-resize-up
115 bind-key C4-l window-resize-right
117 bind-key CS4-h window-resize-left-big
118 bind-key CS4-j window-resize-down-big
119 bind-key CS4-k window-resize-up-big
120 bind-key CS4-l window-resize-right-big
122 bind-key 4-greater window-raise
123 bind-key 4-less window-lower
125 bind-key 4-Return window-hide
126 bind-key C4-x window-close
127 bind-key C4-c window-close
129 bind-key 4-slash menu
131 bind-key CM-Return xterm # kitty
132 bind-key C4-Return "emacsclient -c"
133 bind-key CS4-Return "env SHELL=rc 9term"
135 bind-key M-Tab window-cycle
136 bind-key MS-Tab window-rcycle
138 bind-key 4-f window-maximize
139 bind-key C4S-v window-vmaximize
140 bind-key C4S-w window-hmaximize
142 htile 0
143 vtile 0
144 bind-key 4-w window-htile
145 bind-key 4-v window-vtile
147 bind-key C4S-q quit
149 I'm using a custom keyboard layout based on the dvorak-programmer.
150 Thus, the upper row is not numbers, but symbols!
152 # & { [ ( = + ) ] }
153 bind-key 4-ampersand group-toggle-1
154 bind-key 4-braceleft group-toggle-2
155 bind-key 4-bracketleft group-toggle-3
156 bind-key 4-parenleft group-toggle-4
157 bind-key 4-equal group-toggle-5
158 bind-key 4-plus group-toggle-6
159 bind-key 4-parenright group-toggle-7
160 bind-key 4-bracketright group-toggle-8
161 bind-key 4-braceright group-toggle-9
163 move with shift
165 bind-key S4-ampersand window-movetogroup-1
166 bind-key S4-braceleft window-movetogroup-2
167 bind-key S4-bracketleft window-movetogroup-3
168 bind-key S4-parenleft window-movetogroup-4
169 bind-key S4-equal window-movetogroup-5
170 bind-key S4-plus window-movetogroup-6
171 bind-key S4-parenright window-movetogroup-7
172 bind-key S4-bracketright window-movetogroup-8
173 bind-key S4-braceright window-movetogroup-9
174 bind-key S4-exclam window-movetogroup-0
176 mouse bindings
178 bind-mouse 4-1 window-move
179 bind-mouse 4-3 window-resize