lina/xmonad/ws_browser.sh
Light3039 aa657d0ae6
Initial Commit
Add install.sh

Add .zshrc

add: nvim configs

add: toggleterm, alpha

update

update

Create README.md

major changes

major changes

add picom

updated dot files

update

shit
2025-04-25 10:37:55 +03:30

37 lines
886 B
Bash
Executable file

#!/bin/bash
BAR_PIDS=()
ws=$(tail -n 6 /tmp/.xmonad-workspace-log | grep -i '')
echo ${ws}
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar ws_browser_border &
BAR_PIDS+=( "$!" )
done
if [[ "$ws" == *"F#CC241D"* ]]; then
for PID in "${BAR_PIDS[@]}"; do
polybar-msg -p $PID cmd show >> ~/debug
done
else
for PID in "${BAR_PIDS[@]}"; do
polybar-msg -p $PID cmd hide >> ~/debug
done
fi
while inotifywait -qqe close_write /tmp/.xmonad-workspace-log; do
ws=$(tail -n 6 /tmp/.xmonad-workspace-log | grep -i '')
echo ${ws}
if [[ "$ws" == *"F#CC241D"* ]]; then
for PID in "${BAR_PIDS[@]}"; do
polybar-msg -p $PID cmd show >> ~/debug
done
else
for PID in "${BAR_PIDS[@]}"; do
polybar-msg -p $PID cmd hide >> ~/debug
done
fi
done