Initial commit.

Commit
6c54064944c1799eaa275068ea66b8d02ed76eca
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
Changed files
.gitignore
index 00000000..9088b08f 000000..100644
@@ -0,0 +1,2 @@
1 Added: auto/
2 Added: *.pdf
config-herbstluftwm-autostart.org
index 00000000..07dd6c1c 000000..100755
@@ -0,0 +1,326 @@
1 Added: # -*- mode: org; -*-
2 Added:
3 Added: #+TITLE: {{{hl}}} configuration file
4 Added: #+AUTHOR: Marius Peter
5 Added: #+DATE: <2021-08-01 Sun>
6 Added:
7 Added: #+PROPERTY: header-args :tangle ~/.config/herbstluftwm/autostart :shebang "#!/usr/bin/env bash"
8 Added:
9 Added: #+SETUPFILE: ~/.emacs.d/templates/documents/gnu-default.setup
10 Added: #+INCLUDE: ~/.emacs.d/templates/documents/default-title.org
11 Added:
12 Added: #+MACRO: hl Herbstluftwm
13 Added:
14 Added: * Introduction
15 Added:
16 Added: {{{hl}}} is a manual tiling window manager. It has the particularity
17 Added: of being configured via the ~herbstclient~ program.
18 Added: hc keybind $Mod-p spawn dmenu_run_hlwm
19 Added:
20 Added: #+begin_center
21 Added: \Huge\textbf{Herbstluft}\\
22 Added: \normalsize\textit{autumn air}
23 Added: #+end_center
24 Added:
25 Added: * Early setup
26 Added:
27 Added: ** Definitions
28 Added:
29 Added: This is my literate configuration for Herbstluftwm.
30 Added:
31 Added: #+BEGIN_SRC shell
32 Added: hc() {
33 Added: herbstclient "$@"
34 Added: }
35 Added: #+END_SRC
36 Added:
37 Added: Choice of Modkey. Mod1 is Alt, Mod4 is Super.
38 Added:
39 Added: #+BEGIN_SRC shell
40 Added: Mod=Mod4
41 Added: #+END_SRC
42 Added:
43 Added: ** ~Plank~ dock
44 Added:
45 Added: #+BEGIN_SRC shell
46 Added: killall plank
47 Added: plank &
48 Added: #+END_SRC
49 Added:
50 Added:
51 Added: ** TODO Basic
52 Added:
53 Added: We make {{{hl}}} execute code associated with the ~reload~ hook.
54 Added:
55 Added: #+BEGIN_SRC shell
56 Added: hc emit_hook reload
57 Added: #+END_SRC
58 Added:
59 Added: We set the color of the default window bar.
60 Added:
61 Added: #+BEGIN_SRC shell
62 Added: xsetroot -solid '#5A8E3A'
63 Added: #+END_SRC
64 Added:
65 Added: We remove all existing keybindings.
66 Added:
67 Added: #+BEGIN_SRC shell
68 Added: hc keyunbind --all
69 Added: #+END_SRC
70 Added:
71 Added: * keybindings
72 Added:
73 Added: If you have a super key you will be much happier with Mod set to Mod4.
74 Added:
75 Added: ** Basic
76 Added:
77 Added: #+BEGIN_SRC shell
78 Added: hc keybind $Mod-p spawn dmenu_run
79 Added:
80 Added: hc keybind $Mod-Shift-q quit
81 Added: hc keybind $Mod-Shift-r reload
82 Added: hc keybind $Mod-Shift-c close
83 Added: #+END_SRC
84 Added:
85 Added: ** Spawn a terminal
86 Added:
87 Added: We use our $TERMINAL with ~st~ as fallback.
88 Added:
89 Added: #+BEGIN_SRC shell
90 Added: hc keybind $Mod-Return spawn "${TERMINAL:-st}"
91 Added: #+END_SRC
92 Added:
93 Added: ** Movement
94 Added:
95 Added: Basic movement in tiling and floating mode focusing clients.
96 Added:
97 Added: #+BEGIN_SRC shell
98 Added: hc keybind $Mod-Left focus left
99 Added: hc keybind $Mod-Down focus down
100 Added: hc keybind $Mod-Up focus up
101 Added: hc keybind $Mod-Right focus right
102 Added: hc keybind $Mod-h focus left
103 Added: hc keybind $Mod-j focus down
104 Added: hc keybind $Mod-k focus up
105 Added: hc keybind $Mod-l focus right
106 Added: #+END_SRC
107 Added:
108 Added: Moving clients in tiling and floating mode.
109 Added:
110 Added: #+BEGIN_SRC shell
111 Added: hc keybind $Mod-Shift-Left shift left
112 Added: hc keybind $Mod-Shift-Down shift down
113 Added: hc keybind $Mod-Shift-Up shift up
114 Added: hc keybind $Mod-Shift-Right shift right
115 Added: hc keybind $Mod-Shift-h shift left
116 Added: hc keybind $Mod-Shift-j shift down
117 Added: hc keybind $Mod-Shift-k shift up
118 Added: hc keybind $Mod-Shift-l shift right
119 Added: #+END_SRC
120 Added:
121 Added: ** Splitting frames
122 Added:
123 Added: Create an empty frame at the specified direction.
124 Added:
125 Added: #+BEGIN_SRC shell
126 Added: hc keybind $Mod-u split bottom 0.5
127 Added: hc keybind $Mod-o split left 0.5
128 Added: #+END_SRC
129 Added:
130 Added: We let the current frame explode into subframes.
131 Added:
132 Added: #+BEGIN_SRC shell
133 Added: hc keybind $Mod-Control-space split explode
134 Added: #+END_SRC
135 Added:
136 Added: ** Resizing frames and clients
137 Added:
138 Added: Resizing frames and floating clients.
139 Added:
140 Added: #+BEGIN_SRC shell
141 Added: resizestep=0.02
142 Added: hc keybind $Mod-Control-h resize left +$resizestep
143 Added: hc keybind $Mod-Control-j resize down +$resizestep
144 Added: hc keybind $Mod-Control-k resize up +$resizestep
145 Added: hc keybind $Mod-Control-l resize right +$resizestep
146 Added: hc keybind $Mod-Control-Left resize left +$resizestep
147 Added: hc keybind $Mod-Control-Down resize down +$resizestep
148 Added: hc keybind $Mod-Control-Up resize up +$resizestep
149 Added: hc keybind $Mod-Control-Right resize right +$resizestep
150 Added: #+END_SRC
151 Added:
152 Added: ** Tags
153 Added:
154 Added: *** Basic definitions
155 Added:
156 Added: #+BEGIN_SRC shell
157 Added: # tags
158 Added: tag_names=( {1..9} )
159 Added: tag_keys=( {1..9} 0 )
160 Added:
161 Added: hc rename default "${tag_names[0]}" || true
162 Added: for i in "${!tag_names[@]}" ; do
163 Added: hc add "${tag_names[$i]}"
164 Added: key="${tag_keys[$i]}"
165 Added: if ! [ -z "$key" ] ; then
166 Added: hc keybind "$Mod-$key" use_index "$i"
167 Added: hc keybind "$Mod-Shift-$key" move_index "$i"
168 Added: fi
169 Added: done
170 Added: #+END_SRC
171 Added:
172 Added: *** Cycling
173 Added:
174 Added: #+BEGIN_SRC shell
175 Added: # cycle through tags
176 Added: hc keybind $Mod-period use_index +1 --skip-visible
177 Added: hc keybind $Mod-comma use_index -1 --skip-visible
178 Added:
179 Added: #+END_SRC
180 Added:
181 Added: *** Layouting
182 Added:
183 Added: #+BEGIN_SRC shell
184 Added: hc keybind $Mod-r remove
185 Added: hc keybind $Mod-s floating toggle # Schwebend = floating!
186 Added: hc keybind $Mod-f fullscreen toggle
187 Added: hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle
188 Added: hc keybind $Mod-Shift-m set_attr clients.focus.minimized true
189 Added: hc keybind $Mod-Control-m jumpto last-minimized
190 Added: # hc keybind $Mod-p pseudotile toggle
191 Added: # The following cycles through the available layouts within a frame, but skips
192 Added: # layouts, if the layout change wouldn't affect the actual window positions.
193 Added: # I.e. if there are two windows within a frame, the grid layout is skipped.
194 Added: hc keybind $Mod-space \
195 Added: or , and . compare tags.focus.curframe_wcount = 2 \
196 Added: . cycle_layout +1 vertical horizontal max vertical grid \
197 Added: , cycle_layout +1
198 Added: #+END_SRC
199 Added:
200 Added: *** Mouse bindings
201 Added:
202 Added: #+BEGIN_SRC shell
203 Added: # mouse
204 Added: hc mouseunbind --all
205 Added: hc mousebind $Mod-Button1 move
206 Added: hc mousebind $Mod-Button2 zoom
207 Added: hc mousebind $Mod-Button3 resize
208 Added: #+END_SRC
209 Added:
210 Added: *** Cycle monitors
211 Added:
212 Added: #+BEGIN_SRC shell
213 Added: # focus
214 Added: hc keybind $Mod-BackSpace cycle_monitor
215 Added: hc keybind $Mod-Tab cycle_all +1
216 Added: hc keybind $Mod-Shift-Tab cycle_all -1
217 Added: hc keybind $Mod-c cycle
218 Added: hc keybind $Mod-i jumpto urgent
219 Added: #+END_SRC
220 Added:
221 Added: * Theme
222 Added:
223 Added: ** Basic
224 Added:
225 Added: #+BEGIN_SRC shell
226 Added: hc attr theme.tiling.reset 1
227 Added: hc attr theme.floating.reset 1
228 Added: #+END_SRC
229 Added:
230 Added: ** Frames
231 Added:
232 Added: #+BEGIN_SRC shell
233 Added: hc set frame_border_active_color '#222222cc'
234 Added: hc set frame_border_normal_color '#101010cc'
235 Added: hc set frame_bg_normal_color '#565656aa'
236 Added: hc set frame_bg_active_color '#345F0Caa'
237 Added: hc set frame_border_width 1
238 Added: hc set always_show_frame on
239 Added: hc set frame_bg_transparent on
240 Added: hc set frame_transparent_width 5
241 Added: hc set frame_gap 4
242 Added: #+END_SRC
243 Added:
244 Added: ** Windows
245 Added:
246 Added: #+BEGIN_SRC shell
247 Added: hc attr theme.title_height 24
248 Added: hc attr theme.title_font 'Hack:pixelsize=20' # example using Xft
249 Added: # hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
250 Added: hc attr theme.padding_top 4 # space below the title's baseline (i.e. text depth)
251 Added: hc attr theme.active.color '#345F0Cef'
252 Added: hc attr theme.title_color '#ffffff'
253 Added: hc attr theme.normal.color '#323232dd'
254 Added: hc attr theme.urgent.color '#7811A1dd'
255 Added: hc attr theme.normal.title_color '#898989'
256 Added: hc attr theme.inner_width 1
257 Added: hc attr theme.inner_color black
258 Added: hc attr theme.border_width 3
259 Added: hc attr theme.floating.border_width 12
260 Added: hc attr theme.floating.outer_width 1
261 Added: hc attr theme.floating.outer_color black
262 Added: hc attr theme.active.inner_color '#789161'
263 Added: hc attr theme.urgent.inner_color '#9A65B0'
264 Added: hc attr theme.normal.inner_color '#606060'
265 Added: # copy inner color to outer_color
266 Added: for state in active urgent normal ; do
267 Added: hc substitute C theme.${state}.inner_color \
268 Added: attr theme.${state}.outer_color C
269 Added: done
270 Added: hc attr theme.active.outer_width 1
271 Added: hc attr theme.background_color '#141414'
272 Added: #+END_SRC
273 Added:
274 Added: ** Window appearance
275 Added:
276 Added: #+BEGIN_SRC shell
277 Added: hc set window_gap 24
278 Added: hc set frame_padding 0
279 Added: hc set smart_window_surroundings on
280 Added: hc set smart_frame_surroundings on
281 Added: hc set mouse_recenter_gap 0
282 Added: #+END_SRC
283 Added:
284 Added: ** Rules
285 Added:
286 Added: #+BEGIN_SRC shell
287 Added: hc unrule -F
288 Added: #hc rule class=XTerm tag=3 # move all xterms to tag 3
289 Added: hc rule focus=on # normally focus new clients
290 Added: hc rule floatplacement=smart
291 Added: #hc rule focus=off # normally do not focus new clients
292 Added: # give focus to most common terminals
293 Added: #hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
294 Added: hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
295 Added: hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
296 Added: hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
297 Added:
298 Added: hc set tree_style '╾│ ├└╼─┐'
299 Added:
300 Added: #+END_SRC
301 Added:
302 Added: ** Unlock monitors
303 Added:
304 Added: #+BEGIN_SRC shell
305 Added: hc unlock
306 Added: #+END_SRC
307 Added:
308 Added: ** Multi-monitor setup
309 Added:
310 Added: #+BEGIN_SRC shell
311 Added: # do multi monitor setup here, e.g.:
312 Added: # hc set_monitors 1280x1024+0+0 1280x1024+1280+0
313 Added: # or simply:
314 Added: # hc detect_monitors
315 Added: #+END_SRC
316 Added:
317 Added: ** Panel
318 Added:
319 Added: #+BEGIN_SRC shell
320 Added: panel=~/.config/herbstluftwm/panel.sh
321 Added: [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
322 Added: for monitor in $(hc list_monitors | cut -d: -f1) ; do
323 Added: # start it on each monitor
324 Added: "$panel" "$monitor" &
325 Added: done
326 Added: #+END_SRC