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 don't understand how cwm is meant to be used by deafult since I'm used
32 to window managers with "tags" (or "workspaces"). Fortunately I can
33 enable "sticky" mode on cwm to simulate workspaces
35 sticky yes
37 I also prefer to "snap" windows close to the edges
39 snapdist 5
41 with cwm I usually use tint2 as bar, either at the top or at the bottom.
42 cwm doesn't account the space for it automatically like other window
43 manager, we have to do that manually
45 gap 0 30 0 0
47 I don't want to give focus to some applications via alt-tab
49 ignore sshmenu
50 ignore stalonetray
51 ignore stats
52 ignore termbar
53 ignore xclock
54 ignore xconsole
55 ignore Catclock
56 ignore "Speedbar 1.0"
58 autogroup does what it seems: it automatically moves some windows in a
59 specific group (aka workspace.) The group 0 is sticky across all groups
61 autogroup 0 XClock
62 autogroup 0 Catclock
63 autogroup 0 XConsole
64 autogroup 0 sshmenu,Xmessage
65 autogroup 0 stalonetray
66 autogroup 0 stats
67 autogroup 0 termbar
68 autogroup 2 Firefox
69 autogroup 3 Gajim
70 autogroup 3 TelegramDesktop
72 Most cwm keybindings use `alt' which conflicts with emacs. So I unbind
73 everything and re-bind most of the keys on the mod4 (super) key
75 unbind-key all
77 bind-key 4-Tab group-last
78 bind-mouse C-3 menu-exec-wm
79 bind-key C4-slash menu-window
81 eat up multimedia keys so they don't get seen by some programs (like
82 emacs or sam)
84 bind-key XF86AudioLowerVolume true
85 bind-key XF86AudioRaiseVolume true
87 control the playback
89 bind-key XF86AudioPrev "amused prev"
90 bind-key XF86AudioNext "amused next"
91 bind-key XF86AudioPlay "amused toggle"
92 bind-key XF86AudioStop "amused stop"
94 "gamemode" swiches the keyboard from my custom dvp-eu to an us querty
95 and vice-versa, and the mouse buttons too. it's useful when playing
96 some games, hence the name, or when in need to share the keyboard with
97 someone else.
99 bind-key 4-F5 "gamemode"
101 I don't have a dedicated key for screenshot on this machine, but
102 Scroll_Lock is not too awkward to press
104 bind-key 4-Scroll_Lock "sshot -c"
105 bind-key 4S-Scroll_Lock "sshot -cs"
107 manage the notifications
109 bind-key 4-space "dunstctl close"
110 bind-key 4S-space "dunstctl history-pop"
111 bind-key 4-n "dunstctl context"
113 basics window movements
115 bind-key 4-h window-move-left
116 bind-key 4-j window-move-down
117 bind-key 4-k window-move-up
118 bind-key 4-l window-move-right
120 bind-key S4-h window-move-left-big
121 bind-key S4-j window-move-down-big
122 bind-key S4-k window-move-up-big
123 bind-key S4-l window-move-right-big
125 bind-key C4-h window-resize-left
126 bind-key C4-j window-resize-down
127 bind-key C4-k window-resize-up
128 bind-key C4-l window-resize-right
130 bind-key CS4-h window-resize-left-big
131 bind-key CS4-j window-resize-down-big
132 bind-key CS4-k window-resize-up-big
133 bind-key CS4-l window-resize-right-big
135 bind-key 4-greater window-raise
136 bind-key 4-less window-lower
138 bind-key 4-Return window-hide
139 bind-key C4-x window-close
140 bind-key C4-c window-close
142 bind-key 4-slash menu
143 bind-key 4-at jgmenu_run
145 bind-key CM-Return xterm # kitty
146 bind-key C4-Return "emacsclient -c"
147 bind-key CS4-Return "env SHELL=rc 9term"
149 bind-key M-Tab window-cycle
150 bind-key MS-Tab window-rcycle
152 bind-key 4-f window-maximize
153 bind-key C4S-v window-vmaximize
154 bind-key C4S-w window-hmaximize
156 htile 0
157 vtile 0
158 bind-key 4-w window-htile
159 bind-key 4-v window-vtile
161 bind-key C4S-q quit
163 I'm using a custom keyboard layout based on the dvorak-programmer.
164 Thus, the upper row is not numbers, but symbols!
166 # & { [ ( = + ) ] }
167 bind-key 4-ampersand group-only-1
168 bind-key 4-braceleft group-only-2
169 bind-key 4-bracketleft group-only-3
170 bind-key 4-parenleft group-only-4
171 bind-key 4-equal group-only-5
172 bind-key 4-plus group-only-6
173 bind-key 4-parenright group-only-7
174 bind-key 4-bracketright group-only-8
175 bind-key 4-braceright group-only-9
177 move with shift
179 bind-key S4-ampersand window-movetogroup-1
180 bind-key S4-braceleft window-movetogroup-2
181 bind-key S4-bracketleft window-movetogroup-3
182 bind-key S4-parenleft window-movetogroup-4
183 bind-key S4-equal window-movetogroup-5
184 bind-key S4-plus window-movetogroup-6
185 bind-key S4-parenright window-movetogroup-7
186 bind-key S4-bracketright window-movetogroup-8
187 bind-key S4-braceright window-movetogroup-9
188 bind-key S4-exclam window-movetogroup-0
190 use ctrl to toggle visibility
192 bind-key C4-ampersand group-toggle-1
193 bind-key C4-braceleft group-toggle-2
194 bind-key C4-bracketleft group-toggle-3
195 bind-key C4-parenleft group-toggle-4
196 bind-key C4-equal group-toggle-5
197 bind-key C4-plus group-toggle-6
198 bind-key C4-parenright group-toggle-7
199 bind-key C4-bracketright group-toggle-8
200 bind-key C4-braceright group-toggle-9
202 mouse bindings
204 bind-mouse 4-1 window-move
205 bind-mouse 4-3 window-resize