mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 09:53:10 -05:00
Added yambar-launcher
This commit is contained in:
parent
91ebf1e5aa
commit
9ff8e472cc
1 changed files with 21 additions and 0 deletions
21
dot_local/bin/executable_yambar-launcher.tmpl
Normal file
21
dot_local/bin/executable_yambar-launcher.tmpl
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
START_TIME=`date +"%b %d, %Y %T"`
|
||||||
|
LOG_FILE_BAR1="${XDG_STATE_HOME}"/yambar1.log
|
||||||
|
echo "--- ${START_TIME} ---" > "$LOG_FILE_BAR1"
|
||||||
|
{{- if eq .chezmoi.hostname "hydrus" }}
|
||||||
|
LOG_FILE_BAR2="${XDG_STATE_HOME}"/yambar2.log
|
||||||
|
echo "--- ${START_TIME} ---" > "$LOG_FILE_BAR2"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
# Terminate already running bar instances
|
||||||
|
killall -q yambar
|
||||||
|
|
||||||
|
# Wait until the processes have been shut down
|
||||||
|
while pgrep -u $UID -x yambar >/dev/null; do sleep 1; done
|
||||||
|
|
||||||
|
# Launch Yambar
|
||||||
|
yambar -s 2>&1 | tee -a "$LOG_FILE_BAR1" & disown
|
||||||
|
{{- if eq .chezmoi.hostname "hydrus" }}
|
||||||
|
yambar -s -c "${XDG_CONFIG_HOME}/yambar/bar2.yml" 2>&1 | tee -a "$LOG_FILE_BAR2" & disown
|
||||||
|
{{- end }}
|
Loading…
Reference in a new issue