2023-02-03 18:12:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
killall -q polybar
|
|
|
|
|
2023-02-05 13:36:21 +00:00
|
|
|
restack_list=('' 'i3' '')
|
|
|
|
|
|
|
|
i=0
|
|
|
|
while read bar; do
|
|
|
|
if [[ $i -eq 0 ]]; then
|
|
|
|
# Launch Main Bar
|
|
|
|
MONITOR=$bar polybar main 2>&1 | tee -a /tmp/polybar_$bar.log & disown
|
|
|
|
else
|
|
|
|
# Launch Sub Bar
|
|
|
|
MONITOR=$bar RESTACK=${restack_list[$i]} polybar workspaces 2>&1 | tee -a /tmp/polybar_$bar.log & disown
|
|
|
|
fi
|
|
|
|
|
|
|
|
i=$((i + 1))
|
|
|
|
done < <(polybar -M | cut -d ':' -f 1)
|