Lots of scripts

This commit is contained in:
2026-03-06 22:33:30 +00:00
parent b1863b545a
commit 3740b69b53
29 changed files with 601 additions and 207 deletions

26
.local/bin/station-state Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Manage persistent state files for Station toggles and settings.
# Usage: station-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/station"
mkdir -p "$STATE_DIR"
COMMAND="$1"
STATE_NAME="$2"
if [[ -z $COMMAND ]]; then
echo "Usage: station-state <set|clear> <state-name-or-pattern>"
exit 1
fi
if [[ -z $STATE_NAME ]]; then
echo "Usage: station-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