3 # Herbstluftm configuration file.
5 # Copyright (C) 2014 Simon Ruderich
7 # This file is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This file is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this file. If not, see <http://www.gnu.org/licenses/>.
28 # Tell all clients the configuration file was reloaded. Should be the first
29 # command in the autostart file.
35 # Modifier used for all herbstluftwm key bindings.
38 # Remove all existing key bindings.
42 hc keybind $mod-Shift-Return spawn urxvt
43 hc keybind $mod-Shift-c close
44 hc keybind $mod-q reload
45 hc keybind $mod-Shift-q quit
46 # Lock the screen. The sleep is necessary to allow xtrlock to grab the
48 hc keybind $mod-z spawn sh -c 'sleep 1 && exec xtrlock'
50 # Tag key bindings. Create tags 1 to 9 with bindings to switch and move
52 hc rename default 1 2>/dev/null || true
53 for i in `seq 1 9`; do
55 hc keybind "$mod-$i" use "$i"
56 hc keybind "$mod-Shift-$i" move "$i"
58 # Switch to last active tag.
59 hc keybind $mod-b use_previous
61 # Layouting key bindings.
62 hc keybind $mod-space cycle_layout 1 horizontal max # toggle these layouts
63 hc keybind $mod-u split vertical 0.5
64 hc keybind $mod-o split horizontal 0.5
65 hc keybind $mod-r remove # remove a split
66 # Change window state.
67 hc keybind $mod-f fullscreen toggle
70 hc keybind $mod-h focus left
71 hc keybind $mod-j focus down
72 hc keybind $mod-k focus up
73 hc keybind $mod-l focus right
75 hc keybind $mod-Shift-h shift left
76 hc keybind $mod-Shift-j shift down
77 hc keybind $mod-Shift-k shift up
78 hc keybind $mod-Shift-l shift right
83 # Remove all existing key bindings.
87 # WINDOW and FRAME SETTINGS
89 # No border for frames, only for windows.
90 hc set frame_border_width 0
91 hc set window_border_width 1
92 # No gaps between frames or windows.
95 # Inactive window borders are black, almost invisible on my black screen.
96 # Active window borders are dark red.
97 hc set window_border_normal_color '#000000'
98 hc set window_border_active_color '#990000'
99 # Transparent background for empty frames.
100 hc set frame_bg_transparent 1
102 # Use vertical layout for windows in frames per default.
103 hc set default_frame_layout 1 # vertical
108 # Run only on startup, not when reloading the config. Thanks to The-Compiler
109 # in #herbstluftwm on Freenode (2014-01-10 16:26 CET) for the idea to use
110 # environment variables.
111 if ! hc getenv HLWMRC_LOADED >/dev/null; then
112 hc setenv HLWMRC_LOADED 1
114 # Setup my layout: Vertical split with my main terminal window in the top
115 # frame, secondary windows in the bottom frame.
116 hc split vertical 0.5
122 # Remove all existing rules.
125 # * Do not focus new clients (default).
126 # * Don't allow clients to toggle fullscreen via EWMH.
127 # * Move new windows to the frame at the bottom of the screen.
133 # After everything is done, allow redrawing of the windows.
139 sed 's/\^/^^/g' | dzen2 -fg blue -bg yellow -y 15 -h 30 -p "$@"
142 # To notify me if set -e has terminated the script (then this part won't get
144 echo 'hlwm restarted' | notify 1