add debug watch option to wakelock

This commit is contained in:
Peter John Hartman
2023-02-23 11:13:06 -06:00
parent 45f10889b8
commit dc290f7159

View File

@@ -78,8 +78,12 @@ unlock() {
} }
debug() { debug() {
if [ "$1" = "watch" ]; then
watch -n1 cat /sys/power/wake_lock
else
tr " " "\n" < /sys/power/wake_lock | grep . tr " " "\n" < /sys/power/wake_lock | grep .
tail -f "$XDG_STATE_HOME"/sxmo.log | grep "${0##*/}" tail -f "$XDG_STATE_HOME"/sxmo.log | grep "${0##*/}"
fi
} }
cmd="$1" cmd="$1"