blob: c395dc8bddbf36e6ade3b4602dc5c0099adb0e9b (
plain)
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
|
#! /bin/sh
#░█▀▄░█▀▀░█▀█░█░█░█▄█
#░█▀▄░▀▀█░█▀▀░█▄█░█░█
#░▀▀░░▀▀▀░▀░░░▀░▀░▀░▀
bspc monitor -d 1 2 3 4 5 # 7 8 9 10
#bspc monitor LVDS-1 -d 1 2 3 4 5
#bspc monitor HDMI-1 -d 6 7 8 9 0
###---Global Settings---###
#bspc rule -a '*' --one-shot state=below private=border_width:10
bspc rule -a '*:Tiled' --one-shot state=tiled rectangle=50x50+0+50
bspc rule -a '*' --one-shot state=floating rectangle=50x50+0+50
bspc config automatic_scheme alternate
bspc config initial_polarity second_child
bspc config pointer_modifier mod2
bspc config pointer_action1 move
bspc config pointer_action2 resize_side
bspc config pointer_action3 resize_corner
bspc config focus_follows_pointer false
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
bspc config merge_overlapping_monitors true
bspc config border_width 2
bspc config window_gap 10
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config swallow_first_click false
bspc config pointer_modifier mod1
#bspc config pointer_action1 resize_side
#bspc config pointer_action1 resize_corner
#bspc config pointer_action3 move
bspc config normal_border_color "#404040"
bspc config focused_border_color "#000000"
bspc config active_border_color "#000000"
bspc config presel_feedback_color "#BF616A"
#bspc config normal_border_color "#282828"
#bspc config active_border_color "#ebdbb2"
#bspc config focused_border_color "#fe8019"
# remove all rules first
bspc rule -r *:*
bspc rule -a Plank layer=above border=off
###---Autostart---####
pgrep -x sxhkd >/dev/null || sxhkd &
picom -b --experimental-backends &
if [[ $(xrandr -q | grep 'HDMI-1 connected') ]]; then
xrandr --output LVDS-1 --primary --mode 1366x768 --rotate normal --output HDMI-1 --mode 1920x1080 --rotate normal --right-of LVDS-1
fi
#xfce4-panel --disable-wm-check &
"$HOME"/.config/polybar/launch.sh &
#PANEL_HEIGHT=20
#bspc config top_padding "$PANEL_HEIGHT"
#feh --bg-fill "$HOME"/pictures/wallpapers/national-park.jpg
dunst & # notification daemon
unclutter & # Remove mouse when idle
nitrogen --force-setter=xinerama --restore &
#bspc rule -a \* rectangle=680x700+340+40
bspc rule -a '*:*:Picture-in-Picture' state=floating sticky=on layer=above
bspc rule -a '*:*:Picture in picture' state=floating sticky=on layer=above
bspc rule -a firefox:Toolkit focus=on state=floating sticky=on layer=above rectangle=522x320+830+280
#320x190+1030+480
#522x316-10+280
bspc rule -a "https://www.youtube.com - Enhancer for YouTube™ — Mozilla Firefox" state=floating sticky=on layer=above
bspc rule -a Wezterm state=floating
bspc rule -a Zathura state=tiled
bspc rule -a Pavucontrol state=floating rectangle=490x260+862+37
#490x260-9+37
# SCRATCHPAD
bspc rule -a scratchpad sticky=on state=floating
# Heads Up Display (scratchpad)
bspc rule -a Heads-Up-Display sticky=on state=floating rectangle=360x160+990+40
# Virtual keyboard
bspc rule -a Onboard sticky=on state=floating rectangle=700x205+480-89
[ "$1" = 0 ] && {
nm-applet &
plank &
}
pkill xfce4-power-manager
sleep 1 && nice -n 1 xfce4-power-manager &
pkill volumeicon
sleep 2 && nice -n 2 volumeicon &
pkill mictray
sleep 2 && nice -n 2 mictray &
pkill parcellite
sleep 2 && nice -n 2 parcellite &
# Eww
pkill eww
eww daemon
pkill hotspots
hotspots &
pkill logs.sh
logs.sh
# Kill any existing instances of click_resize.py
pid=$(pgrep -f "python3 click_resize.py")
[ "$pid" != "" ] && kill "$pid"
# Run click_resize.py in the background
nohup env/bin/python3 "$HOME"/.scripts/click_resize.py >/tmp/click_resize.log 2>&1 &
#"$(which eww)" -c "$HOME"/.config/eww --restart open bar &
# Fullscreen
bspc subscribe node_state | while read -r _ _ _ _ state flag; do
if [[ "$state" != fullscreen ]]; then continue; fi
if [[ "$flag" == on ]]; then
xdo lower -N Plank
#"$(which eww)" -c "$HOME"/.config/eww close-all
else
xdo raise -N Plank
#"$(which eww)" -c "$HOME"/.config/eww open bar
fi
done &
# Check if title-bar is already running
if ! pgrep -x "title-bar" >/dev/null; then
# Create a lock file
lockfile="/tmp/title-bar.lock"
# Check if the lock file exists
if [ ! -e "$lockfile" ]; then
# Create the lock file
touch "$lockfile"
# Start bspc subscribe in the background
bspc subscribe | while read; do
if ! pgrep -x "title-bar" >/dev/null; then
bash "$HOME/.scripts/title-bar" &
fi
done &
# Remove the lock file when the script exits
trap 'rm -f "$lockfile"' EXIT
else
echo "title-bar is already running."
fi
fi
#bspc config external_rules_command ~/.config/bspwm/scripts/external_rules.sh
|