Refactor Plan
Repository Refactoring & Improvement Plan
This document outlines a strategic plan to address architectural debt, complete the hey toolchain, and polish the desktop experience, based on existing TODOs, FIXMEs, and roadmap documentation.
Phase 1: Architectural Debt & Theme Engine Upgrade
- Strictly Typed Theme Submodules
- Colors: Convert loose
mkOpt strcolor definitions inmodules/themes/default.nixinto a strict Nixtypes.submoduleto enforce the ANSI + Types specification at evaluation time. - Fonts & Wallpapers: Address
# TODO: Use submodulesand# TODO: Make attrsOf submoduleinmodules/themes/default.nixto enforce standard schemas.
- Colors: Convert loose
- Deconstruct the Theme Monolith (
apps.nix)- Split
modules/themes/apps.nixinto functional categories undermodules/themes/apps/(e.g.,browsers.nix,terminals.nix,shell.nix) as per the roadmap.
- Split
- NixOS System Builder Refactor
- Address
# FIXME: Refactor me! (Use submodules?)inlib/nixos.nix. Utilize submodules for host definitions to make instantiation cleaner and more resilient.
- Address
Phase 2: Hey Toolchain & Scripting Completeness
- Window Manager Hooks
- Implement missing hook dispatchers in
config/niri/hooks/all.zsh,config/hypr/hooks/all.zsh, andconfig/bspwm/hooks/all.zshto handle events likebatteryoridlecorrectly per compositor.
- Implement missing hook dispatchers in
- Missing Rofi Menus & OSD
- Complete stubs for
config/rofi/bin/powermenu.zshandemojimenu.sh. - Implement
# TODO: Favicon libinconfig/rofi/bin/vaultmenu.janet. - Implement
# TODO: Need hey .osd analogfor BSPWM inmodules/desktop/bspwm.nix.
- Complete stubs for
- Toolchain Compilation Robustness
- Resolve
# TODO: Include gcc for 'jpm deps'inmodules/hey.nixto ensure native Janet C-modules compile reliably during system activation.
- Resolve
Phase 3: Desktop Polish & Testing
- Standardize Screenshot Tooling
- Address
# TODO: Replace maim/slop with flameshotinmodules/desktop/bspwm.nixto unify the screenshot experience across X11 and Wayland.
- Address
- Niri Metadata Parsing
- Fix
# TODO: niri windows metadata doesn't have .at and .sizeinbin/get-window.zshby mapping Niri’s IPC JSON structure to match standard scripts.
- Fix
- Flesh out the Janet Test Suite
- Implement
# TODO (deftest ...)stubs intest/hey/lib.janet,test/hey/glob.janet, andtest/hey/vars.janetto ensure robust path resolution and state management for theheyCLI.
- Implement