dotfiles/wayland/config/eww/scripts/monitor_variable.sh

14 lines
343 B
Bash
Executable file

#!/usr/bin/env bash
if [[ ! -d "/tmp/eww_vars" ]]; then
mkdir -p "/tmp/eww_vars"
fi
if [[ ! -f "/tmp/eww_vars/${1}" ]]; then
printf '%s\n' "$(eww get ${1})" >"/tmp/eww_vars/${1}"
fi
/usr/bin/cat "/tmp/eww_vars/${1}"
while inotifywait -eMODIFY "/tmp/eww_vars/${1}" &>/dev/null; do
# tput clear
/usr/bin/cat "/tmp/eww_vars/${1}"
done