gostui-setup #1

Merged
GarandPLG merged 9 commits from gostui-setup into main 2025-12-06 22:09:37 +00:00

9 Commits

Author SHA1 Message Date
29d8273629 . 2025-12-06 23:07:18 +01:00
8940198d02 poprawienie flake'a i dodanie licencji 2025-12-06 23:06:45 +01:00
ba24e36c7a Add NixOS module and improve UI navigation and rendering
The flake now includes a NixOS module that enables integration with
system configuration. The TUI has been enhanced with better file
switching using arrow keys, space bar support for toggling values,
improved scrolling logic, styled category headings, and visual selection
feedback. Documentation comments were streamlined and placeholder files
removed.
2025-12-06 22:17:45 +01:00
09faba4f7c Extract option context method for toggle handling
Removed the commented‑out EditFile event and its match arm. Added
get_selected_option_context to centralize module retrieval, AST updates,
and file writes, simplifying the Enter‑key handling logic.
2025-12-06 20:06:40 +01:00
6c50da8c18 Refactor Nix handling and add toggle UI
- Introduce `NixModules` struct containing file paths, parsed ASTs, and
option lists. - Add `parse_nix` and `build_nix_modules` helpers for
centralized parsing. - Update CLI to use `build_nix_modules` instead of
manual parsing. - Extend `App` with system/home paths and ASTs, enabling
in‑place editing. - Implement boolean toggle on Enter: update AST,
rewrite file, refresh modules, and report action. - Simplify event
handling, adding shortcuts `1`/`2` to switch files. - Revise UI layout,
introduce footer with usage hints and last‑action status. - Adjust
imports and remove obsolete code across modules.
2025-12-06 17:21:44 +01:00
19e820ca93 Add clap dependency and update app for CLI integration
Update Cargo files to add clap and related dependencies, restructure App
to handle configuration from CLI, and update nix module to support
config source tracking. Add new cli module and adjust main to initialize
modules at startup.
2025-12-04 23:16:45 +01:00
21d6d7997f Add TUI application and Nix option helpers
Introduce a terminal UI with a progress bar and key controls, and add
utilities for collecting and querying boolean Nix options. The toggle
function also allows flipping a boolean value in the source.
2025-12-01 18:56:10 +01:00
e6e1695084 Add support for category comments in Nix option collection
The nix module now parses `/* */` comments as categories and associates
them with subsequent options. The output format has been updated to
include the category prefix before the option path. The internal state
is maintained during traversal to ensure correct category propagation
through nested structures.
2025-12-01 00:43:23 +01:00
cb35269308 Add Nix configuration parser and option extraction
Introduce rnix dependency to parse Nix files and collect boolean options
with their full attribute paths from a test configuration file
2025-12-01 00:04:51 +01:00