config_sway/bin/waybar

13 lines
247 B
Bash
Executable file

#!/usr/bin/env sh
CONFIG_DIR=$HOME/.config/sway/waybar.d
CONFIG=$CONFIG_DIR/$(hostname).conf
STYLE=$CONFIG_DIR/style.css
# Terminate already running bar instances
pkill -SIGUSR2 -x waybar
if [ $? -ne 0 ]; then
waybar -c $CONFIG -s $STYLE
fi