mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-11-13 15:50:50 -05:00
19 lines
487 B
Bash
19 lines
487 B
Bash
#!/bin/bash
|
|
|
|
START_TIME=`date +"%b %d, %Y %T"`
|
|
LOG_FILE="${XDG_STATE_HOME}"/waybar.log
|
|
|
|
echo "--- ${START_TIME} ---" > "$LOG_FILE"
|
|
|
|
# Terminate already running bar instances
|
|
killall -q waybar
|
|
|
|
# Wait until the processes have been shut down
|
|
while pgrep -u $UID -x waybar >/dev/null; do sleep 1; done
|
|
|
|
# Make sure pipewire-pulse is running or module won't load
|
|
until pgrep -u $UID -x pipewire-pulse >/dev/null; do sleep 1; done
|
|
|
|
# Launch Waybar
|
|
waybar 2>&1 | tee -a "$LOG_FILE" & disown
|
|
|