initial commit

This commit is contained in:
Bernardo Magri
2026-04-01 17:06:01 +01:00
parent 12cdfaeeef
commit 33deeb494b
526 changed files with 12287 additions and 1 deletions

26
bin/nomarchy-state Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Manage persistent state files for Nomarchy toggles and settings.
# Usage: nomarchy-state <set|clear> <state-name-or-pattern>
# Used to track whether features like suspend, idle lock, etc are enabled or disabled.
STATE_DIR="$HOME/.local/state/nomarchy"
mkdir -p "$STATE_DIR"
COMMAND="$1"
STATE_NAME="$2"
if [[ -z $COMMAND ]]; then
echo "Usage: nomarchy-state <set|clear> <state-name-or-pattern>"
exit 1
fi
if [[ -z $STATE_NAME ]]; then
echo "Usage: nomarchy-state $COMMAND <state-name>"
exit 1
fi
case "$COMMAND" in
set) touch "$STATE_DIR/$STATE_NAME" ;;
clear) find "$STATE_DIR" -maxdepth 1 -type f -name "$STATE_NAME" -delete ;;
esac