ark/users/modules/eww/scripts/pop

19 lines
274 B
Plaintext
Raw Normal View History

2022-09-14 15:35:52 +03:00
#!/usr/bin/env bash
window() {
NAME=$1
LOCK_FILE="$XDG_CACHE_HOME/eww_${NAME}.lock"
if [ ! -f "$LOCK_FILE" ]; then
eww open "${NAME}_win"
touch "$LOCK_FILE"
echo "opened $NAME"
else
eww close "${NAME}_win"
rm "$LOCK_FILE"
echo "closed $NAME"
fi
}
window "$1"