2022-12-22 04:07:12 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-06-17 00:03:57 -04:00
|
|
|
START_TIME=`date +"%b %d, %Y %T"`
|
|
|
|
LOG_FILE="${XDG_STATE_HOME}"/tint2.log
|
|
|
|
|
|
|
|
echo "--- ${START_TIME} ---" > "$LOG_FILE"
|
|
|
|
|
2022-12-22 04:07:12 -05:00
|
|
|
# Terminate already running bar instances
|
|
|
|
killall -q tint2
|
|
|
|
|
|
|
|
# Wait until the processes have been shut down
|
|
|
|
while pgrep -u $UID -x tint2 >/dev/null; do sleep 1; done
|
|
|
|
|
|
|
|
# Launch tint2
|
2023-06-17 00:03:57 -04:00
|
|
|
tint2 2>&1 | tee -a "$LOG_FILE" & disown
|
2022-12-22 04:07:12 -05:00
|
|
|
|
|
|
|
# Final command won't work without sleep
|
|
|
|
sleep 1 &&
|
|
|
|
|
|
|
|
# Keep tint2 below other windows in fullscreen
|
|
|
|
if pgrep -x "tint2" > /dev/null ; then
|
|
|
|
xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" $(xdo id -n tint2)
|
|
|
|
fi
|