refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/ - Colocate application Nix logic, configs, scripts, and theme overrides - Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts - Update flake.nix and shared library paths to match the new structure - Document the new Feature-Centric architecture in README.md
This commit is contained in:
28
features/scripts/utils/nomarchy-state
Executable file
28
features/scripts/utils/nomarchy-state
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Manage persistent runtime state files for Nomarchy indicators.
|
||||
# Usage: nomarchy-state <set|clear> <state-name-or-pattern>
|
||||
# Used to track whether things like reboot, restart, etc are required.
|
||||
# DO NOT use this for configuration toggles (suspend, screensaver, etc).
|
||||
# Use declarative Nomarchy NixOS home-manager options for those instead.
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user