feat(audit): address batch 1 of missing scripts and enable fwupd

- Move 18 Hyprland/desktop scripts from features/desktop/scripts/ to packaged directories
- Add nomarchy.hardware.fwupd option (default false) and enable service
- Implement nomarchy-update-firmware wrapper for fwupdmgr
- Add hyprland, swayosd, and fwupd to nomarchy-system-scripts dependencies
- Update docs/SCRIPTS.md with 'kept' status for ported scripts
This commit is contained in:
Bernardo Magri
2026-04-25 22:34:04 +01:00
parent 983ade0f55
commit 0728da4374
23 changed files with 90 additions and 67 deletions

View File

@@ -10,9 +10,18 @@ in
isT2Mac = mkEnableOption "Apple T2 MacBook specific hardware fixes";
isFramework = mkEnableOption "Framework laptop specific hardware fixes";
hasIPU7Camera = mkEnableOption "Intel IPU7 camera support";
fwupd = mkOption {
type = types.bool;
default = false;
description = "Whether to enable fwupd firmware update service.";
};
};
config = mkMerge [
(mkIf cfg.fwupd {
services.fwupd.enable = true;
})
(mkIf cfg.isXPS {
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:00:19.0", ATTR{power/control}="on"

View File

@@ -30,6 +30,9 @@ let
bc
supergfxctl
systemd
fwupd
hyprland
swayosd
];
in
pkgs.stdenv.mkDerivation {

View File

@@ -24,7 +24,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
- `delete-dead` — Phase B verdict: remove and update callers.
- `stub-with-notify` — Phase B verdict: temporary `notify-send` stub.
## Scripts (131)
## Scripts (149)
| Script | Location | Callers | Status | Notes |
| --- | --- | --- | --- | --- |
@@ -61,6 +61,13 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-hw-asus-rog` | `core/system/scripts` | features/scripts/utils/nomarchy-on-boot | `kept` | |
| `nomarchy-hw-match` | `core/system/scripts` | features/scripts/utils/nomarchy-on-boot | `kept` | |
| `nomarchy-hw-vulkan` | `core/system/scripts` | features/scripts/utils/nomarchy-voxtype-install | `kept` | |
| `nomarchy-hyprland-active-window-transparency-toggle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf | `kept` | |
| `nomarchy-hyprland-monitor-scaling-cycle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf,features/scripts/utils/nomarchy-menu, +1 more | `kept` | |
| `nomarchy-hyprland-window-close-all` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/tiling.conf,core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf, +3 more | `kept` | |
| `nomarchy-hyprland-window-gaps-toggle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-hyprland-window-pop` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf | `kept` | |
| `nomarchy-hyprland-window-single-square-aspect-toggle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-hyprland-workspace-layout-toggle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-launch-about` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-launch-audio` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/desktop/waybar/config/config.jsonc, +2 more | `kept` | |
| `nomarchy-launch-bluetooth` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/desktop/waybar/config/config.jsonc, +1 more | `kept` | |
@@ -88,14 +95,21 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-preflight-migration` | `core/system/scripts` | features/scripts/utils/nomarchy-env-update,features/scripts/utils/nomarchy-migrate-state | `kept` | |
| `nomarchy-refresh-config` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-refresh-fastfetch | `kept` | |
| `nomarchy-refresh-fastfetch` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-restart-app` | `features/scripts/utils` | core/system/scripts/nomarchy-restart-xcompose,features/desktop/scripts/nomarchy-restart-hypridle, +3 more | `kept` | |
| `nomarchy-restart-app` | `features/scripts/utils` | core/system/scripts/nomarchy-restart-xcompose,features/scripts/utils/nomarchy-restart-hypridle, +3 more | `kept` | |
| `nomarchy-restart-bluetooth` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-restart-btop` | `features/scripts/utils` | themes/engine/scripts/nomarchy-theme-set | `kept` | |
| `nomarchy-restart-hyprctl` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-restart-hypridle` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-restart-hyprsunset` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-restart-mako` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-restart-opencode` | `features/scripts/utils` | themes/engine/scripts/nomarchy-theme-set | `kept` | |
| `nomarchy-restart-pipewire` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-restart-swayosd` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-restart-terminal` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md | `kept` | |
| `nomarchy-restart-tmux` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-restart-trackpad` | `core/system/scripts` | — | `unused?` | |
| `nomarchy-restart-walker` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +1 more | `kept` | |
| `nomarchy-restart-waybar` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +3 more | `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-setup-dns` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
@@ -109,6 +123,8 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-sudo-keepalive` | `core/system/scripts` | — | `unused?` | |
| `nomarchy-sudo-passwordless-toggle` | `core/system/scripts` | — | `unused?` | |
| `nomarchy-sudo-reset` | `core/system/scripts` | — | `unused?` | |
| `nomarchy-swayosd-brightness` | `core/system/scripts` | core/system/scripts/nomarchy-brightness-display,core/system/scripts/nomarchy-brightness-display-apple | `kept` | |
| `nomarchy-swayosd-kbd-brightness` | `core/system/scripts` | core/system/scripts/nomarchy-brightness-keyboard | `kept` | |
| `nomarchy-sync` | `features/scripts/utils` | README.md | `kept` | |
| `nomarchy-system-logout` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-system-reboot` | `core/system/scripts` | core/home/config/nomarchy-skill/SKILL.md,core/system/scripts/nomarchy-hibernation-setup, +2 more | `kept` | |
@@ -137,6 +153,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-toggle-idle` | `core/system/scripts` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/desktop/waybar/config/config.jsonc, +2 more | `kept` | |
| `nomarchy-toggle-nightlight` | `themes/engine/scripts` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,core/home/config/nomarchy-skill/SKILL.md, +1 more | `kept` | |
| `nomarchy-toggle-notification-silencing` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/desktop/waybar/config/config.jsonc, +1 more | `kept` | |
| `nomarchy-toggle-screensaver` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-toggle-suspend` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-toggle-waybar` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,core/home/config/nomarchy-skill/SKILL.md, +1 more | `kept` | |
| `nomarchy-tui-install` | `features/scripts/utils` | features/scripts/utils/nomarchy-tui-remove-all | `kept` | |
@@ -145,6 +162,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-tz-select` | `core/system/scripts` | features/desktop/waybar/config/config.jsonc,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-update` | `core/system/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/desktop/waybar/config/config.jsonc, +3 more | `kept` | |
| `nomarchy-update-available` | `features/scripts/utils` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-night/config.jsonc | `kept` | |
| `nomarchy-update-firmware` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-update-time` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-voxtype-config` | `features/scripts/utils` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-night/config.jsonc | `kept` | |
| `nomarchy-voxtype-install` | `features/scripts/utils` | — | `unused?` | |
@@ -174,13 +192,6 @@ Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bi
| `nomarchy-dryrun` | installer/install.sh | `missing` |
| `nomarchy-font` | core/home/config/nomarchy-skill/SKILL.md,core/system/fonts.nix, +6 more | `missing` |
| `nomarchy-font-selector` | themes/engine/switcher.nix | `missing` |
| `nomarchy-hyprland-active-window-transparency-toggle` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf | `missing` |
| `nomarchy-hyprland-monitor-scaling-cycle` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf,features/scripts/utils/nomarchy-menu, +1 more | `missing` |
| `nomarchy-hyprland-window-close-all` | core/home/config/nomarchy/default/hypr/bindings/tiling.conf,core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf, +3 more | `missing` |
| `nomarchy-hyprland-window-gaps-toggle` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-hyprland-window-pop` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf,features/desktop/scripts/nomarchy-hyprland-window-pop | `missing` |
| `nomarchy-hyprland-window-single-square-aspect-toggle` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-hyprland-workspace-layout-toggle` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf,features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-install` | core/home/config/nomarchy-skill/SKILL.md,hosts/installer-iso.nix, +2 more | `missing` |
| `nomarchy-install-` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
| `nomarchy-install-docker-dbs` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
@@ -202,19 +213,12 @@ Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bi
| `nomarchy-reinstall` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
| `nomarchy-restart` | core/home/config/nomarchy-skill/SKILL.md,core/system/scripts/nomarchy-restart-xcompose, +9 more | `missing` |
| `nomarchy-restart-` | core/home/config/nomarchy-skill/SKILL.md,core/system/scripts/nomarchy-restart-xcompose, +9 more | `missing` |
| `nomarchy-restart-hypridle` | features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-restart-hyprsunset` | features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-restart-swayosd` | features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-restart-walker` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +1 more | `missing` |
| `nomarchy-restart-waybar` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +3 more | `missing` |
| `nomarchy-rollback` | installer/disko-golden.nix | `missing` |
| `nomarchy-screenrecord-filename` | features/scripts/utils/nomarchy-cmd-screenrecord | `missing` |
| `nomarchy-scripts` | core/system/scripts/nomarchy-preflight-migration,features/scripts/battery-monitor.nix, +1 more | `missing` |
| `nomarchy-sddm-theme` | themes/engine/sddm.nix | `missing` |
| `nomarchy-setup-` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-skill` | core/home/configs.nix | `missing` |
| `nomarchy-swayosd-brightness` | core/system/scripts/nomarchy-brightness-display,core/system/scripts/nomarchy-brightness-display-apple, +1 more | `missing` |
| `nomarchy-swayosd-kbd-brightness` | core/system/scripts/nomarchy-brightness-keyboard,features/desktop/scripts/nomarchy-swayosd-kbd-brightness | `missing` |
| `nomarchy-system-scripts` | core/system/hardware.nix,core/system/scripts-derivation.nix, +1 more | `missing` |
| `nomarchy-theme` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +13 more | `missing` |
| `nomarchy-theme-` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu, +13 more | `missing` |
@@ -222,10 +226,8 @@ Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bi
| `nomarchy-theme-next` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
| `nomarchy-theme-selector` | themes/engine/switcher.nix | `missing` |
| `nomarchy-themes-no-images` | themes/engine/files.nix | `missing` |
| `nomarchy-toggle-` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,core/home/config/nomarchy-skill/SKILL.md, +4 more | `missing` |
| `nomarchy-toggle-screensaver` | features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-toggle-` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,core/home/config/nomarchy-skill/SKILL.md, +3 more | `missing` |
| `nomarchy-update-` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-night/config.jsonc, +1 more | `missing` |
| `nomarchy-update-firmware` | features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-upload-log` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
| `nomarchy-version` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-snapshot | `missing` |
| `nomarchy-vm` | features/scripts/utils/nomarchy-test-vm | `missing` |
@@ -256,14 +258,14 @@ Walked from `features/scripts/utils/nomarchy-menu`. Each `case` arm in a `show_*
| `show_share_menu` | Clipboard | `nomarchy-cmd-share` | `kept` |
| `show_share_menu` | File | `nomarchy-cmd-share` | `kept` |
| `show_share_menu` | Folder | `nomarchy-cmd-share` | `kept` |
| `show_toggle_menu` | Screensaver | `nomarchy-toggle-screensaver` | `missing` |
| `show_toggle_menu` | Screensaver | `nomarchy-toggle-screensaver` | `kept` |
| `show_toggle_menu` | Nightlight | `nomarchy-toggle-nightlight` | `kept` |
| `show_toggle_menu` | Idle | `nomarchy-toggle-idle` | `kept` |
| `show_toggle_menu` | Bar | `nomarchy-toggle-waybar` | `kept` |
| `show_toggle_menu` | Layout | `nomarchy-hyprland-workspace-layout-toggle` | `missing` |
| `show_toggle_menu` | Ratio | `nomarchy-hyprland-window-single-square-aspect-toggle` | `missing` |
| `show_toggle_menu` | Gaps | `nomarchy-hyprland-window-gaps-toggle` | `missing` |
| `show_toggle_menu` | Scaling | `nomarchy-hyprland-monitor-scaling-cycle` | `missing` |
| `show_toggle_menu` | Layout | `nomarchy-hyprland-workspace-layout-toggle` | `kept` |
| `show_toggle_menu` | Ratio | `nomarchy-hyprland-window-single-square-aspect-toggle` | `kept` |
| `show_toggle_menu` | Gaps | `nomarchy-hyprland-window-gaps-toggle` | `kept` |
| `show_toggle_menu` | Scaling | `nomarchy-hyprland-monitor-scaling-cycle` | `kept` |
| `show_style_menu` | Theme | `_(inline)_` | `kept` |
| `show_style_menu` | Font | `_(inline)_` | `kept` |
| `show_style_menu` | Background | `_(inline)_` | `kept` |
@@ -285,12 +287,12 @@ Walked from `features/scripts/utils/nomarchy-menu`. Each `case` arm in a `show_*
| `show_setup_security_menu` | Fido2 | `nomarchy-setup-fido2` | `kept` |
| `show_setup_config_menu` | Defaults | `_(inline)_` | `kept` |
| `show_setup_config_menu` | Hyprland | `_(inline)_` | `kept` |
| `show_setup_config_menu` | Hypridle | `nomarchy-restart-hypridle` | `missing` |
| `show_setup_config_menu` | Hypridle | `nomarchy-restart-hypridle` | `kept` |
| `show_setup_config_menu` | Hyprlock | `_(inline)_` | `kept` |
| `show_setup_config_menu` | Hyprsunset | `nomarchy-restart-hyprsunset` | `missing` |
| `show_setup_config_menu` | Swayosd | `nomarchy-restart-swayosd` | `missing` |
| `show_setup_config_menu` | Walker | `nomarchy-restart-walker` | `missing` |
| `show_setup_config_menu` | Waybar | `nomarchy-restart-waybar` | `missing` |
| `show_setup_config_menu` | Hyprsunset | `nomarchy-restart-hyprsunset` | `kept` |
| `show_setup_config_menu` | Swayosd | `nomarchy-restart-swayosd` | `kept` |
| `show_setup_config_menu` | Walker | `nomarchy-restart-walker` | `kept` |
| `show_setup_config_menu` | Waybar | `nomarchy-restart-waybar` | `kept` |
| `show_setup_config_menu` | XCompose | `nomarchy-restart-xcompose` | `kept` |
| `show_setup_config_menu` | Overrides | `_(inline)_` | `kept` |
| `show_setup_system_menu` | Suspend | `nomarchy-toggle-suspend` | `kept` |
@@ -298,15 +300,15 @@ Walked from `features/scripts/utils/nomarchy-menu`. Each `case` arm in a `show_*
| `show_update_menu` | Themes | `nomarchy-theme-update` | `kept` |
| `show_update_menu` | Process | `_(inline)_` | `kept` |
| `show_update_menu` | Hardware | `_(inline)_` | `kept` |
| `show_update_menu` | Firmware | `nomarchy-update-firmware` | `missing` |
| `show_update_menu` | Firmware | `nomarchy-update-firmware` | `kept` |
| `show_update_menu` | Timezone | `nomarchy-tz-select` | `kept` |
| `show_update_menu` | Time | `nomarchy-update-time` | `kept` |
| `show_update_menu` | Password | `_(inline)_` | `kept` |
| `show_update_process_menu` | Hypridle | `nomarchy-restart-hypridle` | `missing` |
| `show_update_process_menu` | Hyprsunset | `nomarchy-restart-hyprsunset` | `missing` |
| `show_update_process_menu` | Swayosd | `nomarchy-restart-swayosd` | `missing` |
| `show_update_process_menu` | Walker | `nomarchy-restart-walker` | `missing` |
| `show_update_process_menu` | Waybar | `nomarchy-restart-waybar` | `missing` |
| `show_update_process_menu` | Hypridle | `nomarchy-restart-hypridle` | `kept` |
| `show_update_process_menu` | Hyprsunset | `nomarchy-restart-hyprsunset` | `kept` |
| `show_update_process_menu` | Swayosd | `nomarchy-restart-swayosd` | `kept` |
| `show_update_process_menu` | Walker | `nomarchy-restart-walker` | `kept` |
| `show_update_process_menu` | Waybar | `nomarchy-restart-waybar` | `kept` |
| `show_update_hardware_menu` | Audio | `nomarchy-restart-pipewire` | `kept` |
| `show_update_hardware_menu` | Wi-Fi | `nomarchy-restart-wifi` | `kept` |
| `show_update_hardware_menu` | Bluetooth | `nomarchy-restart-bluetooth` | `kept` |

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Toggles the waybar top bar.
# Hybrid: updates state.json and provides instant feedback.
STATE_DIR="$HOME/.config/nomarchy"
STATE_FILE="$STATE_DIR/state.json"
mkdir -p "$STATE_DIR"
# Initialize if doesn't exist
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
if [[ $NOMARCHY_TOGGLE_WAYBAR == "false" ]]; then
NEW_VALUE="true"
uwsm-app -- waybar >/dev/null 2>&1 &
notify-send -u low " Top bar enabled"
else
NEW_VALUE="false"
pkill -x waybar
notify-send -u low " Top bar disabled"
fi
TMP_JSON=$(mktemp)
jq --argjson val "$NEW_VALUE" '.waybar = $val' "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
echo "Waybar state set to $NEW_VALUE. Environment will be fully updated on next rebuild."

28
features/scripts/utils/nomarchy-toggle-waybar Normal file → Executable file
View File

@@ -1,10 +1,26 @@
#!/bin/bash
#!/usr/bin/env bash
# nomarchy-toggle-waybar: Toggle the Waybar status bar on and off.
# Toggles the waybar top bar.
# Hybrid: updates state.json and provides instant feedback.
if pgrep -x waybar > /dev/null; then
pkill waybar
STATE_DIR="$HOME/.config/nomarchy"
STATE_FILE="$STATE_DIR/state.json"
mkdir -p "$STATE_DIR"
# Initialize if doesn't exist
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
if [[ $NOMARCHY_TOGGLE_WAYBAR == "false" ]]; then
NEW_VALUE="true"
uwsm-app -- waybar >/dev/null 2>&1 &
notify-send -u low " Top bar enabled"
else
# Start waybar in the background using uwsm
uwsm-app -- waybar &
NEW_VALUE="false"
pkill -x waybar
notify-send -u low " Top bar disabled"
fi
TMP_JSON=$(mktemp)
jq --argjson val "$NEW_VALUE" '.waybar = $val' "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
echo "Waybar state set to $NEW_VALUE. Environment will be fully updated on next rebuild."

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Nomarchy Firmware Update Script
# Wraps fwupdmgr to update hardware firmware.
set -e
echo "Checking for firmware updates..."
if ! fwupdmgr get-updates; then
echo "No updates available or fwupd service not running."
exit 0
fi
if gum confirm "Apply firmware updates? (Requires a reboot to finalize some updates)"; then
fwupdmgr update
echo "Firmware update complete. Please reboot if prompted."
else
echo "Update cancelled."
fi