/
herbstluftwm
executable file
·175 lines (154 loc) · 6.54 KB
/
herbstluftwm
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#!/bin/bash
function hc() { herbstclient "$@"; }
hc emit_hook reload
hc set default_frame_layout 3 # grid
Mod=Mod3
hc keyunbind --all
hc mouseunbind --all
hc unrule --all
#hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close
hc keybind $Mod-Shift-o spawn bash -li -c hclo
hc keybind $Mod-Shift-s spawn bash -li -c hc_smplayer
hc keybind $Mod-Return spawn evilvte -e bash -li
hc keybind $Mod-p spawn dwm_launch prog
hc keybind $Mod-Shift-p spawn dwm_launch smplayer
hc keybind $Mod-q spawn smplayer -send-action stop
hc keybind $Mod-Shift-q spawn smplayer -send-action play
hc keybind $Mod-a spawn smplayer -send-action pause
hc keybind $Mod-Shift-Left spawn smplayer -send-action rewind1
hc keybind $Mod-Shift-Right spawn smplayer -send-action forward1
hc keybind $Mod-Shift-Up spawn smplayer -send-action forward2
hc keybind $Mod-Shift-Down spawn smplayer -send-action rewind2
hc keybind $Mod-m spawn \
/usr/share/doc/herbstluftwm/examples/herbstcommander.sh \
-fn xft:terminus:bold:size=14 \
-nb \#000 -nf \#FA0 -sb \#000 -sf \#0F0
hc keybind $Mod-Up spawn amixer -q sset Master 1+
hc keybind $Mod-Down spawn amixer -q sset Master 1-
TAG_NAMES=( {1..9} )
TAG_KEYS=( {1..9} 0 )
hc rename default "${TAG_NAMES[0]}" || true
for i in ${!TAG_NAMES[@]} ; do
hc add "${TAG_NAMES[$i]}"
key="${TAG_KEYS[$i]}"
if ! [ -z "$key" ] ; then
hc keybind "$Mod-$key" use_index "$i"
hc keybind "$Mod-Shift-$key" move_index "$i"
fi
done
hc keybind $Mod-grave use_previous
hc keybind $Mod-period use_index +1 --skip-visible
hc keybind $Mod-comma use_index -1 --skip-visible
hc keybind $Mod-Shift-period move_index +1 --skip-visible
hc keybind $Mod-Shift-comma move_index -1 --skip-visible
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-u split vertical 0.5
hc keybind $Mod-o split horizontal 0.5
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-Control-p pseudotile toggle
RESIZESTEP=0.02
hc keybind $Mod-Control-h resize left +$RESIZESTEP
hc keybind $Mod-Control-j resize down +$RESIZESTEP
hc keybind $Mod-Control-k resize up +$RESIZESTEP
hc keybind $Mod-Control-l resize right +$RESIZESTEP
hc keybind $Mod-BackSpace cycle_monitor
hc keybind $Mod-w cycle_monitor +1
hc keybind $Mod-e cycle_monitor -1
hc keybind $Mod-Tab cycle_all +1
hc keybind $Mod-Shift-Tab cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-h focus left
hc keybind $Mod-j focus down
hc keybind $Mod-k focus up
hc keybind $Mod-l focus right
#hc keybind $Mod-i jumpto urgent
hc keybind $Mod-Shift-h shift left
hc keybind $Mod-Shift-j shift down
hc keybind $Mod-Shift-k shift up
hc keybind $Mod-Shift-l shift right
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 zoom
hc mousebind $Mod-Button3 resize
hc chain . \
set always_show_frame 1 . \
set smart_frame_surroundings 1 . \
set smart_window_surroundings 0 . \
set frame_gap 8 . \
set frame_padding 0 . \
set window_gap 2 . \
set frame_border_width 2 . \
set frame_border_inner_width 0 . \
set window_border_width 2 . \
set window_border_inner_width 0 . \
set frame_bg_transparent 1 . \
set from_active_opacity 100 . \
set from_normal_opacity 0 . \
set frame_bg_active_color '#000' . \
set frame_bg_normal_color '#000' . \
set frame_border_active_color '#9400d3' . \
set frame_border_normal_color '#d3d3d3' . \
set frame_border_inner_color black . \
set window_border_active_color '#9400d3' . \
set window_border_normal_color '#d3d3d3' . \
set window_border_inner_color black . \
set window_border_urgent_color '#ffaa00'
hc set raise_on_click 0 # prevents manage=off clients from being hidden
hc set focus_follows_mouse 1
hc set focus_crosses_monitor_boundaries 1
hc set gapless_grid 0
hc set swap_monitors_to_get_tag 0
#hc set tree_style "*| +`--."
#hc set tree_style "X|:#+*-."
hc set tree_style "╾│ ├└╼─┐"
hc set wmname LG3D
hc rule focus=off # default do not focus new clients
hc rule class=chromium tag=1
hc rule class=Chrome tag=1
hc rule class=Firefox tag=2
hc rule class=Thunderbird tag=2
hc rule class=Thunderbird-nightly tag=2
hc rule class=Acroread tag=3
hc rule class=Evince tag=3
hc rule class=Okular tag=3
hc rule class=VirtualBox tag=4
hc rule class=VirtualBox title=WinXP tag=4
hc rule class=Vncviewer tag=5
hc rule class=NXAgent tag=5
hc rule class=Opennx tag=5
hc rule class=rdesktop tag=5
hc rule class=xfreerdp tag=5
hc rule class=Remmina tag=5
hc rule class=Openshot tag=3
hc rule class=Kdenlive tag=3
hc rule class=Cinelerra tag=3
hc rule class=Wine tag=4 fullscreen=on
hc rule class=URxvt title=work1 tag=8 # tmux session work1
hc rule class=Evilvte title=work1 tag=8 # tmux session work1
hc rule class=URxvt title=work2 tag=9 # tmux session work2
hc rule class=Evilvte title=work2 tag=9 # tmux session work2
hc rule class=Gxmessage manage=off
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
#hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' manage=off
#hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
if [[ $HOSTNAME = eadmaka ]]; then
hc remove_monitor 1
hc move_monitor 0 1920x1080+0+0
hc add_monitor 1080x1920+1920+0 9
elif [[ $HOSTNAME = skylark || $HOSTNAME = jackshrimp ]]; then
hc remove_monitor 1
hc move_monitor 0 1920x1080+0+0
hc add_monitor 1920x1080+1920+0 9
elif [[ $HOSTNAME = tiburon ]]; then
if [[ -z $(xrandr | /bin/grep VGA1 | /bin/grep disconnected) ]]; then
hc remove_monitor 1
hc move_monitor 0 1600x900+0+0
#hc add_monitor 1280x1024+1600+0 9
hc add_monitor 1024x768+1600+0 9
fi
fi
[[ -x $HOME/.herbstluftwm_panel ]] && $HOME/.herbstluftwm_panel &