diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-12-22 23:59:53 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-12-22 23:59:53 +0200 |
| commit | 323ac5ab1f42d321cb69433823167a1c4cbfd0d0 (patch) | |
| tree | fe4122369d6c2fc9f1e9cde8ab0dac34d204502c | |
| parent | ff922cb27645bc4dd5e8d300886b1b0cdcafed11 (diff) | |
| download | dotfiles-323ac5ab1f42d321cb69433823167a1c4cbfd0d0.tar.gz dotfiles-323ac5ab1f42d321cb69433823167a1c4cbfd0d0.zip | |
Script title-bar now has lock file to prevent multiple processes
| -rwxr-xr-x | .config/bspwm/bspwmrc | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 4f94f34..0d595d4 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -9,11 +9,16 @@ bspc monitor -d 1 2 3 4 5 # 7 8 9 10 #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_action2 resize_corner +bspc config pointer_action3 resize_corner bspc config focus_follows_pointer false bspc config remove_disabled_monitors true bspc config remove_unplugged_monitors true @@ -28,9 +33,9 @@ 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 "#282828" -bspc config active_border_color "#ebdbb2" -bspc config focused_border_color "#77dd77" +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" @@ -58,7 +63,7 @@ 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 +#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 @@ -106,4 +111,28 @@ bspc subscribe node_state | while read -r _ _ _ _ state flag; do 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 |
