Compare commits

..

11 Commits

Author SHA1 Message Date
Bernardo Magri
61cd993e54 fix(githooks): skip bash linting on non-bash nomarchy-* scripts
The nomarchy-* prefix is a name convention, not a language guarantee:
nomarchy-haptic-touchpad is Python. Without a shebang filter, the
pre-commit hook would run `bash -n` on it and abort every commit
that touched the Python helper. Filter to scripts whose shebang
matches `bash` before linting; everything else passes through.

Found via the set -e sweep (1e94818) — the survey caught
nomarchy-haptic-touchpad as a "broken" bash script when it was
just non-bash.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:50:32 +01:00
Bernardo Magri
1e9481849b chore: add 'set -e' to every nomarchy-* bash script that lacks it
Sweep across the three script directories: features/scripts/utils,
core/system/scripts, themes/engine/scripts. 142 of 169 bash scripts
gained `set -e`; 27 already had it; the one Python helper
(nomarchy-haptic-touchpad) was skipped via shebang detection.

Why: bash's default behavior is to continue past a failed command,
which means a script that does "do A; do B; do C" leaves the system
in a half-applied state when B fails - and the user gets no signal.
Several recent fix commits (theme partial-apply, waybar reload race,
installer prewipe silent failures) all trace back to this. set -e
turns silent corruption into a loud abort the user can act on.

The 11 scripts with explicit `|| true` markers stay safe under set -e
because || true coerces the exit to zero; the markers continue to
mean "I deliberately tolerate this failure here."

Deliberate exception: nomarchy-menu runs WITHOUT set -e. It is an
interactive UX loop where action branches do `cmd; back_to <self>`
so a failed action would abort the script under set -e and the menu
would disappear without feedback. Soft-failure - menu re-displays,
user picks again - is the right semantic. Documented inline.

Validation: bash -n on every modified script (zero failures). The
new pre-commit hook (27f5663) was just updated to filter by shebang
so it doesn't try to bash-syntax-check the Python helper - that
filter was uncovered by this sweep.

Risk: set -e can surface latent bugs in scripts that previously
relied on silent continuation. If anything breaks, it's a real bug
that was already broken and is now visible. Easy per-script revert
if any UX glitches show up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:50:13 +01:00
Bernardo Magri
27f5663cdf chore(githooks): lint changed nomarchy-* scripts on commit
Adds two-tier linting before the existing docs/SCRIPTS.md regenerate
step:

- bash -n on every changed nomarchy-* script. Catches syntax errors
  that would otherwise be discovered at runtime by an unlucky user.
  Always fatal.
- shellcheck --severity=error when shellcheck is on PATH. Catches
  unquoted-var, use-before-define, missing-shebang, and other
  bug-shaped patterns. Only error-level issues block - the long
  tail of pre-existing warnings stays as a known cleanup task,
  not a commit blocker. Hook silently skips this step when
  shellcheck isn't installed (so contributors without it can still
  commit).

Catches the class of bug that's bit us repeatedly: a script ships,
the runtime path that exercises the broken line is rare, and the bug
sits latent until a user trips it. Cheaper to catch at commit time.

Caveat: 156 nomarchy-* scripts already have shellcheck warnings
(severity warning/info/style); we deliberately ship around them via
the --severity=error gate. A future per-script audit can dial the
severity up as scripts get cleaned up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:43:37 +01:00
Bernardo Magri
28cc41abdd fix(restart-app): wait for SIGTERM to take effect before respawning
Previous behavior: `pkill -x $1` (no wait) followed by an immediate
background `setsid uwsm-app`. The new instance attached its wayland
surface while the old one's surface was still mapped. Layer-shell
apps got the same visible ghosting that waybar showed on theme switch
before the SIGUSR2 fix (386da51), and non-layer apps got brief double
instances.

Fix:
- Quote $1 (was unquoted, breaks if app name has whitespace - rare
  but cost-free to fix while we're here).
- After SIGTERM, poll pgrep for up to ~1.5s in 100ms ticks.
- If anything is still alive after the poll window, SIGKILL it -
  prevents a misbehaving process from holding the surface forever.
- Only spawn the new instance after the old one is confirmed gone.

Affects every caller that hits the non-systemd-managed restart path
(menu's update-process actions, voxtype install/remove, font-change
follow-ups, etc.).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:09:15 +01:00
Bernardo Magri
5fc9f5ee34 fix(theme): surface partial-apply failures instead of swallowing them
nomarchy-theme-set chains six optional "tell each app the theme changed"
steps. Each used `command -v X && X || true`, which collapsed two very
different outcomes into the same silent path:

  - X isn't installed -> skip (correct, expected, fine)
  - X exists but returned non-zero -> skip (wrong - user just got a
    half-applied theme with zero feedback about which app didn't refresh)

Replaced the inline guards with a small helper that distinguishes
absent from failed and accumulates real failures into a list. At the
end of the run, if anything failed, we notify-send a single message
naming the apps that didn't refresh ("Did not refresh: Waybar, btop")
and echo the same to stderr. The theme apply itself still completes -
we don't abort the chain on one failure - so the user gets the partial
benefit AND the diagnostic.

Same pattern as the waybar SIGUSR2 fix (386da51): make the hot path
loud about real problems while staying quiet about expected
no-installed states.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:08:39 +01:00
Bernardo Magri
5c5b377bd6 fix(menu): quick-state actions return to their submenu instead of exiting
After the cancel-branch sweep, the remaining UX inconsistency was in
action branches: changing one setting kicked the user out of the menu,
forcing a relaunch to change the next. Brought 16 actions across 5
submenus into the same return-to-self pattern theme/background got.

Classification rule applied:

- Quick-state actions (toggle, set, restart-service - finishes in
  milliseconds, no window opens) -> back_to <self>, so the user can
  chain "toggle nightlight, then toggle gaps, then restart waybar"
  without rerunning nomarchy-menu each time.
- Window-opening actions (editor, floating terminal, audio/wifi/bt
  launcher, browser, hyprpicker overlay, screenshot, screenrecord,
  share dialogs, lock/shutdown/logout) stay as one-shot exits -
  re-popping the menu over the new window would be visual noise.

Submenus changed:

- show_toggle_menu (8 toggles): screensaver, nightlight, idle, top
  bar, workspace layout, window gaps, 1-window ratio, display scaling.
- show_setup_power_menu: powerprofilesctl set returns; cancel still
  goes up to show_setup_menu (different destinations on each branch,
  so the if/else stays).
- show_font_menu: nomarchy-font-set returns; cancel still goes up.
- show_setup_system_menu: the suspend toggle (quick) returns;
  hibernate enable/disable (terminal) still exit.
- show_update_process_menu (5 service restarts): hypridle, hyprsunset,
  swayosd, walker, waybar.

For dynamically-rendered menus (show_setup_system_menu rebuilds its
options each invocation based on current state) this also gives free
visual feedback - the toggle's label flips between "Enable Suspend"
and "Disable Suspend" when the menu re-renders.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:01:48 +01:00
Bernardo Magri
4b99fa3846 fix(menu): route every cancel branch through back_to for direct-keybinding consistency
Audit of all show_*_menu functions after the theme/background fix found
11 more cancel branches that called their parent directly instead of
back_to. None are reachable from current keybindings (today's direct
invocations target submenus that already use back_to), so the bug is
latent — but any future `nomarchy-menu <area>` keybinding into one of
these would bounce the user into the parent on Esc instead of exiting
cleanly, the exact bug that prompted the previous commit's fix to
show_theme_menu / show_background_menu.

Mechanical sweep:

  *) show_main_menu   ;;  ->  *) back_to show_main_menu   ;;   (5 sites)
  *) show_setup_menu  ;;  ->  *) back_to show_setup_menu  ;;   (3 sites)
  *) show_update_menu ;;  ->  *) back_to show_update_menu ;;   (3 sites)

Behavior under nested navigation (BACK_TO_EXIT=false) is unchanged:
back_to falls through to calling the parent function by name. Only
direct-invocation cancel paths gain the correct exit-0 behavior.

Action branches and go_to_menu's dispatch table intentionally still use
direct calls — those are forward navigation, not cancel.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:53:41 +01:00
Bernardo Magri
a741b0936c fix(menu): theme and background submenus return to parent instead of exiting
The menu navigation contract: a submenu invoked directly via keybinding
(BACK_TO_EXIT=true, set by go_to_menu when nomarchy-menu is launched
with a target argument) should `exit 0` after the user's action; a
submenu invoked from a parent menu (BACK_TO_EXIT=false) should call
`back_to <parent>` to return where the user came from. back_to() honors
both modes.

Three submenus violated the contract:

- show_theme_menu and show_background_menu shell out to walker's
  Elephant plugin and don't call back_to. After picking a theme or
  wallpaper from Main -> Style -> Theme, the script exits silently
  instead of returning to Style; the user has to relaunch the menu
  from scratch to change anything else.

- show_hardware_menu's cancel branch called show_trigger_menu directly
  instead of back_to show_trigger_menu, which would have bounced a
  direct-keybinding caller into Trigger instead of exiting cleanly.

Adds the missing back_to call to the two walker-backed submenus
(parented to show_style_menu) and converts the hardware cancel branch
to back_to. The 16 other show_*_menu functions already conform.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:50:36 +01:00
Bernardo Magri
f318585dc4 fix(installer): harden disk selection and partitioning phase
The disk phase was the dominant source of incomplete installs. Six
concrete failure modes addressed in one pass:

1. Live-ISO USB excluded from the disk picker. select_disk previously
   filtered loop|ram|zram|sr but not the device the installer booted
   from; picking it would format the boot media mid-install. New
   detect_live_iso_devices walks /, /iso, /run/initramfs/live,
   /nix/.ro-store, /nix/store and resolves each backing device to its
   parent disk via lsblk -no PKNAME. Override with
   NOMARCHY_INSTALL_ALLOW_ISO_TARGET=1 for the developer case.

2. 10 GiB minimum-capacity preflight. Disko fails late and obscurely
   on undersized media; surface it while the picker is still open.

3. prewipe_target_drive rewritten:
   - Enumerates every active dm-crypt mapping via dmsetup ls and
     closes those whose backing device is on the target drive. The
     old version only knew about the hardcoded names "crypted" /
     "crypted_main" so an aborted multi-disk run or a non-Nomarchy
     install would leave a holder open and silently break the wipe.
   - Drops `|| true` from wipefs / sgdisk / dd. After the LUKS and
     swap teardown above, a real failure means something is still
     holding the device — surface that instead of papering over it.
   - udevadm settle bounded to 30s so a flapping USB can't hang.
   - Post-wipe sanity check: refuse to hand the disk to disko if
     anything is still mounted off it.

4. run_disko_with_retry wraps the disko call. On failure, shows the
   last 30 lines of output via gum style and offers Retry /
   View full log / Abort. set -e is suspended for the disko call so
   the exit code can be inspected. The previous bare `disko --mode
   disko` aborted the whole installer with output scrolled past.

5. Sed-templated disko-golden.nix + disko-btrfs-multi.nix pair
   replaced by a single disko-config.nix Nix function of
   { mainDrive, extraDrives ? [] } called via --argstr / --arg.
   Templating Nix via shell-escaped string substitution caused at
   least one production bug (3aadc36 fixed embedded-newline
   escaping); function arguments are the right shape and eliminate
   the entire class of escaping concerns. Single-disk path is
   `extraDrives = []`; multi-disk gets BTRFS `-d single -m raid1`
   plus the additional /dev/mapper/* devices. Hosts that shipped
   /etc/disko-golden.nix now ship /etc/disko-config.nix.

6. EXIT trap added so the tmpfs LUKS key file (/dev/shm/nomarchy-
   luks.key) is removed even if the script aborts between key-write
   and the explicit unset. Replaced redundant `shred -u` on tmpfs
   with `rm -f` (already in RAM).

Verification: bash -n on install.sh, nix-instantiate parse + strict
eval on disko-config.nix in both single and multi shapes, full
nix flake check --no-build evaluating all three NixOS configurations
(default, nomarchy-installer, nomarchy-live) plus the installerVm.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:42:00 +01:00
Bernardo Magri
386da51178 fix(waybar): SIGUSR2 reload to avoid surface-recreate ghost on theme switch
Theme-switching ran systemctl --user restart waybar.service, which tears
down waybar's wayland layer-shell surface and creates a new one
back-to-back. Hyprland needs a frame to clear the destroyed surface; the
new instance attaches its surface immediately, so for a frame or two the
old waybar pixels remain visible behind/under the new bar - the
"artifacts and old colors on top of new" symptom most visible on the
fresh compositor of the live ISO.

Switch to SIGUSR2 reload, which makes waybar re-read config.jsonc and
CSS (including @import-ed files like ~/.config/nomarchy/current/theme/
waybar.css that theme-switch rewrites) without destroying the surface.
Full systemctl start is kept for the cold-start case.

Drive-by: replace the `systemctl list-unit-files` presence check with
`systemctl cat` - list-unit-files returns 0 even on no-match, so the
old check would always pick the systemctl branch and never fall through
to the pkill fallback on systems where waybar isn't a systemd unit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:24:25 +01:00
Bernardo Magri
d06ef86bb9 feat(gaming): add nomarchy.gaming.enable home-side window rule
Mirror of nomarchy.system.gaming.enable. When on, injects a Hyprland
windowrulev2 = fullscreen, class:^(steam_app_).*$ so games launched
through Steam grab the whole screen instead of opening windowed.

Gated via lib.mkIf so the rule is absent when the option is off
(AGENT.md guardrail: features must be option-gated). The rule is
appended to wayland.windowManager.hyprland.extraConfig (types.lines)
so it composes cleanly with the existing source-line entry point in
features/desktop/hyprland/default.nix.

Closes the "Gaming - Hyprland window rule" Next-column roadmap row.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:14:21 +01:00
157 changed files with 638 additions and 302 deletions

View File

@@ -4,9 +4,12 @@
# Enable per-clone with: # Enable per-clone with:
# git config core.hooksPath .githooks # git config core.hooksPath .githooks
# #
# Re-runs the script audit generator when any nomarchy-* script in the three # Two responsibilities:
# script directories is added, modified, or deleted in this commit, then # 1. Lint changed nomarchy-* scripts (bash -n + shellcheck if available)
# stages the refreshed docs/SCRIPTS.md so it lands together with the change. # so syntax errors and unquoted-var bugs don't ship.
# 2. Regenerate docs/SCRIPTS.md when any nomarchy-* script under the three
# script directories is added, modified, or deleted in this commit, and
# stage the refreshed file so it lands with the change.
set -e set -e
@@ -15,6 +18,35 @@ cd "$repo_root"
script_dirs_re='^(features/scripts/utils|core/system/scripts|themes/engine/scripts)/nomarchy-' script_dirs_re='^(features/scripts/utils|core/system/scripts|themes/engine/scripts)/nomarchy-'
# 1. Lint changed scripts. bash -n catches syntax errors (always fatal).
# shellcheck catches unquoted-var, use-before-define, missing-shebang, etc.
# We only fail on severity=error so the long tail of pre-existing warnings
# (info / style / warning) doesn't block commits — those can be cleaned up
# incrementally without a flag day.
changed_scripts=$(git diff --cached --name-only --diff-filter=ACMR \
| grep -E "$script_dirs_re" || true)
if [[ -n "$changed_scripts" ]]; then
while IFS= read -r script; do
[[ -f "$script" ]] || continue
# Only lint scripts with a bash shebang. nomarchy-* is a name
# convention, not a language guarantee — at least one Python helper
# ships under the same prefix (nomarchy-haptic-touchpad).
head -1 "$script" | grep -qE '^#!.*\bbash\b' || continue
if ! bash -n "$script"; then
echo "pre-commit: bash syntax error in $script — aborting commit." >&2
exit 1
fi
if command -v shellcheck >/dev/null 2>&1; then
if ! shellcheck --severity=error --shell=bash "$script"; then
echo "pre-commit: shellcheck found error-level issues in $script — aborting commit." >&2
echo "pre-commit: fix the reported issues, or rerun with --no-verify after a deliberate decision to ship." >&2
exit 1
fi
fi
done <<< "$changed_scripts"
fi
# 2. Regenerate the script audit doc.
if git diff --cached --name-only --diff-filter=ACMRD | grep -qE "$script_dirs_re"; then if git diff --cached --name-only --diff-filter=ACMRD | grep -qE "$script_dirs_re"; then
echo "pre-commit: regenerating docs/SCRIPTS.md (script change detected)…" echo "pre-commit: regenerating docs/SCRIPTS.md (script change detected)…"
./bin/utils/nomarchy-docs-scripts --out docs/SCRIPTS.md ./bin/utils/nomarchy-docs-scripts --out docs/SCRIPTS.md

View File

@@ -10,5 +10,6 @@
./configs.nix ./configs.nix
./security.nix ./security.nix
./bash.nix ./bash.nix
./gaming.nix
]; ];
} }

12
core/home/gaming.nix Normal file
View File

@@ -0,0 +1,12 @@
{ config, lib, ... }:
let
cfg = config.nomarchy.gaming;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.extraConfig = ''
windowrulev2 = fullscreen, class:^(steam_app_).*$
'';
};
}

View File

@@ -128,5 +128,16 @@
''; '';
}; };
}; };
gaming = {
enable = lib.mkEnableOption ''
Gaming preset (home-side companion to nomarchy.system.gaming.enable).
Adds a Hyprland window rule that fullscreens windows whose class
matches steam_app_* i.e. games launched through Steam so they
grab the whole screen instead of opening windowed. Set this to the
same value as nomarchy.system.gaming.enable; the installer flips
both when the Gaming profile is selected.
'';
};
}; };
} }

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns the battery full capacity in Wh (rounded to whole number). # Returns the battery full capacity in Wh (rounded to whole number).
# Used by nomarchy-battery-status for displaying battery capacity. # Used by nomarchy-battery-status for displaying battery capacity.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Designed to be run by systemd timer every 30 seconds and alerts if battery is low # Designed to be run by systemd timer every 30 seconds and alerts if battery is low

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns true if a battery is present on the system. # Returns true if a battery is present on the system.
# Used by the battery monitor and other battery-related checks. # Used by the battery monitor and other battery-related checks.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns the battery percentage remaining as an integer. # Returns the battery percentage remaining as an integer.
# Used by the battery monitor and the Ctrl + Shift + Super + B hotkey. # Used by the battery monitor and the Ctrl + Shift + Super + B hotkey.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns the battery time remaining (to empty or full) in a compact format. # Returns the battery time remaining (to empty or full) in a compact format.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns a formatted battery status string with percentage and power draw/charge. # Returns a formatted battery status string with percentage and power draw/charge.
# Used by the battery notification hotkey (Ctrl + Shift + Super + B). # Used by the battery notification hotkey (Ctrl + Shift + Super + B).

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Adjust brightness on the most likely display device. # Adjust brightness on the most likely display device.
# Usage: nomarchy-brightness-display <step> # Usage: nomarchy-brightness-display <step>

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol. # Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Adjust keyboard backlight brightness using available steps. # Adjust keyboard backlight brightness using available steps.
# Usage: nomarchy-brightness-keyboard <up|down|cycle> # Usage: nomarchy-brightness-keyboard <up|down|cycle>

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Check if hibernation is supported # Check if hibernation is supported
if [[ ! -f /sys/power/image_size ]]; then if [[ ! -f /sys/power/image_size ]]; then

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Removes hibernation setup: disables swap, removes swapfile, removes fstab entry, # Removes hibernation setup: disables swap, removes swapfile, removes fstab entry,
# removes resume hook, and removes suspend-then-hibernate configuration. # removes resume hook, and removes suspend-then-hibernate configuration.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab, # Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab,
# adds a resume hook to mkinitcpio, and configures suspend-then-hibernate. # adds a resume hook to mkinitcpio, and configures suspend-then-hibernate.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Detect whether the computer is an Asus ROG machine. # Detect whether the computer is an Asus ROG machine.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Match against the computer's DMI product name (case-insensitive). # Match against the computer's DMI product name (case-insensitive).
# Usage: nomarchy-hw-match "XPS" # Usage: nomarchy-hw-match "XPS"

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Detect whether Vulkan is available. # Detect whether Vulkan is available.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
PKG_NAME="$1" PKG_NAME="$1"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
PKG_NAME="$1" PKG_NAME="$1"

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns a list of all the available power profiles on the system. # Returns a list of all the available power profiles on the system.
# Used by the Nomarchy Menu under Setup > Power Profile. # Used by the Nomarchy Menu under Setup > Power Profile.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Pre-flight State Migration # Nomarchy Pre-flight State Migration
# Migrates legacy state files into the unified state.json before Nix evaluation # Migrates legacy state files into the unified state.json before Nix evaluation

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Unblock and restart the bluetooth service. # Unblock and restart the bluetooth service.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Restart the PipeWire audio service to fix audio issues or apply new configuration. # Restart the PipeWire audio service to fix audio issues or apply new configuration.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Reload the intel_quicki2c driver to fix a dead trackpad. # Reload the intel_quicki2c driver to fix a dead trackpad.
# The THC (Touch Host Controller) can fail to initialize interrupts # The THC (Touch Host Controller) can fail to initialize interrupts

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Unblock and restart the Wi-Fi service. # Unblock and restart the Wi-Fi service.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Restart the XCompose input method service (fcitx5) to apply new compose key settings. # Restart the XCompose input method service (fcitx5) to apply new compose key settings.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Configure DNS declaratively for Nomarchy NixOS. # Configure DNS declaratively for Nomarchy NixOS.
# Hybrid: updates /etc/nixos/state.json and runs sys-update. # Hybrid: updates /etc/nixos/state.json and runs sys-update.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Configure FIDO2 support declaratively for Nomarchy NixOS. # Configure FIDO2 support declaratively for Nomarchy NixOS.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Configure fingerprint support declaratively for Nomarchy NixOS. # Configure fingerprint support declaratively for Nomarchy NixOS.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Prompt for sudo once and keep the credential alive in the background. # Prompt for sudo once and keep the credential alive in the background.
# Source this script so the trap applies to the calling shell: # Source this script so the trap applies to the calling shell:

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Toggle passwordless sudo for the current user. # Toggle passwordless sudo for the current user.
# First run: enables passwordless sudo for 15 minutes (after confirmation). # First run: enables passwordless sudo for 15 minutes (after confirmation).

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Reset the sudo lockout/faillock for the current user. # Reset the sudo lockout/faillock for the current user.
# This clears any failed authentication attempts that may have locked the user out. # This clears any failed authentication attempts that may have locked the user out.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Display brightness level using SwayOSD on the current monitor. # Display brightness level using SwayOSD on the current monitor.
# Usage: nomarchy-swayosd-brightness <percent> # Usage: nomarchy-swayosd-brightness <percent>

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Display keyboard brightness level using SwayOSD on the current monitor. # Display keyboard brightness level using SwayOSD on the current monitor.
# Usage: nomarchy-swayosd-kbd-brightness <percent> # Usage: nomarchy-swayosd-kbd-brightness <percent>

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Logout command that first closes all application windows (thus giving them a chance to save state), # Logout command that first closes all application windows (thus giving them a chance to save state),
# then stops the session, returning to the SDDM login screen. # then stops the session, returning to the SDDM login screen.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Reboot command that first closes all application windows (thus giving them a chance to save state). # Reboot command that first closes all application windows (thus giving them a chance to save state).
# This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly. # This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Shutdown command that first closes all application windows (thus giving them a chance to save state). # Shutdown command that first closes all application windows (thus giving them a chance to save state).
# This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly. # This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Toggle dedicated vs integrated GPU mode via supergfxd (for hybrid gpu laptops, like Asus G14). # Toggle dedicated vs integrated GPU mode via supergfxd (for hybrid gpu laptops, like Asus G14).
# Declarative enablement + Runtime mode switching for Nomarchy NixOS. # Declarative enablement + Runtime mode switching for Nomarchy NixOS.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Toggles the idle daemon (hypridle) between enabled and disabled. # Toggles the idle daemon (hypridle) between enabled and disabled.
# Hybrid: updates state.json and provides instant feedback. # Hybrid: updates state.json and provides instant feedback.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Toggles the suspend menu option availability. # Toggles the suspend menu option availability.
# Hybrid: updates state.json and runs env-update for persistence. # Hybrid: updates state.json and runs env-update for persistence.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Select system timezone declaratively for Nomarchy NixOS. # Select system timezone declaratively for Nomarchy NixOS.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
echo "Updating time..." echo "Updating time..."
sudo systemctl restart systemd-timesyncd sudo systemctl restart systemd-timesyncd

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Toggles wifi power saving declaratively. # Toggles wifi power saving declaratively.
# Usage: nomarchy-wifi-powersave <on|off> # Usage: nomarchy-wifi-powersave <on|off>

View File

@@ -232,7 +232,7 @@ nomarchy-test-live-iso # boots the ISO in QEMU to evaluate
The ISO autologins to a Hyprland live session that points you at: The ISO autologins to a Hyprland live session that points you at:
- `sudo /etc/install.sh` — install (BTRFS + LUKS + subvolumes per - `sudo /etc/install.sh` — install (BTRFS + LUKS + subvolumes per
`installer/disko-golden.nix`, auto-detects hardware via `hardware-db.sh`, `installer/disko-config.nix`, auto-detects hardware via `hardware-db.sh`,
runs `home-manager switch` inside `nixos-enter` so the first login is runs `home-manager switch` inside `nixos-enter` so the first login is
fully themed). fully themed).
- `sudo /etc/install.sh --dry-run` — generate the flake into a tmpdir and - `sudo /etc/install.sh --dry-run` — generate the flake into a tmpdir and

View File

@@ -89,7 +89,7 @@ Wired in `features/desktop/waybar/default.nix` (filters the battery widget out o
### `nomarchy.system.gaming.enable` ### `nomarchy.system.gaming.enable`
`bool`, default `false`. Gaming preset: enables `programs.steam` (with `remotePlay` and `localNetworkGameTransfers` firewall holes opened by `mkDefault`), `programs.gamemode` (the launching user must be in the `gamemode` group), and `services.flatpak`. The flathub remote isn't added declaratively — after first boot, run `flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo`. The Hyprland fullscreen-on-Steam-launch window rule is a separate roadmap item. `bool`, default `false`. Gaming preset: enables `programs.steam` (with `remotePlay` and `localNetworkGameTransfers` firewall holes opened by `mkDefault`), `programs.gamemode` (the launching user must be in the `gamemode` group), and `services.flatpak`. The flathub remote isn't added declaratively — after first boot, run `flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo`. Pair with the home-side companion `nomarchy.gaming.enable` for the Hyprland fullscreen-on-Steam-launch window rule.
### `nomarchy.system.containers.enable` ### `nomarchy.system.containers.enable`
@@ -243,6 +243,10 @@ Wired in `features/desktop/waybar/default.nix` (filters the battery widget out o
`bool`, default `false`. opencode AI coding CLI integration. Deploys `~/.config/opencode/opencode.json`. The `opencode` package itself is **not** installed by Nomarchy — add it to your `home.packages`. `bool`, default `false`. opencode AI coding CLI integration. Deploys `~/.config/opencode/opencode.json`. The `opencode` package itself is **not** installed by Nomarchy — add it to your `home.packages`.
### `nomarchy.gaming.enable`
`bool`, default `false`. Home-side companion to `nomarchy.system.gaming.enable`. Adds a Hyprland `windowrulev2 = fullscreen, class:^(steam_app_).*$` so games launched through Steam grab the whole screen instead of opening windowed. Set to the same value as the system option; the installer flips both when the Gaming profile is selected.
### `nomarchy.vscode.devExtensions` ### `nomarchy.vscode.devExtensions`
`bool`, default `false`. Install Nomarchy's curated VSCode extension pack (Nix, language servers, theme variants). `bool`, default `false`. Install Nomarchy's curated VSCode extension pack (Nix, language servers, theme variants).

View File

@@ -24,7 +24,6 @@ Guardrails (apply when adding anything):
### Next (bigger lifts that build on Now) ### Next (bigger lifts that build on Now)
- **Accessibility — home-side companion.** Hyprland-side bits the system preset can't reach: slower `input.repeat_rate` / `repeat_delay` defaults, `SUPER+ALT+S` keybinding to launch Orca, and a high-contrast palette under `themes/palettes/`. Gated on a new `nomarchy.accessibility.enable` mirror of the system option. - **Accessibility — home-side companion.** Hyprland-side bits the system preset can't reach: slower `input.repeat_rate` / `repeat_delay` defaults, `SUPER+ALT+S` keybinding to launch Orca, and a high-contrast palette under `themes/palettes/`. Gated on a new `nomarchy.accessibility.enable` mirror of the system option.
- **Gaming — Hyprland window rule.** Companion to the gaming preset: a Hyprland `windowrulev2 = fullscreen, class:^(steam_app_).*$` (or similar) so games launched from Steam grab the whole screen. Lives in `core/home/config/nomarchy/default/hypr/` and gates on a new `nomarchy.gaming.enable` mirror.
- **Gaming — declarative flathub remote.** `services.flatpak.enable` doesn't ship a declarative remote API in nixpkgs. Either add the `flatpak-managed-install` overlay, write a one-shot systemd unit that runs `flatpak remote-add --if-not-exists flathub …`, or surface the manual step in `nomarchy-welcome`. - **Gaming — declarative flathub remote.** `services.flatpak.enable` doesn't ship a declarative remote API in nixpkgs. Either add the `flatpak-managed-install` overlay, write a one-shot systemd unit that runs `flatpak remote-add --if-not-exists flathub …`, or surface the manual step in `nomarchy-welcome`.
- **Plymouth theme variants per palette.** Currently one Plymouth theme; could template per-palette so the boot splash matches the active theme. - **Plymouth theme variants per palette.** Currently one Plymouth theme; could template per-palette so the boot splash matches the active theme.
@@ -137,6 +136,9 @@ Nomarchy is moving away from being a "flavor" of Omarchy to its own distinct ide
(Move items here when they land — keep them brief, link the commit/PR.) (Move items here when they land — keep them brief, link the commit/PR.)
- _2026-04-30_ — `set -e` sweep across `nomarchy-*` scripts. Added `set -e` to 142 of 169 bash scripts that lacked it (27 already had it). Halts a class of "command failed silently in the middle of a chain, system left in half-applied state" bugs that produced repeat-fix commits. One deliberate exception: `nomarchy-menu` runs without `set -e` because it's an interactive UX loop where action failures should re-display the menu rather than abort the script. Pre-commit hook now enforces `bash -n` + `shellcheck --severity=error` so future scripts can't regress this.
- _2026-04-30_ — Installer disk-phase reliability. Hardened `installer/install.sh` and consolidated the disko configs: (1) `select_disk` now hides the live-ISO boot device(s) so the installer can't format its own boot media (`NOMARCHY_INSTALL_ALLOW_ISO_TARGET=1` to override); (2) added a 10 GiB minimum-capacity preflight; (3) `prewipe_target_drive` enumerates every active dm-crypt mapping backed by the target drive and closes them, drops the silent `|| true` from `wipefs`/`sgdisk`/`dd`, bounds `udevadm settle` to 30s, and refuses to continue if anything is still mounted; (4) wrapped the disko call in `run_disko_with_retry` with last-30-lines + Retry / View full log / Abort dialog on failure; (5) replaced the sed-templated `disko-golden.nix` + `disko-btrfs-multi.nix` pair with a single `disko-config.nix` Nix function called via `--argstr mainDrive … --arg extraDrives '[…]'` — eliminates a class of escaping bugs (cf. `3aadc36`); (6) added an EXIT trap so the tmpfs LUKS key file is removed even on early abort.
- _2026-04-30_ — Gaming home-side companion. New `nomarchy.gaming.enable` option (mirror of `nomarchy.system.gaming.enable`) and `core/home/gaming.nix` module that injects a Hyprland `windowrulev2 = fullscreen, class:^(steam_app_).*$` so Steam-launched games grab the whole screen. Closes the "Gaming — Hyprland window rule" Next-column row.
- _2026-04-26_ — Default to highest resolution (`highres`) for monitors. Updated `features/desktop/hyprland/config/monitors.conf` and forced it in the live ISO (`nomarchy-live`) to resolve issues where some hardware would default to a low resolution (1024x768). - _2026-04-26_ — Default to highest resolution (`highres`) for monitors. Updated `features/desktop/hyprland/config/monitors.conf` and forced it in the live ISO (`nomarchy-live`) to resolve issues where some hardware would default to a low resolution (1024x768).
- _2026-04-26_ — First-run welcome wizard (`nomarchy-welcome`). Extended from a one-shot greeter into a guided picker for theme, font, and panel position. Added Step 4 to generate a starter `home.nix` if missing. State is now persisted in `state.json` via `.welcome_done`. Added `nomarchy.panelPosition` option to Waybar. - _2026-04-26_ — First-run welcome wizard (`nomarchy-welcome`). Extended from a one-shot greeter into a guided picker for theme, font, and panel position. Added Step 4 to generate a starter `home.nix` if missing. State is now persisted in `state.json` via `.welcome_done`. Added `nomarchy.panelPosition` option to Waybar.
- _2026-04-26_ — Multi-disk BTRFS support in the installer. Added `installer/disko-btrfs-multi.nix` template and updated `installer/install.sh` to allow selecting multiple drives via `gum choose --no-limit`. Implements BTRFS "single" data + RAID1 metadata across multiple LUKS-encrypted drives. - _2026-04-26_ — Multi-disk BTRFS support in the installer. Added `installer/disko-btrfs-multi.nix` template and updated `installer/install.sh` to allow selecting multiple drives via `gum choose --no-limit`. Implements BTRFS "single" data + RAID1 metadata across multiple LUKS-encrypted drives.

View File

@@ -127,7 +127,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-restart-waybar` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +4 more | `kept` | | | `nomarchy-restart-waybar` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +4 more | `kept` | |
| `nomarchy-restart-wifi` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | | | `nomarchy-restart-wifi` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-restart-xcompose` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | | | `nomarchy-restart-xcompose` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-rollback` | `features/scripts/utils` | installer/disko-golden.nix | `kept` | | | `nomarchy-rollback` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-setup-dns` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | | | `nomarchy-setup-dns` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-setup-fido2` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | | | `nomarchy-setup-fido2` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-setup-fingerprint` | `core/system/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu | `kept` | | | `nomarchy-setup-fingerprint` | `core/system/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu | `kept` | |
@@ -213,7 +213,7 @@ Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bi
| `nomarchy-installer` | features/scripts/utils/nomarchy-build-iso,README.md | `missing` | | `nomarchy-installer` | features/scripts/utils/nomarchy-build-iso,README.md | `missing` |
| `nomarchy-launch` | core/home/config/nomarchy/default/hypr/bindings/clipboard.conf,core/home/config/nomarchy/default/hypr/bindings/utilities.conf, +24 more | `missing` | | `nomarchy-launch` | core/home/config/nomarchy/default/hypr/bindings/clipboard.conf,core/home/config/nomarchy/default/hypr/bindings/utilities.conf, +24 more | `missing` |
| `nomarchy-live` | features/scripts/utils/nomarchy-build-live-iso,features/scripts/utils/nomarchy-on-boot, +1 more | `missing` | | `nomarchy-live` | features/scripts/utils/nomarchy-build-live-iso,features/scripts/utils/nomarchy-on-boot, +1 more | `missing` |
| `nomarchy-luks` | installer/disko-btrfs-multi.nix,installer/disko-golden.nix, +1 more | `missing` | | `nomarchy-luks` | installer/disko-config.nix,installer/install.sh | `missing` |
| `nomarchy-menu-rows` | bin/utils/nomarchy-docs-scripts,features/scripts/utils/nomarchy-docs-scripts | `missing` | | `nomarchy-menu-rows` | bin/utils/nomarchy-docs-scripts,features/scripts/utils/nomarchy-docs-scripts | `missing` |
| `nomarchy-nopasswd` | core/system/scripts/nomarchy-sudo-passwordless-toggle | `missing` | | `nomarchy-nopasswd` | core/system/scripts/nomarchy-sudo-passwordless-toggle | `missing` |
| `nomarchy-nopasswd-expire` | core/system/scripts/nomarchy-sudo-passwordless-toggle | `missing` | | `nomarchy-nopasswd-expire` | core/system/scripts/nomarchy-sudo-passwordless-toggle | `missing` |

View File

@@ -125,9 +125,8 @@ The `lib/` directory provides centralized logic and data structures to maintain
### `installer/` (Bootstrap) ### `installer/` (Bootstrap)
- **`install.sh`**: The interactive TTY-based installer. It handles disk partitioning, NixOS installation, and generating a clean "Downstream" flake for the user. - **`install.sh`**: The interactive TTY-based installer. It handles disk partitioning, NixOS installation, and generating a clean "Downstream" flake for the user.
- **`disko-golden.nix`**: The standard partition layout (BTRFS on top of LUKS2). - **`disko-config.nix`**: The disko partition layout (BTRFS on top of LUKS2). A Nix function of `{ mainDrive, extraDrives ? [] }` — single-disk path is `extraDrives = []`; multi-disk adds BTRFS `-d single -m raid1` across the extras. Invoked by `install.sh` via `disko --argstr mainDrive … --arg extraDrives '[…]'`.
- **`disko-btrfs-multi.nix`**: Multi-disk BTRFS RAID/Single layout template. - **`disko-btrfs-luks.nix`**: A simpler reference layout for disk management (not used by the installer).
- **`disko-btrfs-luks.nix`**: A simpler reference layout for disk management.
### `hosts/` (Targets) ### `hosts/` (Targets)
- **`nomarchy-installer.nix`**: Configuration for the minimal, TTY-based installation ISO. - **`nomarchy-installer.nix`**: Configuration for the minimal, TTY-based installation ISO.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Backup Script # Nomarchy Backup Script
# Alias for nomarchy-sync push. # Alias for nomarchy-sync push.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Build the Nomarchy Installer ISO declaratively using the flake. # Build the Nomarchy Installer ISO declaratively using the flake.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Build the Nomarchy Live ISO (Full Desktop Environment) using the flake. # Build the Nomarchy Live ISO (Full Desktop Environment) using the flake.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute. # Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns true if all the commands passed in as arguments exit on the system. # Returns true if all the commands passed in as arguments exit on the system.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Start and stop a screenrecording, which will be saved to ~/Videos by default. # Start and stop a screenrecording, which will be saved to ~/Videos by default.
# Alternative location can be set via NOMARCHY_SCREENRECORD_DIR or XDG_VIDEOS_DIR ENVs. # Alternative location can be set via NOMARCHY_SCREENRECORD_DIR or XDG_VIDEOS_DIR ENVs.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Run the Nomarchy screensaver using random effects from TTE. # Run the Nomarchy screensaver using random effects from TTE.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Take a screenshot of the whole screen, a specific window, or a user-drawn region. # Take a screenshot of the whole screen, a specific window, or a user-drawn region.
# Saves to ~/Pictures by default, but that can be changed via NOMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs. # Saves to ~/Pictures by default, but that can be changed via NOMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Share clipboard, file, or folder using LocalSend. Bound to Super + Ctrl + S by default. # Share clipboard, file, or folder using LocalSend. Bound to Super + Ctrl + S by default.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns the current working directory of the active terminal window, # Returns the current working directory of the active terminal window,
# so a new terminal window can be started in the same directory. # so a new terminal window can be started in the same directory.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Add an EFI boot entry for the Nomarchy UKI, allowing the system to boot directly # Add an EFI boot entry for the Nomarchy UKI, allowing the system to boot directly
# without a bootloader like Limine. Requires UEFI firmware and a built UKI. # without a bootloader like Limine. Requires UEFI firmware and a built UKI.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Generator tolerates "no matches" exit codes from grep | sort. # Generator tolerates "no matches" exit codes from grep | sort.
# pipefail and -e off; -u stays. # pipefail and -e off; -u stays.
set -u set -u

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Returns drive information about a given volumne, like /dev/nvme0, which is used by nomarchy-drive-select. # Returns drive information about a given volumne, like /dev/nvme0, which is used by nomarchy-drive-select.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Select a drive from a list with info that includes space and brand. Used by nomarchy-drive-set-password. # Select a drive from a list with info that includes space and brand. Used by nomarchy-drive-set-password.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Set a new encryption password for a drive selected. # Set a new encryption password for a drive selected.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Font Helper # Nomarchy Font Helper
# Usage: nomarchy-font [selector|set <name>|list] # Usage: nomarchy-font [selector|set <name>|list]

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Toggles transparency for the currently focused window. # Toggles transparency for the currently focused window.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Get the active monitor (the one with the cursor) # Get the active monitor (the one with the cursor)
MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)') MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)')

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Close all open windows # Close all open windows
hyprctl clients -j | \ hyprctl clients -j | \

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Toggles the window gaps globally between no gaps and the default 10/5/2, declaratively and instantly. # Toggles the window gaps globally between no gaps and the default 10/5/2, declaratively and instantly.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Toggle to pop-out a tile to stay fixed on a display basis. # Toggle to pop-out a tile to stay fixed on a display basis.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Check current single_window_aspect_ratio setting # Check current single_window_aspect_ratio setting
CURRENT_VALUE=$(hyprctl getoption "layout:single_window_aspect_ratio" 2>/dev/null | head -1) CURRENT_VALUE=$(hyprctl getoption "layout:single_window_aspect_ratio" 2>/dev/null | head -1)

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Toggle the layout on the current active workspace between dwindle and scrolling # Toggle the layout on the current active workspace between dwindle and scrolling

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Install Script # Nomarchy Install Script
# Entry point for the Nomarchy installer. # Entry point for the Nomarchy installer.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Docker DBs Stub # Nomarchy Docker DBs Stub
# This script is a stub for a specialized tool. # This script is a stub for a specialized tool.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the fastfetch TUI that gives information about the current system. # Launch the fastfetch TUI that gives information about the current system.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the Nomarchy audio controls TUI (provided by wiremix). # Launch the Nomarchy audio controls TUI (provided by wiremix).

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the Nomarchy bluetooth controls TUI (provided by bluetui). # Launch the Nomarchy bluetooth controls TUI (provided by bluetui).
# Also attempts to unblock bluetooth service if rfkill had blocked it. # Also attempts to unblock bluetooth service if rfkill had blocked it.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the default browser as determined by xdg-settings. # Launch the default browser as determined by xdg-settings.
# Automatically converts --private into the correct flag for the given browser. # Automatically converts --private into the correct flag for the given browser.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing). # Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing).
# Starts suitable editors in a terminal window and otherwise as a regular application. # Starts suitable editors in a terminal window and otherwise as a regular application.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch a floating terminal with the Nomarchy logo presentation, then execute the command passed in, and finally end with the nomarchy-show-done presentation. # Launch a floating terminal with the Nomarchy logo presentation, then execute the command passed in, and finally end with the nomarchy-show-done presentation.
# Used by actions such as Update System. # Used by actions such as Update System.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch or focus on a given command identified by the passed in window-pattern. # Launch or focus on a given command identified by the passed in window-pattern.
# Use by some default bindings, like the one for Spotify, to ensure there is only one instance of the application open. # Use by some default bindings, like the one for Spotify, to ensure there is only one instance of the application open.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch or focus on a given TUI identified by the passed in as the command. # Launch or focus on a given TUI identified by the passed in as the command.
# Use by commands like nomarchy-launch-wifi to ensure there is only one wifi configuration screen open. # Use by commands like nomarchy-launch-wifi to ensure there is only one wifi configuration screen open.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch or focus on a given web app identified by the window-pattern. # Launch or focus on a given web app identified by the window-pattern.
# Use by some default bindings, like the one for WhatsApp, to ensure there is only one instance of the application open. # Use by some default bindings, like the one for WhatsApp, to ensure there is only one instance of the application open.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the Nomarchy screensaver in the default terminal on the system with the correct font configuration. # Launch the Nomarchy screensaver in the default terminal on the system with the correct font configuration.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the TUI command passed in as an argument in the default terminal with an org.nomarchy.COMMAND app id for styling. # Launch the TUI command passed in as an argument in the default terminal with an org.nomarchy.COMMAND app id for styling.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Wrapper to launch walker with elephant provider, or fallback to rofi if walker is missing. # Wrapper to launch walker with elephant provider, or fallback to rofi if walker is missing.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the passed in URL as a web app in the default browser (or chromium if the default doesn't support --app). # Launch the passed in URL as a web app in the default browser (or chromium if the default doesn't support --app).

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Launch the Nomarchy wifi controls (provided by the Impala TUI). # Launch the Nomarchy wifi controls (provided by the Impala TUI).
# Attempts to unblock the wifi service first in case it should be been blocked. # Attempts to unblock the wifi service first in case it should be been blocked.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Locks the system using hyprlock, but not before ensuring 1password has also been locked, and the screensaver stopped. # Locks the system using hyprlock, but not before ensuring 1password has also been locked, and the screensaver stopped.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Manual Script # Nomarchy Manual Script
# Opens the Nomarchy manual in the default web browser. # Opens the Nomarchy manual in the default web browser.

View File

@@ -1,6 +1,12 @@
#!/bin/bash #!/bin/bash
# Launch the Nomarchy Menu or takes a parameter to jump straight to a submenu. # Launch the Nomarchy Menu or takes a parameter to jump straight to a submenu.
#
# Deliberately runs WITHOUT `set -e`: this is an interactive UX loop, and
# action branches do `cmd; back_to <self>` so a failed action would abort
# the script under set -e and the menu would disappear without feedback.
# Soft-failure (the menu re-displays, the user picks again) is the right
# semantic here.
export PATH="$HOME/.local/share/nomarchy/bin:$PATH" export PATH="$HOME/.local/share/nomarchy/bin:$PATH"
@@ -66,7 +72,7 @@ show_learn_menu() {
*Arch*) nomarchy-launch-webapp "https://wiki.archlinux.org/title/Main_page" ;; *Arch*) nomarchy-launch-webapp "https://wiki.archlinux.org/title/Main_page" ;;
*Bash*) nomarchy-launch-webapp "https://devhints.io/bash" ;; *Bash*) nomarchy-launch-webapp "https://devhints.io/bash" ;;
*Neovim*) nomarchy-launch-webapp "https://www.lazyvim.org/keymaps" ;; *Neovim*) nomarchy-launch-webapp "https://www.lazyvim.org/keymaps" ;;
*) show_main_menu ;; *) back_to show_main_menu ;;
esac esac
} }
@@ -76,7 +82,7 @@ show_trigger_menu() {
*Share*) show_share_menu ;; *Share*) show_share_menu ;;
*Toggle*) show_toggle_menu ;; *Toggle*) show_toggle_menu ;;
*Hardware*) show_hardware_menu ;; *Hardware*) show_hardware_menu ;;
*) show_main_menu ;; *) back_to show_main_menu ;;
esac esac
} }
@@ -146,14 +152,14 @@ show_share_menu() {
show_toggle_menu() { show_toggle_menu() {
case $(menu "Toggle" "󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Display Scaling") in case $(menu "Toggle" "󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Display Scaling") in
*Screensaver*) nomarchy-toggle-screensaver ;; *Screensaver*) nomarchy-toggle-screensaver; back_to show_toggle_menu ;;
*Nightlight*) nomarchy-toggle-nightlight ;; *Nightlight*) nomarchy-toggle-nightlight; back_to show_toggle_menu ;;
*Idle*) nomarchy-toggle-idle ;; *Idle*) nomarchy-toggle-idle; back_to show_toggle_menu ;;
*Bar*) nomarchy-toggle-waybar ;; *Bar*) nomarchy-toggle-waybar; back_to show_toggle_menu ;;
*Layout*) nomarchy-hyprland-workspace-layout-toggle ;; *Layout*) nomarchy-hyprland-workspace-layout-toggle; back_to show_toggle_menu ;;
*Ratio*) nomarchy-hyprland-window-single-square-aspect-toggle ;; *Ratio*) nomarchy-hyprland-window-single-square-aspect-toggle; back_to show_toggle_menu ;;
*Gaps*) nomarchy-hyprland-window-gaps-toggle ;; *Gaps*) nomarchy-hyprland-window-gaps-toggle; back_to show_toggle_menu ;;
*Scaling*) nomarchy-hyprland-monitor-scaling-cycle ;; *Scaling*) nomarchy-hyprland-monitor-scaling-cycle; back_to show_toggle_menu ;;
*) back_to show_trigger_menu ;; *) back_to show_trigger_menu ;;
esac esac
} }
@@ -161,7 +167,7 @@ show_toggle_menu() {
show_hardware_menu() { show_hardware_menu() {
case $(menu "Toggle" " Hybrid GPU") in case $(menu "Toggle" " Hybrid GPU") in
*"Hybrid GPU"*) present_terminal nomarchy-toggle-hybrid-gpu ;; *"Hybrid GPU"*) present_terminal nomarchy-toggle-hybrid-gpu ;;
*) show_trigger_menu ;; *) back_to show_trigger_menu ;;
esac esac
} }
@@ -173,16 +179,18 @@ show_style_menu() {
*Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;; *Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;;
*Screensaver*) open_in_editor ~/.config/nomarchy/branding/screensaver.txt ;; *Screensaver*) open_in_editor ~/.config/nomarchy/branding/screensaver.txt ;;
*About*) open_in_editor ~/.config/nomarchy/branding/about.txt ;; *About*) open_in_editor ~/.config/nomarchy/branding/about.txt ;;
*) show_main_menu ;; *) back_to show_main_menu ;;
esac esac
} }
show_theme_menu() { show_theme_menu() {
nomarchy-launch-walker -m menus:nomarchythemes --width 800 --minheight 400 nomarchy-launch-walker -m menus:nomarchythemes --width 800 --minheight 400
back_to show_style_menu
} }
show_background_menu() { show_background_menu() {
nomarchy-launch-walker -m menus:nomarchyBackgroundSelector --width 800 --minheight 400 nomarchy-launch-walker -m menus:nomarchyBackgroundSelector --width 800 --minheight 400
back_to show_style_menu
} }
show_font_menu() { show_font_menu() {
@@ -191,6 +199,7 @@ show_font_menu() {
back_to show_style_menu back_to show_style_menu
else else
nomarchy-font-set "$theme" nomarchy-font-set "$theme"
back_to show_font_menu
fi fi
} }
@@ -212,7 +221,7 @@ show_setup_menu() {
*DNS*) present_terminal nomarchy-setup-dns ;; *DNS*) present_terminal nomarchy-setup-dns ;;
*Security*) show_setup_security_menu ;; *Security*) show_setup_security_menu ;;
*Config*) show_setup_config_menu ;; *Config*) show_setup_config_menu ;;
*) show_main_menu ;; *) back_to show_main_menu ;;
esac esac
} }
@@ -223,6 +232,7 @@ show_setup_power_menu() {
back_to show_setup_menu back_to show_setup_menu
else else
powerprofilesctl set "$profile" powerprofilesctl set "$profile"
back_to show_setup_power_menu
fi fi
} }
@@ -230,7 +240,7 @@ show_setup_security_menu() {
case $(menu "Setup" "󰈷 Fingerprint\n Fido2") in case $(menu "Setup" "󰈷 Fingerprint\n Fido2") in
*Fingerprint*) present_terminal nomarchy-setup-fingerprint ;; *Fingerprint*) present_terminal nomarchy-setup-fingerprint ;;
*Fido2*) present_terminal nomarchy-setup-fido2 ;; *Fido2*) present_terminal nomarchy-setup-fido2 ;;
*) show_setup_menu ;; *) back_to show_setup_menu ;;
esac esac
} }
@@ -246,7 +256,7 @@ show_setup_config_menu() {
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && nomarchy-restart-waybar ;; *Waybar*) open_in_editor ~/.config/waybar/config.jsonc && nomarchy-restart-waybar ;;
*XCompose*) open_in_editor ~/.XCompose && nomarchy-restart-xcompose ;; *XCompose*) open_in_editor ~/.XCompose && nomarchy-restart-xcompose ;;
*Overrides*) xdg-open ~/.config/nomarchy/overrides/ ;; *Overrides*) xdg-open ~/.config/nomarchy/overrides/ ;;
*) show_setup_menu ;; *) back_to show_setup_menu ;;
esac esac
} }
@@ -266,10 +276,10 @@ show_setup_system_menu() {
fi fi
case $(menu "System" "$options") in case $(menu "System" "$options") in
*Suspend*) nomarchy-toggle-suspend ;; *Suspend*) nomarchy-toggle-suspend; back_to show_setup_system_menu ;;
*"Enable Hibernate"*) present_terminal nomarchy-hibernation-setup ;; *"Enable Hibernate"*) present_terminal nomarchy-hibernation-setup ;;
*"Disable Hibernate"*) present_terminal nomarchy-hibernation-remove ;; *"Disable Hibernate"*) present_terminal nomarchy-hibernation-remove ;;
*) show_setup_menu ;; *) back_to show_setup_menu ;;
esac esac
} }
@@ -285,17 +295,17 @@ show_update_menu() {
*Timezone*) present_terminal nomarchy-tz-select ;; *Timezone*) present_terminal nomarchy-tz-select ;;
*Time*) present_terminal nomarchy-update-time ;; *Time*) present_terminal nomarchy-update-time ;;
*Password*) show_update_password_menu ;; *Password*) show_update_password_menu ;;
*) show_main_menu ;; *) back_to show_main_menu ;;
esac esac
} }
show_update_process_menu() { show_update_process_menu() {
case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in
*Hypridle*) nomarchy-restart-hypridle ;; *Hypridle*) nomarchy-restart-hypridle; back_to show_update_process_menu ;;
*Hyprsunset*) nomarchy-restart-hyprsunset ;; *Hyprsunset*) nomarchy-restart-hyprsunset; back_to show_update_process_menu ;;
*Swayosd*) nomarchy-restart-swayosd ;; *Swayosd*) nomarchy-restart-swayosd; back_to show_update_process_menu ;;
*Walker*) nomarchy-restart-walker ;; *Walker*) nomarchy-restart-walker; back_to show_update_process_menu ;;
*Waybar*) nomarchy-restart-waybar ;; *Waybar*) nomarchy-restart-waybar; back_to show_update_process_menu ;;
*) show_update_menu ;; *) back_to show_update_menu ;;
esac esac
} }
@@ -306,7 +316,7 @@ show_update_hardware_menu() {
*Audio*) present_terminal nomarchy-restart-pipewire ;; *Audio*) present_terminal nomarchy-restart-pipewire ;;
*Wi-Fi*) present_terminal nomarchy-restart-wifi ;; *Wi-Fi*) present_terminal nomarchy-restart-wifi ;;
*Bluetooth*) present_terminal nomarchy-restart-bluetooth ;; *Bluetooth*) present_terminal nomarchy-restart-bluetooth ;;
*) show_update_menu ;; *) back_to show_update_menu ;;
esac esac
} }
@@ -314,7 +324,7 @@ show_update_password_menu() {
case $(menu "Update Password" " Drive Encryption\n User") in case $(menu "Update Password" " Drive Encryption\n User") in
*Drive*) present_terminal nomarchy-drive-set-password ;; *Drive*) present_terminal nomarchy-drive-set-password ;;
*User*) present_terminal passwd ;; *User*) present_terminal passwd ;;
*) show_update_menu ;; *) back_to show_update_menu ;;
esac esac
} }

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Display Hyprland keybindings defined in your configuration using walker for an interactive search menu. # Display Hyprland keybindings defined in your configuration using walker for an interactive search menu.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Dismiss a mako notification on the basis of its summary. Used by the first-run notifications to dismiss them after clicking for action. # Dismiss a mako notification on the basis of its summary. Used by the first-run notifications to dismiss them after clicking for action.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# Install an npx wrapper for a given npm package. # Install an npx wrapper for a given npm package.
# Usage: nomarchy-npx-install <package> [command-name] # Usage: nomarchy-npx-install <package> [command-name]

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy on-boot initialization script. # Nomarchy on-boot initialization script.
# Automatically detects the hardware, applies necessary runtime tweaks, # Automatically detects the hardware, applies necessary runtime tweaks,

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy AUR Stub # Nomarchy AUR Stub
# Informs the user that AUR is not applicable to NixOS. # Informs the user that AUR is not applicable to NixOS.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Package Drop Script # Nomarchy Package Drop Script
# Alias for nomarchy-pkg-remove. # Alias for nomarchy-pkg-remove.

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
# Nomarchy Package Install Script # Nomarchy Package Install Script
# Alias for nomarchy-pkg-add for users coming from other distros. # Alias for nomarchy-pkg-add for users coming from other distros.

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
# nomarchy-refresh-config: Restore a specific configuration file to its stock version. # nomarchy-refresh-config: Restore a specific configuration file to its stock version.
# Usage: nomarchy-refresh-config <relative-path-to-config> # Usage: nomarchy-refresh-config <relative-path-to-config>

Some files were not shown because too many files have changed in this diff Show More