#!/usr/bin/env sh

CONFIG_DIR=$HOME/.config/sway/waybar.d
CONFIG=$CONFIG_DIR/config
CONFIG_HOST=$CONFIG_DIR/config_$(hostname)
if [ -f $CONFIG_HOST ]; then
  CONFIG=$CONFIG_HOST
fi
STYLE=$CONFIG_DIR/style.css

# Terminate already running bar instances
# pkill -SIGUSR2 -x waybar
pkill -x waybar
# execute new instance
waybar -c $CONFIG -s $STYLE

