.dotfiles/.config/polybar/launch.sh

19 lines
456 B
Bash
Executable file

#!/bin/bash
# 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
host_name=$(cat /proc/sys/kernel/hostname)
if [[ $host_name == "portalo" ]]; then
polybar portalo-primary &
polybar portalo-secondary &
elif [[ $host_name == *"laptop"* ]]; then
polybar laptop-primary &
polybar laptop-secondary &
else
polybar base &
fi