This commit is contained in:
2025-09-27 01:01:01 +04:00
parent 959300bc41
commit 4dc5660e60
51 changed files with 2502 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env sh
set -x
# toggles the help wrapper state
VISIBILITY_SIGNAL=30
QUIT_SIGNAL=31
LOCKFILE="$HOME/.local/help_disabled"
if [ "$1" = "--toggle" ]; then
if [ -f "$LOCKFILE" ]; then
rm "$LOCKFILE"
else
touch "$LOCKFILE"
fi
# toggles the visibility
pkill -U $USER -f -${VISIBILITY_SIGNAL} 'nwg-wrapper.*-s help.sh'
else
# makes sure no "old" wrappers are mounted (on start and reload)
pkill -U $USER -f -${QUIT_SIGNAL} 'nwg-wrapper.*-s help.sh'
# mounts the wrapper to all outputs
for output in $(swaymsg -t get_outputs --raw | jq -r '.[].name'); do
# sets the initial visibility
if [ -f "$LOCKFILE" ]; then
VISIBILITY="--invisible"
else
VISIBILITY="--no-invisible"
fi
nwg-wrapper ${VISIBILITY} -o "$output" -sv ${VISIBILITY_SIGNAL} -sq ${QUIT_SIGNAL} -s help.sh -p left -a end &
done
fi