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
2022-07-09 11:46:03 -07:00

16 lines
401 B
Bash
Executable file

#!/bin/bash
CPID=$(pgrep -x polybar)
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