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

39 lines
1.2 KiB
Bash
Raw Normal View History

2020-02-13 20:22:00 +01:00
#!/usr/bin/env sh
# More info : https://github.com/jaagr/polybar/wiki
# Install the following applications for polybar and icons in polybar if you are on ArcoLinuxD
# awesome-terminal-fonts
# Tip : There are other interesting fonts that provide icons like nerd-fonts-complete
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
desktop=$(echo $DESKTOP_SESSION)
count=$(xrandr --query | grep " connected" | cut -d" " -f1 | wc -l)
case $desktop in
i3)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
2020-08-23 20:05:35 +02:00
MONITOR=$m polybar --reload mainbar-i3 -c ~/.config/polybar/i3config.ini &
2020-02-13 20:22:00 +01:00
done
else
2020-08-23 20:05:35 +02:00
polybar --reload mainbar-i3 -c ~/.config/polybar/i3config.ini &
2020-02-13 20:22:00 +01:00
fi
# second polybar at bottom
# if type "xrandr" > /dev/null; then
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload mainbar-i3-extra -c ~/.config/polybar/config &
# done
# else
# polybar --reload mainbar-i3-extra -c ~/.config/polybar/config &
# fi
;;
esac