forked from ahurac/dotfiles
20 lines
338 B
Text
20 lines
338 B
Text
|
#!/bin/sh -x
|
||
|
# Waybar wrapper to reload it anytime the
|
||
|
# configuration is edited
|
||
|
|
||
|
# Variable
|
||
|
waybar_config_d="${HOME}/.config/waybar"
|
||
|
monitored_events=(
|
||
|
modify
|
||
|
create
|
||
|
delete
|
||
|
)
|
||
|
|
||
|
# Execution
|
||
|
while :; do
|
||
|
/usr/bin/waybar "$@" &
|
||
|
inotifywait "${monitored_events[@]/#/-e}" "${waybar_config_d}"
|
||
|
jobs -p | xargs kill
|
||
|
done
|
||
|
|