scripts/misc/awidget

20 lines
324 B
Plaintext
Raw Normal View History

2021-08-31 13:17:31 +00:00
#!/bin/zsh
#dep:awesome-client
zparseopts -D -E n=nofork
if [ -z "$nofork" ]; then
$0 -n "$@" &
disown; exit 0;
fi
zparseopts -D -E u=update
if [ -n "$update" ]; then
if [ -n "$2" ]; then
echo "return widgets.update(\"$1\", $2)" | awesome-client
else
echo "return widgets.update(\"$1\")" | awesome-client
fi
fi