#!/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 & else polybar laptop-primary & # TODO fi