Vendor the command set the menu and shell depend on

This commit is contained in:
2026-09-19 23:57:12 -04:00
parent 9501f2bb4d
commit c5434026a8
179 changed files with 12414 additions and 54 deletions
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
# blob:summary=Toggle Blob features between enabled and disabled
# blob:args=<flag-name> [toggle|on|off]
if (($# < 1)); then
echo "Usage: blob-toggle <flag-name> [toggle|on|off]" >&2
exit 1
fi
FLAG_NAME="$1"
ACTION="${2:-toggle}"
FLAG="$HOME/.local/state/blob/toggles/$FLAG_NAME"
enable() {
mkdir -p "$(dirname "$FLAG")"
touch "$FLAG"
}
disable() {
rm -f "$FLAG"
}
case "$ACTION" in
toggle|"")
if [[ -f $FLAG ]]; then
disable
else
enable
fi
;;
on)
enable
;;
off)
disable
;;
*)
echo "Usage: blob-toggle <flag-name> [toggle|on|off]" >&2
exit 1
;;
esac