ark/users/modules/eww/scripts/pop
2022-09-14 15:35:52 +03:00

19 lines
274 B
Bash
Executable File

#!/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"