Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.config/polybar/launch.sh

17 lines
401 B
Bash
Raw Normal View History

2021-12-28 05:04:49 +00:00
#!/bin/bash
2022-07-09 18:46:03 +00:00
CPID=$(pgrep -x polybar)
2021-12-28 05:04:49 +00:00
2022-07-09 18:46:03 +00:00
if [ -n "${CPID}" ] ; then
kill -TERM ${CPID}
fi
# add window titles
# using bspc query here to get monitors in the same order bspwm sees them
for m in $( bspc query -M --names ); do
index=$((index + 1))
export P_BSPWM_WINDOW_CMD="tail ${HOME}/.cache/bspwm_windows_${index}.txt"
MONITOR=$m polybar --reload top &
MONITOR=$m polybar --reload bottom &
done