arch-rice/.config/polybar/launch.sh

37 lines
858 B
Bash
Raw Normal View History

2021-11-16 02:24:56 +00:00
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been killed
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
CURRENT_MONITOR_CONFIG=${1:-7}
# Launch Polybar using default config location
# ~/.config/polybar/config
if [[ "${CURRENT_MONITOR_CONFIG}" -eq 4 ]];then
echo "Going with 4 for polybar"
2021-12-24 15:31:03 +00:00
polybar center &
polybar left &
2021-11-16 02:24:56 +00:00
elif [[ "${CURRENT_MONITOR_CONFIG}" -eq 5 ]];then
echo "Going with 5 for polybar"
2021-12-24 15:31:03 +00:00
polybar center &
polybar top &
2021-11-16 02:24:56 +00:00
elif [[ "${CURRENT_MONITOR_CONFIG}" -eq 6 ]];then
echo "Going with 6 for polybar"
2021-12-24 15:31:03 +00:00
polybar left &
polybar top &
2021-11-16 02:24:56 +00:00
elif [[ "${CURRENT_MONITOR_CONFIG}" -eq 7 ]];then
echo "Going with 7 for polybar"
2021-12-24 15:31:03 +00:00
polybar center &
polybar left &
polybar top &
2021-11-16 02:24:56 +00:00
else
echo "Going with default for polybar"
polybar example &
fi
echo "Polybar launched..."