-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbspwmrc
More file actions
executable file
·99 lines (76 loc) · 4.16 KB
/
bspwmrc
File metadata and controls
executable file
·99 lines (76 loc) · 4.16 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
#!/usr/bin/env bash
#
# ██████╗ ███████╗██████╗ ██╗ ██╗███╗ ███╗██████╗ ██████╗
# ██╔══██╗██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝
# ██████╔╝███████╗██████╔╝██║ █╗ ██║██╔████╔██║██████╔╝██║
# ██╔══██╗╚════██║██╔═══╝ ██║███╗██║██║╚██╔╝██║██╔══██╗██║
# ██████╔╝███████║██║ ╚███╔███╔╝██║ ╚═╝ ██║██║ ██║╚██████╗
# ╚═════╝ ╚══════╝╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
# - z0mbi3
# - https://github.com/gh0stzk/dotfiles
# - z0mbi3.zk@protonmail.com
#
read -r RICETHEME < "$HOME"/.config/bspwm/.rice
export RICETHEME
PATH="$HOME/.config/bspwm/scripts:$PATH"
rice_dir="$HOME/.config/bspwm/rices/$RICETHEME"
export XDG_CURRENT_DESKTOP=bspwm
## Fix java applications
export _JAVA_AWT_WM_NONREPARENTING=1
# ╦ ╦╔═╗╦═╗╦╔═╔═╗╔═╗╔═╗╔═╗╔═╗╔═╗
# ║║║║ ║╠╦╝╠╩╗╚═╗╠═╝╠═╣║ ║╣ ╚═╗
# ╚╩╝╚═╝╩╚═╩ ╩╚═╝╩ ╩ ╩╚═╝╚═╝╚═╝
# Default 1 monitor with 6 workspaces
for monitor in "$(xrandr -q | grep -w 'connected' | cut -d' ' -f1)"; do
bspc monitor "$monitor" -d '1' '2' '3' '4' '5' '6' '7' '8'
#bspc monitor "$monitor" -d '' '' '' '' '' ''
done
## For two or three monitors configuration see https://github.com/gh0stzk/dotfiles/wiki/Two-or-more-monitors-setup
# ╔╗ ╔═╗╔═╗╦ ╦╔╦╗ ╔═╗╔═╗╔╗╔╔═╗╦╔═╗
# ╠╩╗╚═╗╠═╝║║║║║║ ║ ║ ║║║║╠╣ ║║ ╦
# ╚═╝╚═╝╩ ╚╩╝╩ ╩ ╚═╝╚═╝╝╚╝╚ ╩╚═╝
bspc config external_rules_command "$HOME"/.config/bspwm/scripts/ExternalRules
bspc config window_gap 6
bspc config split_ratio 0.51
bspc config single_monocle true
bspc config borderless_monocle false
bspc config gapless_monocle false
bspc config focus_follows_pointer true
bspc config pointer_follows_focus false
bspc config pointer_motion_interval 5
bspc config pointer_modifier mod4
bspc config pointer_action1 move
bspc config pointer_action2 resize_side
bspc config pointer_action3 resize_corner
#bspc wm --adopt-orphans
bspc rule -a scratch sticky=on state=floating focus=on
# ╔═╗╦ ╦╔╦╗╔═╗╔═╗╔╦╗╔═╗╦═╗╔╦╗
# ╠═╣║ ║ ║ ║ ║╚═╗ ║ ╠═╣╠╦╝ ║
# ╩ ╩╚═╝ ╩ ╚═╝╚═╝ ╩ ╩ ╩╩╚═ ╩
# Set system vars for polybar
. SetSysVars
# Terminate already running polybar, sxhkd and dunst instances
processes=("sxhkd" "polybar" "dunst" "eww.*bar")
for process in "${processes[@]}"; do
if pgrep -f "$process"; then
pkill -9 -f "$process" > /dev/null; sleep 0.1
fi
done
# Load bspwm conf, colors, dunst, bars and/or eww widgets
. ${rice_dir}/Theme.sh
# Reload sxhkd daemon
sxhkd -c "$HOME"/.config/bspwm/sxhkdrc &
# Launch picom // If you have old hardware or encounter problems
# uncomment the picom "--legacy-backends" line and comment the current one.
pidof -q picom || { picom -b --config "$HOME"/.config/bspwm/picom.conf & }
#pidof -q picom || { picom --legacy-backends --config "$HOME"/.config/bspwm/picom.conf & }
# Launch dunst notification daemon
dunst -config "$HOME"/.config/bspwm/dunstrc &
# Set random wallpaper for actual rice
feh -z --no-fehbg --bg-fill ${rice_dir}/walls
# Launch eww daemon
pidof -q eww || { eww -c "$HOME"/.config/bspwm/eww daemon & }
# Launch polkit
pidof -q polkit-gnome-authentication-agent-1 || { /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & }
# Fix cursor
xsetroot -cursor_name left_ptr