/
autostart
executable file
·154 lines (138 loc) · 4.9 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
#!/usr/bin/env bash
#######################################################
## locate: ${XDG_CONFIG_HOME}/herbstluftwm/autostart ##
## author: Vincent (github.com/milomouse) ##
## detail: startup file for `herbstluftwm' ##
#######################################################
# function shortcut
hc() {
herbstclient "$@"
}
# reload and reset
hc emit_hook reload
hc keyunbind --all
# modifier key
Mod=Mod4
# define tags and associated keys
tag_names=( I II III IV V VI )
tag_keys=( {1..6} )
# frame layout
hc set default_frame_layout 2
hc set_layout max
# tags setup and keybinds
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
# mouse bindings
hc mouseunbind
hc mousebind $Mod-B1 move
hc mousebind $Mod-B2 resize
hc mousebind $Mod-B3 zoom
# theme attributes
hc attr theme.tiling.reset 1
hc attr theme.floating.reset 1
hc attr theme.floating.border_width 10
hc attr theme.floating.outer_width 0
hc attr theme.border_width 10
hc attr theme.inner_width 0
hc attr theme.outer_width 0
hc attr theme.inner_color '#080808'
hc attr theme.active.inner_color '#292929'
hc attr theme.normal.inner_color '#080808'
hc attr theme.outer_color '#292929'
hc attr theme.active.outer_color '#616161'
hc attr theme.normal.outer_color '#080808'
hc attr theme.active.color '#616161'
hc attr theme.normal.color '#202020'
hc attr theme.urgent.color '#FF009A'
hc attr theme.background_color '#101010'
# theme settings
hc set show_frame_decorations if_multiple
hc set frame_bg_transparent 1
hc set frame_bg_active_color '#616161'
hc set frame_bg_normal_color '#101010'
hc set frame_border_active_color '#444444'
hc set frame_border_normal_color '#1E1E21'
hc set frame_border_inner_color '#080808'
hc set frame_border_inner_width 0
hc set frame_border_width 1
hc set frame_gap 0
hc set frame_padding 0
hc set frame_transparent_width 0
hc set mouse_recenter_gap 0
hc set smart_frame_surroundings 0
hc set smart_window_surroundings 0
hc set window_gap 0
# hc set window_border_active_color '#2D2E33'
hc set window_border_active_color '#313238'
hc set window_border_normal_color '#26272B'
# reset monitors_locked uint
hc unlock
# various settings
hc set tree_style '·│ ├└+─┐'
# create monitors and lock first [0] tag (this is used on first monitor)
#hc set_monitors 3840x2160+0+0 3840x2160+3840+0
#hc detect_monitors
#hc lock_tag 0
# second monitor uses all tags except the first [0]
# make sure we cannot cycle between monitors unless we explicitly select the tags
#hc set swap_monitors_to_get_tag false
#hc set focus_crosses_monitor_boundaries false
# custom script to switch between monitors
# if we just used focus_monitor this would happen every restart
# instead the script uses sanity checks and has toggle functionality
#${XDG_CONFIG_HOME}/herbstluftwm/scripts/monitorswitch.sh switch 1
# panel
polybar-msg cmd quit 2>&1
> /var/tmp/logs/${USER}/polybar.log
polybar -c ${XDG_CONFIG_HOME}/polybar/config.ini main 2>&1 | tee -a /var/tmp/logs/${USER}/polybar.log & disown
# rules
hc unrule -F
hc rule focus=on
hc rule class="polybar" manage=off
hc rule class="mpv" pseudotile=off
hc rule class="Toplevel" pseudotile=on
hc rule class="Dialog" pseudotile=on
hc rule class="sun-awt-X11-XFramePeer" pseudotile=on
hc rule class="Nvidia-settings" floating=on
hc rule class="calibre" tag=II
hc rule class="obs" tag=II
hc rule class="AppRun.wrapped" tag=IV
hc rule class="forge-view-Main" tag=IV pseudotile=off floating=off
hc rule class="duckstation-nogui" tag=IV
hc rule class="retroarch" tag=IV
hc rule class="Godot" tag=IV
hc rule class~'(.*[dD]iscord)' tag=II
hc rule class~'(.*[sS]potify)' tag=II
hc rule class~'(.*[fF]irefox)' tag=III
hc rule class~'(.*[nN]avigator)' tag=III
hc rule class~'(.*[cC]hromium-bin-browser-chromium)' tag=III
hc rule class~'(.*[pP]csx2)' tag=IV pseudotile=on
hc rule class~'(.*[eE]u4)' tag=IV
hc rule class~'(.*[sS]tellaris)' tag=IV
hc rule class~'(.*[fF]actorio)' tag=IV
hc rule class~'(.*[rR]im[wW]orld[lL]inux)' tag=IV
hc rule class~'(.*[bB]lender)' tag=VI
hc rule class~'(.*[sS]ubstance-[pP]ainter)' tag=V
hc rule class~'(.*[mM]y[pP]aint)' tag=V
hc rule class~'(.*[kK]rita)' tag=V
hc rule class~'(.*[gG]imp)' tag=V
hc rule class~'(.*[iI]nkscape)' tag=V
hc rule class~'(.*[pP]qiv)' pseudotile=on
hc rule class~'(.*[yY]ad)' floating=on
hc rule class~'(.*[pP]cmanfm)' floating=on
hc rule class~'(.*[pP]ure[rR]ef)' tag=X fullscreen=on
hc rule title="Open File" floating=on
hc rule title="Open Image" pseudotile=on
hc rule title="Save As" pseudotile=on
hc rule title="Save file" pseudotile=on
hc rule title="Loading Forge..." pseudotile=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off