-
Notifications
You must be signed in to change notification settings - Fork 1
/
autostart
executable file
·165 lines (126 loc) · 4.36 KB
/
autostart
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
#!/bin/bash
# this is a simple config for herbstluftwm
dir=~/.config/herbstluftwm/
~/.bin/wp change
source ~/.colors
source $dir/config
function hc() {
herbstclient "$@"
}
hc emit_hook reload
# remove all existing keybindings
hc keyunbind --all
# tags
TAG_NAMES=( z x c v b n m )
TAG_KEYS=( z x c v b n m )
hc set default_frame_layout $default_frame_layout
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 "${TAG_NAMES[$i]}"
hc keybind "$Mod-Shift-$key" move "${TAG_NAMES[$i]}"
fi
done
# Quit or Reload
hc keybind Control-Alt-Delete quit
hc keybind $Mod-Control-r reload
# Closing or opening programs
hc keybind $Mod-w close_or_remove
hc keybind $Mod-Return spawn $terminal
dmenu="/usr/bin/dmenu -i -fn $font -nb '$COLOR0' -sb '$COLOR2' -sf '#000000'"
hc keybind $Mod-d spawn j4-dmenu-desktop --dmenu="$dmenu"
# cycle through tags
hc keybind $Mod-period use_index +1 --skip-visible
hc keybind $Mod-comma use_index -1 --skip-visible
hc keybind $Mod-Right use_index +1 --skip-visible
hc keybind $Mod-Left use_index -1 --skip-visible
hc keybind $Mod-a use_previous
# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-u spawn $dir/split bottom $vertical_split
hc keybind $Mod-o spawn $dir/split right $horizontal_split
hc keybind $Mod-Shift-u spawn $dir/split top $vertical_split_i
hc keybind $Mod-Shift-o spawn $dir/split left $horizontal_split_i
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle
hc keybind $Mod-i spawn $dir/sidebar.sh
hc keybind $Mod-0 spawn $dir/padding
# resizing
RESIZESTEP=0.05
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
# mouse
hc mouseunbind --all
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 zoom
hc mousebind $Mod-Button3 resize
# focus
hc keybind $Mod-BackSpace cycle_monitor
hc keybind $Mod-slash cycle_monitor
hc keybind $Mod-Tab cycle +1
hc keybind $Mod-Shift-Tab cycle -1
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-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 keybind $Mod-Shift-i rotate
hc keybind $Mod-Alt-h spawn $dir/swap left
hc keybind $Mod-Alt-j spawn $dir/swap down
hc keybind $Mod-Alt-k spawn $dir/swap up
hc keybind $Mod-Alt-l spawn $dir/swap right
# Black Screen
hc keybind $Mod-F4 spawn ~/.bin/darkness
# Lock screen
hc keybind $Mod-F3 spawn dm-tool lock
# Lock screen
hc keybind $Mod-F5 spawn ~/.bin/reconnect
# Lower Backlight
hc keybind $Mod-F8 spawn ~/.bin/backlight -15
# Lower Backlight
hc keybind $Mod-F9 spawn ~/.bin/backlight +15
# Toggle workman and us standard layouts
hc keybind $Mod-F6 spawn ~/.bin/toggle-workman
# colors
hc set window_border_active_color "$COLOR9"
hc set window_border_normal_color '#444444'
# settings
hc set default_frame_layout $default_frame_layout
hc set focus_follows_mouse $focus_follows_mouse
hc set focus_stealing_prevention 0
hc set raise_on_click $raise_on_click
hc set raise_on_focus $raise_on_focus
hc set raise_on_focus_temporarily $raise_on_focus_temporarily
hc set window_gap $window_gap
hc set frame_gap $frame_gap
hc set frame_padding $frame_padding
hc set frame_border_width $frame_border_width
hc set window_border_width $window_border_width
hc set window_border_inner_width $window_border_inner_width
hc set frame_bg_transparent $frame_bg_transparent
hc set frame_active_opacity $frame_active_opacity
hc set frame_normal_opacity $frame_normal_opacity
# rules
hc unrule -F
#hc rule class=XTerm tag=3 # move all xterms to tag 3
hc rule focus=on # Focus new windows by default
# focus and psudotile dialogs
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' \
pseudotile=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
hc rule class=URxvt pseudotile=on
# unlock, just to be sure
hc unlock
herbstclient set tree_style '╾│ ├└╼─┐'
hc detect_monitors
$dir/panel/panel.sh &