-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbspwmrc
More file actions
executable file
·217 lines (172 loc) · 6.38 KB
/
bspwmrc
File metadata and controls
executable file
·217 lines (172 loc) · 6.38 KB
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## BSPWM config file for Archcraft
## General ---------------------------------------------------#
## Bspwm config directory
BSPDIR="$HOME/.config/bspwm"
hostname=$(hostname)
## Export bspwm/bin dir to PATH
export PATH="${PATH}:$BSPDIR/scripts"
## Run java applications without issues
export _JAVA_AWT_WM_NONREPARENTING=1
#wmname LG3D
export BROWSER=google-chrome-stable
export EDITOR=nvim
## Current theme ---------------------------------------------#
## Bspwm colors
BSPWM_FBC='#81A1C1'
BSPWM_NBC='#2E3440'
BSPWM_ABC='#B48EAD'
BSPWM_PFC='#A3BE8C'
## Bspwm appearance
BSPWM_BORDER='1'
BSPWM_GAP='5'
BSPWM_SRATIO='0.50'
## Configurations --------------------------------------------#
## thermal zone
echo "hwmon-path = $(awk -F 'Package id 0 |$' '{print $2}' <<<$(for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || cmd basename ${i%_*}) $(readlink -f $i)"; done | grep 'Package'))" >~/.config/bspwm/thermal-zone
## Manage Monitors and Workspaces
##
## Default Setup (Set 8 workspaces on each monitor)
fish "$HOME/.config/bspwm/monitors-workspaces/$hostname.fish"
## Apply bspwm configurations
bspc config border_width "$BSPWM_BORDER"
bspc config window_gap "$BSPWM_GAP"
bspc config split_ratio "$BSPWM_SRATIO"
bspc config focused_border_color "$BSPWM_FBC"
bspc config normal_border_color "$BSPWM_NBC"
bspc config active_border_color "$BSPWM_ABC"
bspc config presel_feedback_color "$BSPWM_PFC"
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config paddingless_monocle true
bspc config single_monocle false
bspc config pointer_follows_focus true
bspc config pointer_follows_monitor true
bspc config focus_follows_pointer true
bspc config presel_feedback true
## Manage all the unmanaged windows remaining from a previous session.
bspc wm --adopt-orphans
## Window rules ----------------------------------------------#
## remove all rules first
bspc rule -r "*:*"
## 2 > web (always open web browser on workspace-2)
bspc rule -a Moneydance state=floating
bspc rule -a RStudio desktop='5' follow=on
bspc rule -a obsidian desktop='5' follow=off
bspc rule -a notion-app desktop='5' follow=off
bspc rule -a kdenlive desktop='9' state=floating follow=on
bspc rule -a Gimp desktop='9' state=floating follow=on
bspc rule -a Blueman-manager state=floating
bspc rule -a Pavucontrol state=floating sticky=on
bspc rule -a copyq state=floating
bspc rule -a gnome-calculator state=floating
bspc rule -a Bitwarden state=floating locked=on sticky=on
bspc rule -a dropdown state=floating locked=on sticky=on
bspc rule -a bashtop state=floating sticky=on locked=on center=true rectangle=1400x1400+0+0
bspc rule -a fromscratch state=floating sticky=on locked=on center=true rectangle=1400x1400+0+0
bspc rule -a pomodoro state=floating sticky=on locked=on center=true rectangle=1400x1400+0+0
bspc rule -a flameshot state=floating
bspc rule -a Steam state=floating
bspc rule -a mplayer2 state=floating
bspc rule -a Gpick state=floating
bspc rule -a Yad state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off
bspc rule -a zoom state=floating sticky=on
bspc rule -a "VirtualBox Manager" state=floating
bspc rule -a "VirtualBox" state=floating
bspc rule -a "VirtualBox Machine" desktop='4'
bspc rule -a com-install4j-runtime-launcher-UnixLauncher state=floating desktop='6' follow=on focus=on
## 3 > files (always open file manager on workspace-3)
declare -a files=(Pcmanfm Thunar qBittorrent)
for i in "${files[@]}"; do
bspc rule -a "$i" desktop='3' follow=on focus=on
done
## 4 > code (always open editors on workspace-4)
declare -a code=(Geany code-oss)
for i in "${code[@]}"; do
bspc rule -a "$i" desktop='3' follow=on focus=on
done
## 5 > office and docs (always open office/doc apps on workspace-5)
declare -a office=(Gucharmap Atril Evince
libreoffice-writer libreoffice-calc libreoffice-impress
libreoffice-startcenter libreoffice Soffice *:libreofficedev *:soffice)
for i in "${office[@]}"; do
bspc rule -a "$i" desktop='7' follow=on focus=on
done
## 6 > communication (always open communication apps on workspace-6)
declare -a comm=(Thunderbird TelegramDesktop Hexchat Caprine ViberPC)
for i in "${comm[@]}"; do
bspc rule -a "$i" desktop='13' follow=ofss focus=on
done
## 7 > media (always open media apps on workspace-7)
declare -a media=(Audacity Music MPlayer Lxmusic Inkscape Gimp-2.10 obs)
for i in "${media[@]}"; do
bspc rule -a "$i" desktop='10' state=floating follow=on focus=on
done
## 8 > system (always open system apps on workspace-8)
bspc rule -a GParted desktop='10' follow=on focus=on
declare -a settings=(Lxappearance Lxtask Lxrandr Arandr
System-config-printer.py Pavucontrol Exo-helper-1
Xfce4-power-manager-settings)
for i in "${settings[@]}"; do
bspc rule -a "$i" desktop='10' state=floating follow=on focus=on
done
## Always Floating Apps
declare -a floating=(alacritty-float Pcmanfm Onboard Yad 'Firefox:Places'
Viewnior feh Nm-connection-editor calamares Calamares)
for i in "${floating[@]}"; do
bspc rule -a "$i" state=floating follow=on focus=on
done
bspc rule -a Conky state=floating manage=off
bspc rule -a stalonetray state=floating manage=off
bspc config external_rules_command "${HOME}/.config/bspwm/scripts/external_rules.sh"
## Autostart -------------------------------------------------#
# Kill if already running
killall -9 aw-qt xsettingsd sxhkd dunst ksuperkey xfce4-power-manager bspc input-leap fcitx5 flameshot copyq blueman-applet
# Lauch xsettingsd daemon
xsettingsd --config="$BSPDIR"/xsettingsd &
# polkit agent
if [[ ! $(pidof xfce-polkit) ]]; then
/usr/lib/xfce-polkit/xfce-polkit &
fi
# Lauch keybindings daemon
sxhkd -c "$BSPDIR"/sxhkdrc &
# Enable Super Keys For Menu
#ksuperkey -e 'Super_L=Alt_L|F1' &
# Enable power management
# xfce4-power-manager &
# Fix cursor
xsetroot -cursor_name left_ptr
# Restore wallpaper
bash ~/.fehbg
# Start mpd
# exec mpd &
# mpc load start &
# Start bspwm scripts
bspbar &
bspcomp &
bspdunst &
copyq &
fcitx5 &
flameshot &
viber &
sleep 1
running_check="($(pgrep -c 'input-leap'))"
if [[ ${running_check[*]} -eq 0 ]]; then
input-leap &
fi
sinh-x-wallpaper refresh &
dislaykey.fish &
sleep 3
running_check="($(pgrep -c 'aw-qt'))"
if [[ ${running_check[*]} -eq 0 ]]; then
aw-qt &
fi
running_check="($(pgrep -c 'pomodoro'))"
if [[ ${running_check[*]} -eq 0 ]]; then
nohup pomodoro &
fi
displaykey.fish &