dot/.config/polybar/start-polybar.sh

17 lines
601 B
Bash
Raw Normal View History

2019-09-14 10:08:28 +00:00
#!/bin/bash
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
## A script placed in ~/.config/polybar/ - Uses ${env:MONITOR} ##
## Starts polybars top and bottom on multiple displays ##
###############################################################################
# start-polybar.sh
# Kill any previous polybars
# For each monitor in list up to ':'
2019-09-14 09:22:50 +00:00
for m in $(polybar --list-monitors | cut -d":" -f1); do
2019-09-14 10:08:28 +00:00
# Reload polybars with monitor device name
MONITOR=$m polybar --reload top &
MONITOR=$m polybar --reload bottom &
2019-09-14 09:22:50 +00:00
done