repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

wip: sync local dotfiles

3802e0663d64a972b6c62241384e12253beec90f

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (58)

.gitmodules

Modified
1 1 [submodule "Notes"]
2 2 path = Notes
3 - url = git@github.com:bugabinga/Notes.git
3 + url = git@vcs.bugabinga.net:Notes.git
4 4 branch = trunk
5 5 [submodule "pi-ext"]
6 6 path = pi-ext
7 - url = git@github.com:bugabinga/pi-ext.git
7 + url = git@vcs.bugabinga.net:pi-ext.git
8 8 branch = trunk

Notes

Modified
1 -Subproject commit 67f79b6f417e95cb9598b7783db4e3f873f36f69
1 +Subproject commit 58ade5460152050b8dc410fddc9567c6199c390a

docs/super/inventory/2026-06-14-nugu-theme-current-state.md

Added
new file mode 100644
1 +# Nugu Theme Current-State Inventory — 2026-06-14
3 +Goal: build theme switching system with Nugu as source of truth.
5 +## Source of truth
7 +Nugu source files:
9 +- `nugu/base.toml` — seed colors + intent comments.
10 +- `nugu/nugu.nu` — palette generation + WCAG validation.
11 +- `nugu/palette.nu` — reads generated `nugu/output/dark.toml` and `nugu/output/light.toml`.
12 +- App generators:
13 + - `nugu/helix.nu`
14 + - `nugu/wezterm.nu`
15 + - `nugu/ghostty.nu`
16 + - `nugu/hypr.nu`
17 + - `nugu/linux_console.nu`
18 + - `nugu/mako.nu`
19 + - `nugu/ironbar.nu`
20 + - `nugu/yazi.nu`
21 + - `nugu/aerc.nu`
22 + - `nugu/neovim.nu`
23 + - `nugu/site.nu`
25 +Tools observed:
27 +- `nu 0.113.1`
28 +- `just 1.52.0`
29 +- `taplo 0.10.0`
30 +- `pastel 0.12.0`
32 +Nugu recipes from `nugu/justfile`:
34 +- `build` → `nugu/output/dark.toml`, `nugu/output/light.toml`.
35 +- `check` → format + WCAG validation.
36 +- `install` → helix + wezterm + ghostty + linux-console + hypr + mako + ironbar + aerc + yazi + nvim.
37 +- Per-app recipes: `helix`, `wezterm`, `nvim`, `ghostty`, `hypr`, `linux-console`, `mako`, `ironbar`, `yazi`, `aerc`.
39 +## Tracked generated Nugu outputs
41 +Tracked generated/theme consumers found by `git ls-files`:
43 +- `aerc/stylesets/nugu-dark`
44 +- `aerc/stylesets/nugu-light`
45 +- `bash/linux-console/nugu-dark.sh`
46 +- `bash/linux-console/nugu-light.sh`
47 +- `clipse/nugu.json`
48 +- `cmus/nugu.theme`
49 +- `ghostty/themes/nugu-dark`
50 +- `ghostty/themes/nugu-light`
51 +- `helix/themes/nugu-dark.toml`
52 +- `helix/themes/nugu-light.toml`
53 +- `hypr/generated/nugu.lua`
54 +- `ironbar/nugu.css`
55 +- `mako/nugu.conf`
56 +- `neovim/colors/nugu.lua`
57 +- `neovim/lua/bugabinga/nugu/init.lua`
58 +- `neovim/lua/bugabinga/nugu/palette.lua`
59 +- `wezterm/bugabinga/nugu/init.lua`
60 +- `wezterm/bugabinga/nugu/palette_dark.lua`
61 +- `wezterm/bugabinga/nugu/palette_light.lua`
62 +- `yazi/flavors/nugu-dark.yazi/flavor.toml`
63 +- `yazi/flavors/nugu-light.yazi/flavor.toml`
65 +## Current mode state
67 +Observed state paths:
69 +- `~/.cache/nugu/mode` exists and contained `dark`.
70 +- `~/.local/state/nugu/mode` missing.
71 +- `~/.local/state/nugu/themes/mako.conf` missing.
72 +- `~/.local/state/nugu/themes/ironbar.css` missing.
73 +- `~/.local/state/nugu/themes/hyprtoolkit.conf` missing.
75 +Current cache readers:
77 +- `hypr/generated/nugu.lua` reads `~/.cache/nugu/mode`.
78 +- `nugu/hypr.nu` generates that cache path.
79 +- `wezterm/bugabinga/theme.lua` reads `~/.cache/nugu/mode` before falling back to `wez.gui.get_appearance()`.
81 +Required contract change: move mode state to `${XDG_STATE_HOME:-~/.local/state}/nugu/mode`; update all cache readers.
83 +## Consumer inventory
85 +### Hyprland
87 +Files:
89 +- `hypr/generated/nugu.lua`
90 +- `hypr/modules/appearance.lua`
91 +- `hypr/modules/rules.lua`
92 +- `hypr/modules/hypr_osd.lua`
94 +State:
96 +- `generated/nugu.lua` contains both dark + light palettes.
97 +- `generated/nugu.lua` currently reads `~/.cache/nugu/mode`.
98 +- `modules/appearance.lua` calls `nugu.current()` at config evaluation and supports `M.apply(mode)`.
99 +- `modules/rules.lua` and `modules/hypr_osd.lua` bind colors at module load; reload/eval needed after switch.
101 +Reload path:
103 +- `hyprctl reload config-only` should refresh Lua config and Nugu colors.
105 +Gaps:
107 +- No tracked switch entrypoint exists now; old `hypr/scripts/theme.lua` is deleted in current worktree.
108 +- `hypr/generated/nugu.json` is deleted in current worktree but still referenced by `nugu/justfile` recipe.
110 +### Mako
112 +Files:
114 +- `mako/config`
115 +- `mako/nugu.conf`
116 +- `hypr/systemd/mako.service`
118 +State:
120 +- `mako/config` includes `~/.config/mako/nugu.conf`.
121 +- `mako/nugu.conf` is pure Nugu color/style fragment.
122 +- Behavior/layout remains in `mako/config`.
124 +Reload path:
126 +- `makoctl reload` available.
128 +Gap: current switch would need to rewrite tracked `mako/nugu.conf`; target design should include local-state theme fragment instead.
130 +### Ironbar
132 +Files:
134 +- `ironbar/style.css`
135 +- `ironbar/nugu.css`
136 +- `ironbar/config.json`
137 +- `ironbar/scripts/workspaces-watch.py`
138 +- `hypr/systemd/ironbar.service`
140 +State:
142 +- `ironbar/style.css` imports `nugu.css`.
143 +- `ironbar/nugu.css` is pure generated CSS vars.
144 +- `ironbar/config.json` is behavior/layout/modules.
145 +- `ironbar/scripts/workspaces-watch.py` reads `~/.config/ironbar/nugu.css` directly for colors.
147 +Reload path:
149 +- Ironbar docs/help: style changes hot-loaded; `ironbar reload` exists.
150 +- `ironbar --theme <path>` can select CSS path at start.
152 +Gaps:
154 +- Current import points at tracked `ironbar/nugu.css`.
155 +- `workspaces-watch.py` hard-codes `~/.config/ironbar/nugu.css`; switch design must update it to read local-state CSS vars or avoid direct color parsing.
157 +### Hyprtoolkit apps
159 +Files:
161 +- `hypr/hyprtoolkit.conf`
163 +State:
165 +- File contains colors + static appearance variables: rounding, font sizes, fonts, icon theme.
166 +- Hyprtoolkit package has no `hyprtoolkit` executable/manpage; it is a library used by `hyprlauncher`, `hyprpwcenter`, `hyprshutdown`, etc.
167 +- `hyprtoolkit 0.5.4` supports `source = <path>`.
168 +- Source inspection: it watches only main `~/.config/hypr/hyprtoolkit.conf` with `IN_MODIFY | IN_DONT_FOLLOW`; sourced files are parsed but not watched.
170 +Reload path:
172 +- Live color reload occurs internally after main config `IN_MODIFY`.
173 +- To live-switch sourced local-state colors: write sourced file, then rewrite main file bytes unchanged to trigger `IN_MODIFY` without lasting diff.
175 +Gap: split tracked main file = fallback + static vars + source directive; local-state file = colors only.
177 +### GTK/Qt/system preference
179 +State:
181 +- `org.gnome.desktop.interface color-scheme` exists.
182 +- Current value observed: `prefer-dark`.
183 +- Range: `default`, `prefer-dark`, `prefer-light`.
184 +- Portal services active: `xdg-desktop-portal`, `xdg-desktop-portal-gtk`, `xdg-desktop-portal-hyprland`.
186 +Reload path:
188 +- `gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'|'prefer-light'`.
190 +Gap: no Nugu switch command currently sets it.
192 +### Ghostty
194 +Files:
196 +- `ghostty/config`
197 +- `ghostty/themes/nugu-dark`
198 +- `ghostty/themes/nugu-light`
200 +State:
202 +- Config uses `theme = light:nugu-light,dark:nugu-dark`.
203 +- Already dual-theme and should follow system dark/light mode.
205 +Gap: none beyond setting system color-scheme.
207 +### WezTerm
209 +Files:
211 +- `wezterm/bugabinga/theme.lua`
212 +- `wezterm/bugabinga/nugu/init.lua`
213 +- `wezterm/bugabinga/nugu/palette_dark.lua`
214 +- `wezterm/bugabinga/nugu/palette_light.lua`
216 +State:
218 +- Generated palettes exist for both modes.
219 +- `theme.lua` prefers `~/.cache/nugu/mode`, then falls back to WezTerm GUI appearance.
221 +Gaps:
223 +- Update mode reader to local-state.
224 +- Need reload behavior decision; automatic reload not verified.
226 +### Neovim
228 +Files:
230 +- `neovim/init.lua`
231 +- `neovim/colors/nugu.lua`
232 +- `neovim/lua/bugabinga/nugu/palette.lua`
233 +- `neovim/lua/bugabinga/nugu/init.lua`
235 +State:
237 +- Uses colorscheme `nugu`.
238 +- Palette file contains dark + light GUI palette and TUI palette.
239 +- Active mode based on `vim.o.background`.
240 +- Existing autocommand reloads colorscheme on `SIGUSR1`.
242 +Gap: switch command can optionally signal running Neovim processes later; not required for Hypr desktop shell switch.
244 +### Helix
246 +Files:
248 +- `helix/config.toml`
249 +- `helix/themes/nugu-dark.toml`
250 +- `helix/themes/nugu-light.toml`
252 +State:
254 +- `helix/config.toml` hard-codes `theme = "nugu-dark"`.
256 +Gap: no dynamic switch currently.
258 +### Yazi
260 +Files:
262 +- `yazi/theme.toml`
263 +- `yazi/flavors/nugu-dark.yazi/flavor.toml`
264 +- `yazi/flavors/nugu-light.yazi/flavor.toml`
266 +State:
268 +- Nugu generated flavors are tracked.
269 +- `yazi/theme.toml` currently uses `noctalia` for both `dark` and `light`, not Nugu.
271 +Gap: generated Nugu flavors are not active.
273 +### Aerc
275 +Files:
277 +- `aerc/aerc.conf`
278 +- `aerc/stylesets/nugu-dark`
279 +- `aerc/stylesets/nugu-light`
281 +State:
283 +- `aerc/aerc.conf` hard-codes `styleset-name=nugu-dark`.
285 +Gap: no dynamic switch currently.
287 +### Linux console
289 +Files:
291 +- `bash/bashrc`
292 +- `bash/linux-console/nugu-dark.sh`
293 +- `bash/linux-console/nugu-light.sh`
295 +State:
297 +- Bash helper `_nugu_console_theme dark|light|toggle` sources generated shell fragments.
298 +- Bash startup currently calls `_nugu_console_theme light`.
300 +Gap: not integrated with global Nugu mode state.
302 +### Cmus / Clipse / tmux
304 +Files:
306 +- `cmus/nugu.theme`
307 +- `clipse/nugu.json`
308 +- `tmux/tmux.conf`
310 +State:
312 +- Tracked Nugu-related files exist.
313 +- No dynamic dark/light switch integration observed during this inventory.
315 +## Dirty work relevant to theme switch
317 +Observed earlier via `git -C .. status --short --ignore-submodules=dirty`:
319 +- Modified/deleted Hypr transition files, including deleted old `hypr/scripts/theme.lua` and `hypr/systemd/nugu-theme.service`.
320 +- `hypr/generated/nugu.json` deleted; `hypr/generated/nugu.lua` still tracked.
321 +- `ironbar/nugu.css`, `ironbar/style.css`, `ironbar/config.json`, `ironbar/scripts/workspaces-watch.py` modified.
322 +- `mako/nugu.conf` modified.
323 +- `nugu/ironbar.nu` modified.
325 +Do not broad-add. Stage exact files only.
327 +## Conclusions
329 +1. Nugu source-of-truth structure already exists and covers target app palettes.
330 +2. Runtime mode state is split today: Hypr + WezTerm read `~/.cache/nugu/mode`; target contract requires local state.
331 +3. Hypr/Mako/Ironbar/Hyprtoolkit are the core Hypr desktop shell switch targets.
332 +4. Ghostty already fits the system-preference model.
333 +5. Helix/Aerc/Linux console/Yazi are static or manually switchable today; include in longer-term switch contract, but they are not blockers for Hypr desktop shell switching.
334 +6. Ironbar has an extra direct color consumer: `ironbar/scripts/workspaces-watch.py`; any switch plan must update it.
335 +7. Local-state runtime theme fragments are currently absent; first implementation must create them before changing service/config includes.

docs/super/plans/2026-06-14-nugu-hypr-theme-switching.md

Added
new file mode 100644
1 +# Nugu Hypr Theme Switching Implementation Plan
3 +> **For agentic workers:** REQUIRED SUB-SKILL: Use /skill:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
5 +**Goal:** Build a dark/light theme switch for Hyprland desktop apps with Nugu as palette source of truth and no switch-time dotfiles diffs.
7 +**Architecture:** Nugu generates deterministic dark/light fragments. A Hypr-linked switch script copies selected fragments into `${XDG_STATE_HOME:-~/.local/state}/nugu` and asks live apps to reload. Tracked app configs keep behavior/layout; runtime state contains only mode + color/style fragments.
9 +**Tech Stack:** Nushell generators/scripts, Hyprland Lua config, mako IPC, Ironbar GTK CSS hot reload, GSettings `org.gnome.desktop.interface color-scheme`, hyprtoolkit `source =` + inotify main-file poke.
11 +**Roadmap:** None
13 +**Phase:** Single-plan implementation
15 +**Inventory:** `docs/super/inventory/2026-06-14-nugu-theme-current-state.md`
17 +**Contract:** `docs/super/specs/2026-06-14-nugu-theme-switch-contract.md`
19 +---
21 +## Research facts locked into this plan
23 +- `makoctl reload` reloads mako config without restart.
24 +- `ironbar` supports CSS hot reload; `ironbar --theme <path>`/`IRONBAR_CSS` select CSS path.
25 +- `ironbar style load-css <path>` loads additional hot-reloaded CSS; primary `--theme` is simpler for startup.
26 +- Hyprland can reload config with `hyprctl reload config-only`.
27 +- `hyprtoolkit 0.5.4` watches only main config path `~/.config/hypr/hyprtoolkit.conf` with `IN_MODIFY | IN_DONT_FOLLOW`.
28 +- `hyprtoolkit.conf` supports `source = <path>` but sourced files are not watched.
29 +- Therefore hyprtoolkit live switch requires: write sourced state file, then trigger `IN_MODIFY` on main config without changing content.
30 +- Runtime state path must be `$XDG_STATE_HOME/nugu` or `~/.local/state/nugu`, not cache.
32 +## File structure
34 +- Modify `nugu/hypr.nu`
35 + - Generate Hypr desktop runtime theme fragments for both modes from Nugu palette.
36 + - Keep `generated/nugu.lua` mode reader in sync with local-state path.
37 +- Modify `nugu/justfile`
38 + - Extend `hypr` recipe to copy generated runtime fragments into `hypr/generated/runtime/<mode>/`.
39 +- Create `hypr/scripts/nugu-theme.nu`
40 + - Runtime command: `dark | light | toggle | current | status | prepare`.
41 + - Writes local-state mode + theme files.
42 + - Reloads Hyprland, mako, Ironbar, GTK color-scheme, hyprtoolkit.
43 +- Modify `mako/config`
44 + - Include runtime state theme fragment, not tracked `mako/nugu.conf`.
45 +- Modify `ironbar/style.css`
46 + - Remove direct `@import url("nugu.css")`; base CSS becomes layout/style only.
47 +- Modify `ironbar/scripts/workspaces-watch.py`
48 + - Read Ironbar CSS vars from local-state runtime CSS instead of tracked `ironbar/nugu.css`.
49 +- Modify `wezterm/bugabinga/theme.lua`
50 + - Read Nugu mode from local-state path instead of cache.
51 +- Modify `hypr/systemd/ironbar.service`
52 + - Start Ironbar with runtime CSS path; prepare runtime CSS before start.
53 +- Modify `hypr/systemd/mako.service`
54 + - Prepare runtime mako fragment before start.
55 +- Modify `hypr/hyprtoolkit.conf`
56 + - Keep safe dark fallback values and static appearance variables.
57 + - Add `source = ~/.local/state/nugu/themes/hyprtoolkit.conf` at end.
58 +- Modify `hypr/modules/binds.lua` and `hypr/modules/hypr_osd.lua`
59 + - Add one manual toggle bind.
60 +- Regenerate `hypr/generated/nugu.lua`.
62 +---
64 +## Task 1: Update Nugu Hypr generator paths + runtime fragments
66 +**Files:**
68 +- Modify: `nugu/hypr.nu`
69 +- Modify: `nugu/justfile`
70 +- Generated: `hypr/generated/nugu.lua`
71 +- Generated: `hypr/generated/runtime/dark/mako.conf`
72 +- Generated: `hypr/generated/runtime/light/mako.conf`
73 +- Generated: `hypr/generated/runtime/dark/ironbar-vars.css`
74 +- Generated: `hypr/generated/runtime/light/ironbar-vars.css`
75 +- Generated: `hypr/generated/runtime/dark/hyprtoolkit.conf`
76 +- Generated: `hypr/generated/runtime/light/hyprtoolkit.conf`
78 +- [ ] Replace generated Lua cache path in `nugu/hypr.nu` with local-state path:
80 +```nu
81 +' local state_home = os.getenv("XDG_STATE_HOME") or (os.getenv("HOME") .. "/.local/state")'
82 +' local path = state_home .. "/nugu/mode"'
83 +```
85 +- [ ] Add helpers to `nugu/hypr.nu`:
87 +```nu
88 +def strip-hash [s: string] { $s | str replace "#" "" }
89 +def argb [color: string] { $"0xFF(strip-hash $color)" }
90 +def rgba [color: string, alpha: string] { $"($color)($alpha)" }
91 +```
93 +- [ ] Add exported fragment generators to `nugu/hypr.nu`:
95 +```nu
96 +export def mako [mode: string] {
97 + let p = (nugu $mode | get palette)
98 + $'# Generated by nugu/hypr.nu from Nugu palette.
99 +background-color=(rgba $p.ui.backdrop "ee")
100 +text-color=(rgba $p.ui.normal "ff")
101 +border-color=(rgba $p.ui.accent "ff")
102 +progress-color=over (rgba $p.ui.focus "ff")
104 +[urgency=low]
105 +background-color=(rgba $p.content.backdrop "e6")
106 +text-color=(rgba $p.content.minor "ff")
107 +border-color=(rgba $p.ui.unfocus "ff")
108 +progress-color=over (rgba $p.content.minor "ff")
110 +[urgency=normal]
111 +border-color=(rgba $p.ui.accent "ff")
112 +progress-color=over (rgba $p.ui.focus "ff")
114 +[urgency=critical]
115 +background-color=(rgba $p.ui.backdrop "ff")
116 +text-color=(rgba $p.ui.important_global "ff")
117 +border-color=(rgba $p.error "ff")
118 +progress-color=over (rgba $p.error "ff")
120 +[summary~="[Ee]rror|[Ff]ailed|[Ff]ailure|[Cc]rash"]
121 +border-color=(rgba $p.error "ff")
122 +progress-color=over (rgba $p.error "ff")
124 +[summary~="[Ww]arn|[Ww]arning"]
125 +border-color=(rgba $p.warning "ff")
126 +progress-color=over (rgba $p.warning "ff")
128 +[summary~="[Ii]nfo|[Nn]otice"]
129 +border-color=(rgba $p.info "ff")
130 +progress-color=over (rgba $p.info "ff")
134 +export def ironbar-vars [mode: string] {
135 + let p = (nugu $mode | get palette)
136 + $'/* Generated by nugu/hypr.nu from Nugu palette. */
137 +:root {
138 + --bg: ($p.ui.backdrop);
139 + --bg-transparent: ($p.ui.backdrop)ee;
140 + --surface: ($p.ui.minor);
141 + --fg: ($p.ui.normal);
142 + --accent: ($p.ui.accent);
143 + --focus: ($p.ui.focus);
144 + --important-global: ($p.ui.important_global);
145 + --on-focus: ($p.content.backdrop);
146 + --muted: ($p.ui.minor);
147 + --unfocus: ($p.ui.unfocus);
148 + --error: ($p.error);
149 + --warning: ($p.warning);
150 + --info: ($p.info);
151 + --debug: ($p.debug);
152 + --border: ($p.ui.accent);
157 +export def hyprtoolkit [mode: string] {
158 + let p = (nugu $mode | get palette)
159 + $'# Generated by nugu/hypr.nu from Nugu palette.
160 +background = (argb $p.content.backdrop)
161 +base = (argb $p.ui.backdrop)
162 +alternate_base = (argb $p.ui.minor)
163 +text = (argb $p.content.normal)
164 +bright_text = (argb $p.ui.important_global)
165 +link_text = (argb $p.info)
166 +accent = (argb $p.ui.accent)
167 +accent_secondary = (argb $p.content.important_local)
170 +```
172 +- [ ] Extend `nugu/justfile` `hypr` recipe to generate/copy `runtime/{dark,light}/{mako.conf,ironbar-vars.css,hyprtoolkit.conf}`.
174 +- [ ] Run:
176 +```bash
177 +just --justfile nugu/justfile --working-directory nugu hypr
178 +just --justfile nugu/justfile --working-directory nugu check
179 +```
181 +Expected: both exit `0`; runtime generated files exist.
183 +---
185 +## Task 2: Add local-state switch command
187 +**Files:**
189 +- Create: `hypr/scripts/nugu-theme.nu`
191 +- [ ] Create script with this behavior:
193 +```nu
194 +#!/usr/bin/env nu
196 +const valid_modes = [dark light]
198 +def state-root [] {
199 + let base = ($env.XDG_STATE_HOME? | default ($env.HOME | path join ".local" "state"))
200 + $base | path join "nugu"
203 +def mode-path [] { state-root | path join "mode" }
204 +def themes-dir [] { state-root | path join "themes" }
205 +def generated-dir [] { $env.HOME | path join ".config" "hypr" "generated" "runtime" }
207 +def read-mode [] {
208 + let path = (mode-path)
209 + if ($path | path exists) {
210 + let mode = (open --raw $path | str trim)
211 + if $mode in $valid_modes { $mode } else { "dark" }
212 + } else {
213 + "dark"
217 +def target-mode [mode: string] {
218 + if $mode == "toggle" {
219 + if (read-mode) == "dark" { "light" } else { "dark" }
220 + } else if $mode in $valid_modes {
221 + $mode
222 + } else if $mode == "current" {
223 + read-mode
224 + } else {
225 + error make { msg: "mode must be dark|light|toggle|current" }
229 +def write-text [path: path, text: string] {
230 + mkdir ($path | path dirname)
231 + $text | save --force --raw $path
234 +def copy-generated [mode: string, name: string] {
235 + let src = (generated-dir | path join $mode $name)
236 + if not ($src | path exists) { error make { msg: $"missing generated theme fragment: ($src)" } }
237 + open --raw $src
240 +def write-mode [mode: string] { write-text (mode-path) $"($mode)\n" }
241 +def write-mako [mode: string] { write-text (themes-dir | path join "mako.conf") (copy-generated $mode "mako.conf") }
242 +def write-hyprtoolkit [mode: string] { write-text (themes-dir | path join "hyprtoolkit.conf") (copy-generated $mode "hyprtoolkit.conf") }
244 +def ironbar-base-css-uri [] {
245 + let path = ($env.HOME | path join ".config" "ironbar" "style.css")
246 + $"file://($path)"
249 +def write-ironbar [mode: string] {
250 + let vars = (copy-generated $mode "ironbar-vars.css")
251 + let css = $'@import url("(ironbar-base-css-uri)");
252 +($vars)'
253 + write-text (themes-dir | path join "ironbar.css") $css
256 +def set-gtk-mode [mode: string] {
257 + let scheme = if $mode == "dark" { "prefer-dark" } else { "prefer-light" }
258 + ^gsettings set org.gnome.desktop.interface color-scheme $scheme
261 +def reload-hypr [] { ^hyprctl reload config-only | ignore }
262 +def reload-mako [] { if (which makoctl | is-not-empty) { ^makoctl reload | ignore } }
263 +def reload-ironbar [] { if (which ironbar | is-not-empty) { ^ironbar reload | ignore } }
265 +def poke-hyprtoolkit [] {
266 + let path = ($env.HOME | path join ".config" "hypr" "hyprtoolkit.conf")
267 + if ($path | path exists) {
268 + let data = (open --raw $path)
269 + $data | save --force --raw $path
273 +def notify [mode: string] {
274 + if (which hyprctl | is-empty) { return }
275 + let color = if $mode == "dark" { "rgb(d86dd8)" } else { "rgb(922792)" }
276 + ^hyprctl notify 5 1200 $color $"nugu ($mode)" | ignore
279 +export def status [] { read-mode }
281 +export def prepare [mode = "current"] {
282 + let m = (target-mode $mode)
283 + write-mode $m
284 + write-mako $m
285 + write-ironbar $m
286 + write-hyprtoolkit $m
289 +export def main [mode = "toggle"] {
290 + let m = (target-mode $mode)
291 + prepare $m
292 + set-gtk-mode $m
293 + reload-hypr
294 + reload-mako
295 + reload-ironbar
296 + poke-hyprtoolkit
297 + notify $m
299 +```
301 +- [ ] Run:
303 +```bash
304 +chmod +x hypr/scripts/nugu-theme.nu
305 +nu-check --as-script hypr/scripts/nugu-theme.nu
306 +nu hypr/scripts/nugu-theme.nu prepare current
307 +nu hypr/scripts/nugu-theme.nu status
308 +```
310 +Expected: script checks; state files exist; status prints `dark` or `light`.
312 +---
314 +## Task 3: Wire app configs to local-state fragments
316 +**Files:**
318 +- Modify: `mako/config`
319 +- Modify: `ironbar/style.css`
320 +- Modify: `ironbar/scripts/workspaces-watch.py`
321 +- Modify: `wezterm/bugabinga/theme.lua`
322 +- Modify: `hypr/systemd/mako.service`
323 +- Modify: `hypr/systemd/ironbar.service`
324 +- Modify: `hypr/hyprtoolkit.conf`
326 +- [ ] In `mako/config`, replace:
328 +```conf
329 +include=~/.config/mako/nugu.conf
330 +```
332 +with:
334 +```conf
335 +include=~/.local/state/nugu/themes/mako.conf
336 +```
338 +- [ ] In `ironbar/style.css`, delete first line:
340 +```css
341 +@import url("nugu.css");
342 +```
344 +- [ ] In `ironbar/scripts/workspaces-watch.py`, replace tracked CSS path with local state:
346 +```python
347 +state_home = Path(os.environ.get("XDG_STATE_HOME", Path.home() / ".local" / "state"))
348 +path = state_home / "nugu" / "themes" / "ironbar.css"
349 +```
351 +- [ ] In `wezterm/bugabinga/theme.lua`, replace cache reader with local-state reader:
353 +```lua
354 +local state_home = os.getenv 'XDG_STATE_HOME' or ( wez.home_dir .. '/.local/state' )
355 +local file = io.open( state_home .. '/nugu/mode', 'r' )
356 +```
358 +- [ ] In `hypr/systemd/mako.service`, add before `ExecStart=`:
360 +```systemd
361 +ExecStartPre=/usr/bin/nu %h/.config/hypr/scripts/nugu-theme.nu prepare current
362 +```
364 +- [ ] In `hypr/systemd/ironbar.service`, add before `ExecStart=`:
366 +```systemd
367 +ExecStartPre=/usr/bin/nu %h/.config/hypr/scripts/nugu-theme.nu prepare current
368 +```
370 +and start with runtime CSS:
372 +```systemd
373 +ExecStart=/usr/bin/ironbar --theme %h/.local/state/nugu/themes/ironbar.css
374 +```
376 +- [ ] In `hypr/hyprtoolkit.conf`, keep static settings and end with:
378 +```conf
379 +# Runtime Nugu color override. Hyprtoolkit watches this file, not sourced files.
380 +source = ~/.local/state/nugu/themes/hyprtoolkit.conf
381 +```
383 +- [ ] Verify:
385 +```bash
386 +nu hypr/scripts/nugu-theme.nu prepare current
387 +makoctl reload
388 +ironbar reload
389 +hyprctl reload config-only
390 +```
392 +Expected: commands exit `0` when services/Hyprland are running.
394 +---
396 +## Task 4: Add Hyprland toggle bind + OSD
398 +**Files:**
400 +- Modify: `hypr/modules/hypr_osd.lua`
401 +- Modify: `hypr/modules/binds.lua`
403 +- [ ] In `hypr/modules/hypr_osd.lua`, add before `M.notifications`:
405 +```lua
406 +M.theme = {
407 + toggle = around("nu ~/.config/hypr/scripts/nugu-theme.nu toggle", notify(ok, 1200, t.ui.accent, "Nugu theme toggled")),
409 +```
411 +- [ ] In `hypr/modules/binds.lua`, add after reload bind:
413 +```lua
414 +bind(mod .. " + SHIFT + T", osd.theme.toggle, "toggle nugu light/dark")
415 +```
417 +- [ ] Run:
419 +```bash
420 +lua hypr/tests/commands_test.lua
421 +lua hypr/tests/hypr_osd_test.lua
422 +hyprctl reload config-only
423 +hyprctl configerrors
424 +```
426 +Expected: tests pass; no new config error.
428 +---
430 +## Task 5: Final verification
432 +- [ ] Run generator validation:
434 +```bash
435 +just --justfile nugu/justfile --working-directory nugu check
436 +just --justfile nugu/justfile --working-directory nugu hypr
437 +```
439 +- [ ] Run diff invariant:
441 +```bash
442 +before=$(git status --short --ignore-submodules=dirty)
443 +nu hypr/scripts/nugu-theme.nu light
444 +nu hypr/scripts/nugu-theme.nu dark
445 +after=$(git status --short --ignore-submodules=dirty)
446 +test "$before" = "$after"
447 +```
449 +- [ ] Verify GTK preference:
451 +```bash
452 +nu hypr/scripts/nugu-theme.nu light
453 +gsettings get org.gnome.desktop.interface color-scheme
454 +nu hypr/scripts/nugu-theme.nu dark
455 +gsettings get org.gnome.desktop.interface color-scheme
456 +```
458 +Expected:
460 +```text
461 +'prefer-light'
462 +'prefer-dark'
463 +```
465 +- [ ] Ask user for visual confirmation:
467 +```bash
468 +nu ~/.config/hypr/scripts/nugu-theme.nu light
469 +nu ~/.config/hypr/scripts/nugu-theme.nu dark
470 +```
472 +Expected visual result:
474 +- Hypr borders switch.
475 +- Mako notifications switch after `makoctl reload`.
476 +- Ironbar switches without restart.
477 +- GTK/Qt apps that honor color-scheme switch or pick new preference on repaint.
478 +- Hyprtoolkit apps already open update color where their widgets use palette color callbacks; static font/rounding changes remain next-launch.

docs/super/specs/2026-06-14-nugu-theme-switch-contract.md

Added
new file mode 100644
1 +# Nugu Theme Switch Contract — 2026-06-14
3 +This contract defines target behavior for the Nugu dark/light switch. Nugu remains source of truth for generated app themes.
5 +## Source of truth
7 +Tracked source of truth:
9 +- `nugu/base.toml`
10 +- `nugu/nugu.nu`
11 +- `nugu/palette.nu`
12 +- `nugu/*.nu` app generators
14 +Tracked generated artifacts are allowed for apps that need installable theme files, but switch-time code must not edit tracked files.
16 +Forbidden switch-time writes:
18 +- Any file under `/home/oli/Workspace/dotfiles`.
19 +- Any symlink target resolving into the dotfiles repo.
20 +- Any generated artifact under app config dirs if that path is tracked by dorkfiles.
22 +Allowed switch-time writes:
24 +- `${XDG_STATE_HOME:-$HOME/.local/state}/nugu/mode`
25 +- `${XDG_STATE_HOME:-$HOME/.local/state}/nugu/themes/*`
27 +## Mode values
29 +Valid modes:
31 +- `dark`
32 +- `light`
34 +Invalid/missing mode fallback:
36 +- Missing mode → `dark`.
37 +- Invalid mode content → `dark`; overwrite with valid mode on next switch/prepare.
39 +Mode file format:
41 +```text
42 +<mode>\n
43 +```
45 +Example:
47 +```text
48 +dark
49 +```
51 +## State paths
53 +Root:
55 +```text
56 +${XDG_STATE_HOME:-$HOME/.local/state}/nugu
57 +```
59 +Files:
61 +```text
62 +mode
63 + single-line active mode: dark|light
65 +themes/mako.conf
66 + generated mako color/style fragment only
68 +themes/ironbar.css
69 + generated complete Ironbar runtime CSS:
70 + @import tracked base style.css + generated CSS custom properties
72 +themes/hyprtoolkit.conf
73 + generated hyprtoolkit color fragment only
74 +```
76 +No behavior/layout/binds/timeouts/modules belong in state theme files.
78 +## Command surface
80 +Entrypoint:
82 +```text
83 +~/.config/hypr/scripts/nugu-theme.nu
84 +```
86 +Required commands:
88 +```bash
89 +nu ~/.config/hypr/scripts/nugu-theme.nu dark
90 +nu ~/.config/hypr/scripts/nugu-theme.nu light
91 +nu ~/.config/hypr/scripts/nugu-theme.nu toggle
92 +nu ~/.config/hypr/scripts/nugu-theme.nu current
93 +nu ~/.config/hypr/scripts/nugu-theme.nu status
94 +```
96 +Semantics:
98 +- `dark`: set mode to dark, write state fragments, apply reload hooks.
99 +- `light`: set mode to light, write state fragments, apply reload hooks.
100 +- `toggle`: switch dark ↔ light, write state fragments, apply reload hooks.
101 +- `current`: read current/fallback mode, write state fragments, apply reload hooks. Used by systemd `ExecStartPre`.
102 +- `status`: print active mode only; no writes; no reload hooks.
104 +Recommended internal helper:
106 +```bash
107 +nu ~/.config/hypr/scripts/nugu-theme.nu prepare dark
108 +nu ~/.config/hypr/scripts/nugu-theme.nu prepare light
109 +nu ~/.config/hypr/scripts/nugu-theme.nu prepare current
110 +```
112 +`prepare` writes state files but does not call external reload hooks. It is useful for service startup and tests.
114 +## Reload hooks
116 +### GTK / Qt / portal preference
118 +On `dark`:
120 +```bash
121 +gsettings set org.gnome.desktop.interface color-scheme prefer-dark
122 +```
124 +On `light`:
126 +```bash
127 +gsettings set org.gnome.desktop.interface color-scheme prefer-light
128 +```
130 +### Hyprland
132 +Reload command:
134 +```bash
135 +hyprctl reload config-only
136 +```
138 +Hyprland colors come from `hypr/generated/nugu.lua`, which must read:
140 +```text
141 +${XDG_STATE_HOME:-$HOME/.local/state}/nugu/mode
142 +```
144 +### Mako
146 +Tracked config:
148 +```text
149 +mako/config
150 +```
152 +Tracked config includes:
154 +```text
155 +include=~/.local/state/nugu/themes/mako.conf
156 +```
158 +Reload command:
160 +```bash
161 +makoctl reload
162 +```
164 +No restart unless reload is unavailable or fails for a running daemon.
166 +### Ironbar
168 +Tracked base CSS:
170 +```text
171 +ironbar/style.css
172 +```
174 +Runtime CSS:
176 +```text
177 +~/.local/state/nugu/themes/ironbar.css
178 +```
180 +Service starts Ironbar with:
182 +```bash
183 +ironbar --theme %h/.local/state/nugu/themes/ironbar.css
184 +```
186 +Runtime CSS imports tracked base CSS and appends generated `:root` Nugu variables. Ironbar hot-loads style changes; `ironbar reload` is acceptable as explicit nudge.
188 +Any helper script that parses CSS variables must read local-state runtime CSS, not tracked `ironbar/nugu.css`.
190 +### Hyprtoolkit apps
192 +Tracked main config:
194 +```text
195 +hypr/hyprtoolkit.conf
196 +```
198 +Tracked main config owns fallback colors + static appearance variables and ends with:
200 +```text
201 +source = ~/.local/state/nugu/themes/hyprtoolkit.conf
202 +```
204 +Runtime fragment owns colors only.
206 +Because hyprtoolkit watches only the main config path, switch command must:
208 +1. Write `~/.local/state/nugu/themes/hyprtoolkit.conf`.
209 +2. Rewrite `~/.config/hypr/hyprtoolkit.conf` with identical bytes to trigger `IN_MODIFY`.
211 +The identical-byte rewrite must leave `git diff -- hypr/hyprtoolkit.conf` unchanged.
213 +### Ghostty
215 +Already matches contract via:
217 +```text
218 +theme = light:nugu-light,dark:nugu-dark
219 +```
221 +Switch command only needs to set GTK/portal color-scheme.
223 +### WezTerm
225 +WezTerm has generated dark/light palettes. Its Nugu mode override must read local-state mode. If mode file is missing, it may fall back to WezTerm GUI appearance.
227 +### Neovim
229 +Neovim Nugu palette selects by `vim.o.background`. Live global switching is optional in first Hypr desktop implementation. Existing SIGUSR1 colorscheme reload can be used later.
231 +### Static/manual consumers
233 +These are not first-wave blockers:
235 +- Helix: `helix/config.toml` hard-codes `nugu-dark`.
236 +- Aerc: `aerc/aerc.conf` hard-codes `nugu-dark`.
237 +- Linux console: shell helper exists, not tied to global state.
238 +- Yazi: generated Nugu flavors exist, but active theme currently uses `noctalia`.
239 +- Cmus / Clipse / tmux: Nugu files exist; no live switch contract yet.
241 +## Diff invariant
243 +The switch command must pass:
245 +```bash
246 +before=$(git status --short --ignore-submodules=dirty)
247 +nu hypr/scripts/nugu-theme.nu light
248 +nu hypr/scripts/nugu-theme.nu dark
249 +after=$(git status --short --ignore-submodules=dirty)
250 +test "$before" = "$after"
251 +```
253 +## Validation contract
255 +Generator validation:
257 +```bash
258 +just --justfile nugu/justfile --working-directory nugu check
259 +just --justfile nugu/justfile --working-directory nugu hypr
260 +```
262 +Runtime validation:
264 +```bash
265 +nu hypr/scripts/nugu-theme.nu status
266 +nu hypr/scripts/nugu-theme.nu light
267 +gsettings get org.gnome.desktop.interface color-scheme
268 +nu hypr/scripts/nugu-theme.nu dark
269 +gsettings get org.gnome.desktop.interface color-scheme
270 +```
272 +Expected GSettings output:
274 +```text
275 +'prefer-light'
276 +'prefer-dark'
277 +```
279 +Human visual confirmation remains required for final goal completion.

enable_user_services.nu

Modified
13 13 [cliphist cliphist cliphist.service]
14 14 [wl-clip-persist wl-clip-persist wl-clip-persist.service]
15 15 [wezterm-mux-server wezterm-mux-server wezterm-mux-server.service]
16 - [nugu-theme nu nugu-theme.service]
17 16 [ironbar ironbar ironbar.service]
18 17 [ironbar-workspaces python ironbar-workspaces.service]

git/gitconfig

Modified
1 1 [alias]
2 2 a = add --all
3 - ap = add --patch
4 3 ci = commit --all
5 4 co = checkout
6 5 bare = clone --bare
9 8 ra = rebase --abort
10 9 rc = rebase --continue
11 10 st = status --short
12 - w = worktree
13 11 unstage = reset HEAD --
14 12 last = log -1 HEAD
15 13 ui = !gitu
17 15 [core]
18 16 attributesfile = .gitattributes
19 17 autocrlf = false
18 + safecrlf = false
20 19 compression = 9
21 20 editor = nvim
22 21 fscache = true
23 22 fsmonitor = true
24 23 preloadindex = true
25 24 quotepath = false
26 - safecrlf = false
27 25 symlinks = true
28 26 untrackedcache = true
29 27 pager = delta
186 184 [worktree]
187 185 guessRemote = true
188 - useRelativePaths = true
190 187 # In order to have host-specific configuration, I include additional settings here.
191 188 # On each host a different file might be symlinked into '.gitconfig.include'.

git/ignore

Modified
1 1 .superpowers/
2 +.pi/tune/

hypr/.luarc.json

Added
new file mode 100644
1 +{
2 + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
3 + "workspace": {
4 + "library": ["/usr/share/hypr/stubs"],
5 + "runtime.version": "LuaJIT"
6 + },
7 + "diagnostics": {
8 + "globals": ["hl"]
9 + }

hypr/AGENTS.md

Modified
1 -# AGENTS — Nugu theming
3 -Scope: `hypr/` desktop theming.
5 -Rules:
6 -- Nugu generators output palette/color fragments only when app supports import/include.
7 -- Keep app behavior/layout/fonts/spacing in app config dir.
8 -- Do not duplicate whole app configs in `nugu/`.
9 -- Use generated fragments:
10 - - Ironbar: `ironbar/nugu.css` via `@import url("nugu.css")`
11 - - Mako: `mako/nugu.conf` via `include=~/.config/mako/nugu.conf`
12 - - Hypr Lua: `hypr/generated/nugu.lua`
13 - - Runtime JSON: `hypr/generated/nugu.json`
14 -- Runtime switcher `hypr/scripts/theme.lua` writes active color fragments under `$XDG_CONFIG_HOME`.
16 -Hyprtoolkit:
17 -- Never rewrite `hyprtoolkit.conf` while Hyprtoolkit apps run.
18 -- Bug: https://github.com/hyprwm/hyprtoolkit/issues/92
19 -- Static session config only until fixed.
21 1 Nugu semantics:
22 2 - `content.*` = app/content/terminal text surfaces.
23 3 - `ui.*` = chrome/widgets/borders/status bars.
35 15 Fonts:
36 16 - Use IBM Plex family exclusively in Hypr desktop configs.
37 17 - UI sans: `IBM Plex Sans`; mono/status: `IBM Plex Mono`.
39 -Testing:
40 -- After theme edits: `NUGU_NO_NOTIFY=1 hypr/scripts/theme.lua dark|light`.
41 -- Check `systemctl --user is-active mako.service ironbar.service hyprpaper.service`.
42 -- Screenshot dark/light with `grim`; inspect actual rendered colors, not just CSS.

hypr/hyprland.lua

Modified
1 --- bugabinga x230 Hyprland
2 --- Lua-only compositor config. Generated app configs live beside this tree.
4 1 require("modules.env")
5 -require("modules.permissions")
6 2 require("modules.monitors")
7 3 require("modules.input")
8 4 require("modules.appearance")

hypr/hyprpaper.conf

Deleted
deleted file mode 100644
1 -wallpaper {
2 - monitor =
3 - path = ~/.config/hypr/wallpapers/nugu-dark.png
4 -}
6 -splash = false
7 -ipc = true

hypr/hyprtoolkit.conf

Modified
1 1 # Nugu Hyprtoolkit palette.
2 -# Static for now: live rewrites busy-loop Hyprtoolkit apps.
3 -# https://github.com/hyprwm/hyprtoolkit/issues/92
5 3 background = 0xFF121212
6 4 base = 0xFF242424

hypr/lib/apps.lua

Deleted
deleted file mode 100644
1 -local tui = require("scripts.tui_tab")
3 -return {
4 - terminal = "wezterm connect unix",
5 - terminal_class = "wezterm start --always-new-process --class",
6 - browser = "firefox",
7 - editor = "nvim",
8 - launcher = "hyprlauncher",
9 - file_manager = function() tui.spawn("yazi") end,
10 - bluetooth = function() tui.spawn("bluetui") end,
11 - wifi = function() tui.spawn("impala") end,
12 - lock = "hyprlock",
13 - logout = "hyprshutdown --dry-run",
14 - theme_toggle = "lua ~/.config/hypr/scripts/theme.lua toggle",
15 - theme_auto = "lua ~/.config/hypr/scripts/theme.lua auto",
16 - clipboard = "bash -lc 'cliphist list | hyprlauncher --dmenu | cliphist decode | wl-copy'",
17 - screenshot_region = "hyprshot -m region -z",
18 - screenshot_window = "hyprshot -m window -z",
19 - screenshot_output = "hyprshot -m output -z",
20 - screenshot_annotate = "hyprshot -m region -z -- satty --filename",
21 - binds_help = "lua ~/.config/hypr/scripts/show_binds.lua",
22 - clients_help = "lua ~/.config/hypr/scripts/show_clients.lua",
23 -}

hypr/modules/appearance.lua

Modified
1 1 local nugu = require("generated.nugu")
2 -local t = nugu.current()
3 2 local rgba = nugu.rgba
5 -hl.config({
6 - general = {
7 - gaps_in = 4,
8 - gaps_out = 8,
9 - border_size = 2,
10 - col = {
11 - active_border = { colors = { rgba(t.content.accent, "ee"), rgba(t.content.important_local, "ee") }, angle = 42 },
12 - inactive_border = rgba(t.ui.unfocus, "88"),
4 +local M = {}
6 +function M.apply(mode)
7 + local t = mode and assert(nugu.get(mode), "unknown mode: " .. tostring(mode)) or nugu.current()
9 + hl.config({
10 + general = {
11 + gaps_in = 4,
12 + gaps_out = 8,
13 + border_size = 2,
14 + col = {
15 + active_border = { colors = { rgba(t.content.accent, "ee"), rgba(t.content.important_local, "ee") }, angle = 42 },
16 + inactive_border = rgba(t.ui.unfocus, "88"),
17 + },
18 + resize_on_border = true,
19 + allow_tearing = false,
20 + layout = "dwindle",
14 - resize_on_border = true,
15 - allow_tearing = false,
16 - layout = "dwindle",
17 - },
19 - decoration = {
20 - rounding = 7,
21 - rounding_power = 2,
22 - active_opacity = 1.0,
23 - inactive_opacity = 0.96,
24 - shadow = {
25 - enabled = true,
26 - range = 8,
27 - render_power = 2,
28 - color = rgba(t.content.backdrop, "cc"),
23 + decoration = {
24 + rounding = 7,
25 + rounding_power = 2,
26 + active_opacity = 1.0,
27 + inactive_opacity = 0.96,
28 + shadow = {
29 + enabled = true,
30 + range = 8,
31 + render_power = 2,
32 + color = rgba(t.content.backdrop, "cc"),
33 + },
34 + blur = {
35 + enabled = true,
36 + size = 4,
37 + passes = 2,
38 + vibrancy = 0.12,
39 + noise = 0.02,
40 + },
30 - blur = {
31 - enabled = true,
32 - size = 4,
33 - passes = 2,
34 - vibrancy = 0.12,
35 - noise = 0.02,
43 + dwindle = {
44 + preserve_split = true,
45 + smart_split = true,
37 - },
39 - dwindle = {
40 - preserve_split = true,
41 - smart_split = true,
42 - },
44 - master = {
45 - new_status = "master",
46 - },
48 - group = {
49 - col = {
50 - border_active = rgba(t.content.accent, "ee"),
51 - border_inactive = rgba(t.ui.unfocus, "88"),
48 + master = {
49 + new_status = "master",
53 - },
55 - misc = {
56 - force_default_wallpaper = 0,
57 - disable_hyprland_logo = true,
58 - disable_splash_rendering = true,
59 - vrr = 0,
60 - },
52 + scrolling = {
53 + fullscreen_on_one_column = true,
54 + },
62 - ecosystem = {
63 - no_update_news = true,
64 - no_donation_nag = true,
65 - },
56 + group = {
57 + col = {
58 + border_active = rgba(t.content.accent, "ee"),
59 + border_inactive = rgba(t.ui.unfocus, "88"),
60 + },
61 + },
67 - xwayland = {
68 - enabled = false,
69 - },
70 -})
63 + misc = {
64 + force_default_wallpaper = 0,
65 + disable_hyprland_logo = true,
66 + disable_splash_rendering = true,
67 + vrr = 0,
68 + },
70 + ecosystem = {
71 + no_update_news = true,
72 + no_donation_nag = true,
73 + },
75 + xwayland = {
76 + enabled = false,
77 + },
78 + })
79 +end
81 +M.apply()
83 +return M

hypr/modules/apps.lua

Added
new file mode 100644
1 +-- app-graphical.slice: normal GUI apps and short interactive helpers. Browser,
2 +-- launcher, screenshot tools, clipboard picker. User-facing, but expendable.
3 +-- background-graphical.slice: long-running noninteractive desktop jobs. Sync,
4 +-- indexers, preloaders, watchers. Must lose to humans under pressure.
5 +-- session-graphical.slice: session control plane. Lock/logout, network/audio UI,
6 +-- battery/status tools. Small, latency-sensitive, bad if killed mid-action.
7 +-- work.slice: interactive dev work. Terminal, editor, file manager, monitor,
8 +-- shells and child compilers. Big memory budget, normal priority.
9 +local app = "uwsm app -s app-graphical.slice -- "
10 +local session = "uwsm app -s session-graphical.slice -- "
11 +local work = "uwsm app -s work.slice -- "
13 +local wezterm = work .. "wezterm start"
15 +local function tui(slice, name)
16 + return slice .. "wezterm start --class " .. name .. " -- " .. name
17 +end
19 +return {
20 + terminal = wezterm,
21 + browser = app .. "firefox",
22 + editor = "nvim",
23 + launcher = app .. "hyprlauncher",
24 + file_manager = tui(work, "yazi"),
25 + bluetooth = tui(session, "bluetui"),
26 + wifi = tui(session, "impala"),
27 + system_monitor = tui(work, "btm"),
28 + audio_mixer = tui(session, "wiremix"),
29 + battery = session .. "wezterm start --class battery -- nu -c 'loop { clear; upower -i /org/freedesktop/UPower/devices/battery_BAT0; sleep 2sec }'",
30 + logout = session .. "hyprshutdown --dry-run",
31 + clipboard = app .. "bash -lc 'cliphist list | hyprlauncher --dmenu | cliphist decode | wl-copy'",
32 + screenshot_region = app .. "hyprshot -m region -z",
33 + screenshot_window = app .. "hyprshot -m window -z",
34 + screenshot_output = app .. "hyprshot -m output -z",
35 + screenshot_annotate = app .. "hyprshot -m region -z -- satty --filename",

hypr/modules/apps.lua.bak.x230opt

Added
new file mode 100644
1 +local app = "uwsm app -s app-graphical.slice -- "
2 +local session = "uwsm app -s session-graphical.slice -- "
3 +local work = "uwsm app -s work.slice -- "
5 +local wezterm = work .. "wezterm start"
7 +local function tui(slice, name)
8 + return slice .. "wezterm start --class " .. name .. " -- " .. name
9 +end
11 +return {
12 + terminal = wezterm,
13 + browser = app .. "firefox",
14 + editor = "nvim",
15 + launcher = app .. "hyprlauncher",
16 + file_manager = tui(work, "yazi"),
17 + bluetooth = tui(session, "bluetui"),
18 + wifi = tui(session, "impala"),
19 + system_monitor = tui(work, "btm"),
20 + audio_mixer = tui(session, "wiremix"),
21 + battery = session .. "wezterm start --class battery -- nu -c 'loop { clear; upower -i /org/freedesktop/UPower/devices/battery_BAT0; sleep 2sec }'",
22 + logout = session .. "hyprshutdown --dry-run",
23 + clipboard = app .. "bash -lc 'cliphist list | hyprlauncher --dmenu | cliphist decode | wl-copy'",
24 + screenshot_region = app .. "hyprshot -m region -z",
25 + screenshot_window = app .. "hyprshot -m window -z",
26 + screenshot_output = app .. "hyprshot -m output -z",
27 + screenshot_annotate = app .. "hyprshot -m region -z -- satty --filename",

hypr/modules/binds.lua

Modified
1 -local apps = require("lib.apps")
1 +local apps = require("modules.apps")
2 +local commands = require("modules.commands")
3 +local osd = require("modules.hypr_osd")
2 4 local workspaces = require("modules.workspaces")
3 5 local mod = "SUPER"
5 -local function bind(key, cmd, description)
6 - local dispatcher = type(cmd) == "function" and cmd or hl.dsp.exec_cmd(cmd)
7 - hl.bind(key, dispatcher, { description = description })
7 +local function bind(key, action, description, opts)
8 + opts = opts or {}
9 + opts.description = opts.description or description
11 + return hl.bind(key, commands.to_dispatcher(action), opts)
10 14 bind(mod .. " + Return", apps.terminal, "terminal: wezterm")
11 15 bind(mod .. " + Space", apps.launcher, "launcher: hyprlauncher")
12 16 bind(mod .. " + B", apps.browser, "browser: firefox")
13 --- TUI app binds open in an existing WezTerm default mux workspace window as new tabs.
14 17 bind(mod .. " + E", apps.file_manager, "files: yazi")
15 18 bind(mod .. " + N", apps.wifi, "wifi: impala")
16 19 bind(mod .. " + U", apps.bluetooth, "bluetooth: bluetui")
17 -hl.bind(mod .. " + Q", hl.dsp.window.close(), { description = "close window" })
18 -hl.bind(mod .. " + C", hl.dsp.window.close(), { description = "close window" })
20 +bind(mod .. " + Q", hl.dsp.window.close(), "close window")
19 21 bind(mod .. " + V", apps.clipboard, "clipboard history")
20 -bind(mod .. " + ALT + L", apps.lock, "lock")
21 -bind(mod .. " + ALT + S", "loginctl lock-session && systemctl suspend", "lock + suspend")
22 -bind(mod .. " + SHIFT + R", "hyprctl reload", "reload hypr")
23 -bind(mod .. " + SHIFT + T", apps.theme_toggle, "toggle nugu light/dark")
24 -bind(mod .. " + CTRL + T", apps.theme_auto, "nugu auto mode now")
25 -bind(mod .. " + Slash", apps.binds_help, "show binds")
26 -bind(mod .. " + Tab", apps.clients_help, "show clients")
27 -bind(mod .. " + Escape", "makoctl dismiss --all", "dismiss notifications")
22 +bind(mod .. " + ALT + L", osd.session.lock, "lock")
23 +bind(mod .. " + ALT + S", osd.session.suspend, "lock + suspend")
24 +bind(mod .. " + SHIFT + R", osd.session.reload, "reload hypr")
25 +bind(mod .. " + Escape", osd.notifications.clear_all, "dismiss notifications")
28 26 bind("CTRL + ALT + Delete", apps.logout, "graceful hyprland logout")
30 -hl.bind(mod .. " + H", hl.dsp.focus({ direction = "left" }), { description = "focus left" })
31 -hl.bind(mod .. " + L", hl.dsp.focus({ direction = "right" }), { description = "focus right" })
32 -hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" }), { description = "focus up" })
33 -hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }), { description = "focus down" })
28 +bind(mod .. " + H", hl.dsp.focus({ direction = "left" }), "focus left")
29 +bind(mod .. " + L", hl.dsp.focus({ direction = "right" }), "focus right")
30 +bind(mod .. " + K", hl.dsp.focus({ direction = "up" }), "focus up")
31 +bind(mod .. " + J", hl.dsp.focus({ direction = "down" }), "focus down")
35 -hl.bind(mod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }), { description = "move left" })
36 -hl.bind(mod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }), { description = "move right" })
37 -hl.bind(mod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }), { description = "move up" })
38 -hl.bind(mod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }), { description = "move down" })
33 +bind(mod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }), "move left")
34 +bind(mod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }), "move right")
35 +bind(mod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }), "move up")
36 +bind(mod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }), "move down")
40 -hl.bind(mod .. " + CTRL + H", hl.dsp.window.resize({ x = -24, y = 0, relative = true }), { description = "resize left" })
41 -hl.bind(mod .. " + CTRL + L", hl.dsp.window.resize({ x = 24, y = 0, relative = true }), { description = "resize right" })
42 -hl.bind(mod .. " + CTRL + K", hl.dsp.window.resize({ x = 0, y = -24, relative = true }), { description = "resize up" })
43 -hl.bind(mod .. " + CTRL + J", hl.dsp.window.resize({ x = 0, y = 24, relative = true }), { description = "resize down" })
38 +bind(mod .. " + CTRL + H", hl.dsp.window.resize({ x = -24, y = 0, relative = true }), "resize left")
39 +bind(mod .. " + CTRL + L", hl.dsp.window.resize({ x = 24, y = 0, relative = true }), "resize right")
40 +bind(mod .. " + CTRL + K", hl.dsp.window.resize({ x = 0, y = -24, relative = true }), "resize up")
41 +bind(mod .. " + CTRL + J", hl.dsp.window.resize({ x = 0, y = 24, relative = true }), "resize down")
45 -hl.bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }), { description = "fullscreen" })
46 -hl.bind(mod .. " + T", hl.dsp.window.float({ action = "toggle" }), { description = "toggle floating" })
47 -hl.bind(mod .. " + P", hl.dsp.window.pseudo({ action = "toggle" }), { description = "pseudo tile" })
48 -hl.bind(mod .. " + G", hl.dsp.group.toggle(), { description = "toggle group" })
49 -hl.bind(mod .. " + SHIFT + G", hl.dsp.group.next(), { description = "next group tab" })
43 +bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }), "fullscreen")
44 +bind(mod .. " + T", hl.dsp.window.float({ action = "toggle" }), "toggle floating")
45 +bind(mod .. " + P", hl.dsp.window.pseudo({ action = "toggle" }), "pseudo tile")
46 +bind(mod .. " + G", hl.dsp.group.toggle(), "toggle group")
47 +bind(mod .. " + SHIFT + G", hl.dsp.group.next(), "next group tab")
51 49 for _, ws in ipairs(workspaces.list) do
52 - hl.bind(mod .. " + " .. ws.key, hl.dsp.focus({ workspace = ws.id }), { description = "workspace " .. ws.name })
53 - hl.bind(mod .. " + SHIFT + " .. ws.key, hl.dsp.window.move({ workspace = ws.id }), { description = "move to " .. ws.name })
50 + bind(mod .. " + " .. ws.key, hl.dsp.focus({ workspace = ws.id }), "workspace " .. ws.name)
51 + bind(mod .. " + SHIFT + " .. ws.key, hl.dsp.window.move({ workspace = ws.id }), "move to " .. ws.name)
56 -hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special("scratch"), { description = "toggle scratch" })
57 -hl.bind(mod .. " + SHIFT + V", hl.dsp.window.move({ workspace = "special:scratch" }), { description = "send to scratch" })
58 -hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
59 -hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
60 -hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true, description = "drag window" })
61 -hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true, description = "resize window" })
54 +bind(mod .. " + SHIFT + V", hl.dsp.window.move({ workspace = "special:scratch" }), "send to scratch")
55 +bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), "workspace next")
56 +bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), "workspace prev")
57 +bind(mod .. " + mouse:272", hl.dsp.window.drag(), "drag window", { mouse = true })
58 +bind(mod .. " + mouse:273", hl.dsp.window.resize(), "resize window", { mouse = true })
63 -hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+"), { locked = true, repeating = true })
64 -hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"), { locked = true, repeating = true })
65 -hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true })
66 -hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true })
67 -hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
68 -hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
69 -hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
70 -hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
71 -hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
72 -hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
60 +bind("XF86AudioRaiseVolume", osd.controls.volume_up, "volume up", { locked = true, repeating = true })
61 +bind("XF86AudioLowerVolume", osd.controls.volume_down, "volume down", { locked = true, repeating = true })
62 +bind("XF86AudioMute", osd.controls.mute, "mute", { locked = true })
63 +bind("XF86AudioMicMute", osd.controls.mic_mute, "mic mute", { locked = true })
64 +bind("XF86MonBrightnessUp", osd.controls.brightness_up, "brightness up", { locked = true, repeating = true })
65 +bind("XF86MonBrightnessDown", osd.controls.brightness_down, "brightness down", { locked = true, repeating = true })
66 +bind("XF86AudioNext", osd.controls.media_next, "media next", { locked = true })
67 +bind("XF86AudioPause", osd.controls.media_toggle, "media play/pause", { locked = true })
68 +bind("XF86AudioPlay", osd.controls.media_toggle, "media play/pause", { locked = true })
69 +bind("XF86AudioPrev", osd.controls.media_prev, "media prev", { locked = true })
74 -bind("Print", apps.screenshot_region, "screenshot region")
75 -bind("SHIFT + Print", apps.screenshot_window, "screenshot window")
76 -bind("CTRL + Print", apps.screenshot_output, "screenshot output")
77 -bind(mod .. " + Print", apps.screenshot_annotate, "screenshot annotate")
78 -bind(mod .. " + SHIFT + Print", "hyprpicker -a", "pick color")
71 +bind("Print", osd.capture.region(apps.screenshot_region), "screenshot region")
72 +bind("SHIFT + Print", osd.capture.window(apps.screenshot_window), "screenshot window")
73 +bind("CTRL + Print", osd.capture.output(apps.screenshot_output), "screenshot output")
74 +bind(mod .. " + Print", osd.capture.annotate(apps.screenshot_annotate), "screenshot annotate")
75 +bind(mod .. " + SHIFT + Print", osd.capture.color("hyprpicker -a"), "pick color")

hypr/modules/commands.lua

Added
new file mode 100644
1 +local apps = require("modules.apps")
3 +local M = {}
5 +function M.to_dispatcher(action)
6 + if type(action) == "string" then
7 + return hl.dsp.exec_cmd(action)
8 + end
9 + return action
10 +end
12 +function M.exec(command)
13 + return hl.dispatch(hl.dsp.exec_cmd(command))
14 +end
16 +function M.app(name)
17 + return M.exec(assert(apps[name], name))
18 +end
20 +function M.workspace(id)
21 + return hl.dispatch(hl.dsp.focus({ workspace = id }))
22 +end
24 +function M.move_to_workspace(id)
25 + return hl.dispatch(hl.dsp.window.move({ workspace = id }))
26 +end
28 +return M

hypr/modules/hypr_osd.lua

Added
new file mode 100644
1 +local nugu = require("generated.nugu")
2 +local t = nugu.current()
4 +local M = {}
6 +local function squote(value)
7 + return "'" .. tostring(value):gsub("'", "'\"'\"'") .. "'"
8 +end
10 +local function dquote(value)
11 + return '"' .. tostring(value):gsub('\\', '\\\\'):gsub('"', '\\"') .. '"'
12 +end
14 +local function notify(icon, ms, color, message)
15 + return table.concat({
16 + "hyprctl notify",
17 + tostring(icon),
18 + tostring(ms),
19 + squote(nugu.rgb(color)),
20 + squote(message),
21 + }, " ")
22 +end
24 +local function notify_live(icon, ms, color, message)
25 + return table.concat({
26 + "hyprctl notify",
27 + tostring(icon),
28 + tostring(ms),
29 + squote(nugu.rgb(color)),
30 + dquote(message),
31 + }, " ")
32 +end
34 +local function sh(command)
35 + return "bash -lc " .. squote(command)
36 +end
38 +local function after(command, notice)
39 + return sh(command .. " && " .. notice)
40 +end
42 +local function around(command, notice)
43 + return sh(command .. "; " .. notice)
44 +end
46 +local ok = 5
47 +local info = 1
48 +local hint = 2
50 +M.session = {
51 + reload = after("hyprctl reload", notify(ok, 1200, t.ui.accent, "Hyprland reloaded")),
52 + lock = around(notify(info, 900, t.ui.focus, "Locking"), "hyprlock"),
53 + suspend = around(notify(info, 900, t.ui.focus, "Suspending"), "loginctl lock-session && systemctl suspend"),
56 +M.notifications = {
57 + clear_all = sh("makoctl dismiss --all; hyprctl dismissnotify"),
60 +M.capture = {
61 + region = function(command)
62 + return after(command, notify(ok, 1400, t.ui.accent, "Region captured"))
63 + end,
64 + window = function(command)
65 + return after(command, notify(ok, 1400, t.ui.accent, "Window captured"))
66 + end,
67 + output = function(command)
68 + return after(command, notify(ok, 1400, t.ui.accent, "Output captured"))
69 + end,
70 + annotate = function(command)
71 + return after(command, notify(ok, 1400, t.ui.accent, "Screenshot annotated"))
72 + end,
73 + color = function(command)
74 + return after(command, notify(ok, 1200, t.ui.accent, "Color copied"))
75 + end,
78 +M.controls = {
79 + volume_up = around(
80 + "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+; "
81 + .. "level=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/^Volume: //')",
82 + notify_live(info, 700, t.ui.focus, "Volume $level")
83 + ),
84 + volume_down = around(
85 + "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-; "
86 + .. "level=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/^Volume: //')",
87 + notify_live(info, 700, t.ui.focus, "Volume $level")
88 + ),
89 + mute = around(
90 + "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; "
91 + .. "state=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | "
92 + .. "grep -q '\\[MUTED\\]' && echo muted || echo live)",
93 + notify_live(info, 900, t.ui.focus, "Audio $state")
94 + ),
95 + mic_mute = around(
96 + "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; "
97 + .. "state=$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | "
98 + .. "grep -q '\\[MUTED\\]' && echo muted || echo live)",
99 + notify_live(info, 900, t.ui.focus, "Mic $state")
100 + ),
101 + brightness_up = around(
102 + "brightnessctl -e4 -n2 set 5%+; level=$(brightnessctl -m | awk -F, '{print $4}')",
103 + notify_live(hint, 700, t.warning, "Brightness $level")
104 + ),
105 + brightness_down = around(
106 + "brightnessctl -e4 -n2 set 5%-; level=$(brightnessctl -m | awk -F, '{print $4}')",
107 + notify_live(hint, 700, t.warning, "Brightness $level")
108 + ),
109 + media_next = after("playerctl next", notify(info, 900, t.info, "Next track")),
110 + media_toggle = after("playerctl play-pause", notify(info, 900, t.info, "Play/pause")),
111 + media_prev = after("playerctl previous", notify(info, 900, t.info, "Previous track")),
114 +return M

hypr/modules/input.lua

Modified
21 -hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })

hypr/modules/monitors.lua

Modified
7 7 scale = 1,
8 8 icc = "/home/oli/.config/icc/thinkpad_x230.icc",
10 -hl.monitor({ output = "", mode = "preferred", position = "auto", scale = 1 })
11 +hl.monitor({
12 + output = "",
13 + mode = "preferred",
14 + position = "auto",
15 + scale = 1
16 +})

hypr/modules/permissions.lua

Deleted
deleted file mode 100644
1 --- Explicitly allow the small trusted local tools this rice binds.
2 --- Permission changes may require a fresh Hyprland session.
3 -hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow")
4 -hl.permission("/usr/(bin|local/bin)/hyprshot", "screencopy", "allow")
5 -hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow")

hypr/modules/rules.lua

Modified
10 10 hl.window_rule({ match = { class = "^(firefox|org.mozilla.firefox)$" }, workspace = "1" })
11 -hl.window_rule({ match = { class = "^(firefox|org.mozilla.firefox)$" }, opacity = "0.98 0.96" })
13 12 hl.window_rule({ match = { class = "^(wezterm|org.wezfurlong.wezterm)$" }, workspace = "3" })
14 13 hl.window_rule({ match = { class = "^yazi$" }, workspace = "3" })
16 15 hl.window_rule({ match = { class = "^(mpv|com.github.celluloid_player.Celluloid)$" }, workspace = "5" })
17 16 hl.window_rule({ match = { class = "^(mpv|com.github.celluloid_player.Celluloid)$" }, immediate = true })
19 -hl.window_rule({ match = { class = "^(pavucontrol|blueman-manager|nm-connection-editor)$" }, float = true, center = true })
20 -hl.window_rule({ match = { class = "^(org.gnome.Nautilus|thunar)$", title = "^(Open|Save).*" }, float = true, center = true })
21 18 hl.window_rule({ match = { class = "(pinentry-)(.*)" }, stay_focused = true })
23 20 hl.window_rule({ match = { float = true }, border_color = nugu.rgba(t.ui.accent, "dd") })
24 21 hl.window_rule({ match = { fullscreen = true }, border_size = 0, rounding = 0 })
25 23 hl.window_rule({ match = { float = false, workspace = "w[tv1]s[false]" }, border_size = 0, rounding = 0 })
26 24 hl.window_rule({ match = { float = false, workspace = "f[1]s[false]" }, border_size = 0, rounding = 0 })

hypr/modules/workspaces.lua

Modified
6 6 { key = "3", id = "3", name = "term" },
7 7 { key = "4", id = "4", name = "chat" },
8 8 { key = "5", id = "5", name = "media" },
9 - { key = "9", id = "9", name = "misc" },
12 11 for _, ws in ipairs(M.list) do
13 12 hl.workspace_rule({ workspace = ws.id, monitor = "LVDS-1" })
16 -hl.workspace_rule({ workspace = "1", default = true })
17 -hl.workspace_rule({ workspace = "special:scratch", on_created_empty = "wezterm start --always-new-process" })
18 -hl.workspace_rule({ workspace = "w[tv1]s[false]", gaps_out = 0, gaps_in = 0 })
19 -hl.workspace_rule({ workspace = "f[1]s[false]", gaps_out = 0, gaps_in = 0 })
15 +hl.workspace_rule({ workspace = "2", layout = "scrolling", layout_opts = { direction = "right" } })
16 +hl.workspace_rule({ workspace = "3", layout = "scrolling", layout_opts = { direction = "right" } })
21 18 return M

hypr/scripts/common.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -function M.trim(value)
4 - return (value or ""):gsub("^%s+", ""):gsub("%s+$", "")
5 -end
7 -function M.shell_quote(value)
8 - value = tostring(value)
9 - return "'" .. value:gsub("'", "'\\''") .. "'"
10 -end
12 -function M.read_command(command)
13 - local pipe = io.popen(command .. " 2>/dev/null")
14 - if not pipe then return "" end
15 - local output = pipe:read("*a") or ""
16 - pipe:close()
17 - return output
18 -end
20 -function M.choose(lines)
21 - if #lines == 0 then return nil end
23 - local path = os.tmpname()
24 - local file = assert(io.open(path, "w"))
25 - for _, line in ipairs(lines) do
26 - file:write(line, "\n")
27 - end
28 - file:close()
30 - local selected = M.trim(M.read_command("hyprlauncher --dmenu < " .. M.shell_quote(path)))
31 - os.remove(path)
33 - if selected == "" then return nil end
34 - return selected
35 -end
37 -return M

hypr/scripts/cycle_clients.lua

Deleted
deleted file mode 100644
1 -#!/usr/bin/env lua
3 -local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 -local script_dir = source:match("(.+)/[^/]+$") or "."
5 -local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 -package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 -local common = require("scripts.common")
10 -local function focus(address)
11 - if not address:match("^0x") then address = "0x" .. address end
12 - local expr = "hl.dispatch(hl.dsp.focus({ window = " .. string.format("%q", "address:" .. address) .. " }))"
13 - os.execute("hyprctl -q eval " .. common.shell_quote(expr))
14 -end
16 -local function parse_active()
17 - return common.read_command("hyprctl activewindow"):match("^Window%s+(%S+)%s+%-%>")
18 -end
20 -local function parse_clients()
21 - local clients = {}
22 - local current
24 - for line in common.read_command("hyprctl clients"):gmatch("[^\n]+") do
25 - local address, title = line:match("^Window%s+(%S+)%s+%-%>%s+(.+):$")
26 - if address then
27 - current = { address = address, title = title, class = "", workspace = 0, mapped = true, hidden = false }
28 - clients[#clients + 1] = current
29 - elseif current then
30 - local key, value = line:match("^%s*([%w_]+):%s*(.*)$")
31 - if key == "class" then
32 - current.class = value
33 - elseif key == "workspace" then
34 - current.workspace = tonumber(value:match("^(%-?%d+)")) or 0
35 - elseif key == "mapped" then
36 - current.mapped = value == "1"
37 - elseif key == "hidden" then
38 - current.hidden = value == "1"
39 - end
40 - end
41 - end
43 - local filtered = {}
44 - for _, client in ipairs(clients) do
45 - if client.mapped and not client.hidden then filtered[#filtered + 1] = client end
46 - end
48 - table.sort(filtered, function(a, b)
49 - if a.workspace ~= b.workspace then return a.workspace < b.workspace end
50 - if a.class ~= b.class then return a.class < b.class end
51 - if a.title ~= b.title then return a.title < b.title end
52 - return a.address < b.address
53 - end)
55 - return filtered
56 -end
58 -local direction = arg[1] == "prev" and -1 or 1
59 -local clients = parse_clients()
60 -if #clients < 2 then os.exit(0) end
62 -local active = parse_active()
63 -local index = 1
65 -for i, client in ipairs(clients) do
66 - if client.address == active then
67 - index = i
68 - break
69 - end
70 -end
72 -local next_index = ((index - 1 + direction) % #clients) + 1
73 -focus(clients[next_index].address)

hypr/scripts/show_binds.lua

Deleted
deleted file mode 100644
1 -#!/usr/bin/env lua
3 -local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 -local script_dir = source:match("(.+)/[^/]+$") or "."
5 -local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 -package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 -local common = require("scripts.common")
10 -local modifier_bits = {
11 - { bit = 64, name = "SUPER" },
12 - { bit = 1, name = "SHIFT" },
13 - { bit = 4, name = "CTRL" },
14 - { bit = 8, name = "ALT" },
15 -}
17 -local function has_bit(value, bit)
18 - return value % (bit * 2) >= bit
19 -end
21 -local function mods(mask)
22 - local out = {}
23 - for _, mod in ipairs(modifier_bits) do
24 - if has_bit(mask, mod.bit) then out[#out + 1] = mod.name end
25 - end
26 - if #out == 0 then return "None" end
27 - return table.concat(out, "+")
28 -end
30 -local function format_key(key)
31 - if key:match("^mouse:") then return key:gsub("^mouse:", "MOUSE_") end
32 - return key:upper()
33 -end
35 -local binds = {}
36 -local current
38 -for line in common.read_command("hyprctl binds"):gmatch("[^\n]+") do
39 - if line:match("^bind") then
40 - current = { modmask = 0, key = "?", dispatcher = "", arg = "", description = "" }
41 - table.insert(binds, current)
42 - elseif current then
43 - local key, value = line:match("^%s*([%w_]+):%s*(.*)$")
44 - if key == "modmask" then
45 - current.modmask = tonumber(value) or 0
46 - elseif key == "key" then
47 - current.key = value
48 - elseif key == "dispatcher" then
49 - current.dispatcher = value
50 - elseif key == "arg" then
51 - current.arg = value
52 - elseif key == "description" then
53 - current.description = value
54 - end
55 - end
56 -end
58 -local labels = {}
59 -local by_label = {}
61 -for _, bind in ipairs(binds) do
62 - local label = string.format("%s + %s -> %s", mods(bind.modmask), format_key(bind.key), bind.description ~= "" and bind.description or bind.dispatcher)
63 - labels[#labels + 1] = label
64 - by_label[label] = bind
65 -end
67 -local selected = common.choose(labels)
68 -if not selected then os.exit(0) end
70 -local bind = by_label[selected]
71 -if not bind then os.exit(1) end
73 -if bind.dispatcher == "exec" and bind.arg ~= "" then
74 - os.execute(bind.arg .. " &")
75 -elseif bind.dispatcher ~= "" and bind.dispatcher ~= "__lua" then
76 - os.execute("hyprctl dispatch " .. common.shell_quote(bind.dispatcher) .. " " .. common.shell_quote(bind.arg))
77 -end

hypr/scripts/show_clients.lua

Deleted
deleted file mode 100644
1 -#!/usr/bin/env lua
3 -local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 -local script_dir = source:match("(.+)/[^/]+$") or "."
5 -local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 -package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 -local common = require("scripts.common")
10 -local clients = {}
11 -local current
13 -for line in common.read_command("hyprctl clients"):gmatch("[^\n]+") do
14 - local address, title = line:match("^Window%s+(%S+)%s+%-%>%s+(.+):$")
15 - if address then
16 - current = { address = address, title = title, class = "?", workspace = "?" }
17 - table.insert(clients, current)
18 - elseif current then
19 - local key, value = line:match("^%s*([%w_]+):%s*(.*)$")
20 - if key == "class" then
21 - current.class = value
22 - elseif key == "workspace" then
23 - current.workspace = value:match("%((.-)%)") or value:match("^(%S+)") or "?"
24 - end
25 - end
26 -end
28 -local labels = {}
29 -local by_label = {}
31 -for _, client in ipairs(clients) do
32 - local label = string.format("%s: %s (%s)", client.class, client.title, client.workspace)
33 - labels[#labels + 1] = label
34 - by_label[label] = client
35 -end
37 -local selected = common.choose(labels)
38 -if not selected then os.exit(0) end
40 -local client = by_label[selected]
41 -if not client then os.exit(1) end
43 -local address = client.address
44 -if not address:match("^0x") then address = "0x" .. address end
46 -local target = "address:" .. address
47 -local expr = "hl.dispatch(hl.dsp.focus({ window = " .. string.format("%q", target) .. " }))"
48 -os.execute("hyprctl -q eval " .. common.shell_quote(expr))

hypr/scripts/theme.lua

Deleted
deleted file mode 100644
1 -#!/usr/bin/env lua
3 -local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 -local script_dir = source:match("(.+)/[^/]+$") or "."
5 -local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 -package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 -local nugu = require("generated.nugu")
10 -local function trim(value)
11 - return (value or ""):gsub("^%s+", ""):gsub("%s+$", "")
12 -end
14 -local function shell_quote(value)
15 - value = tostring(value)
16 - return "'" .. value:gsub("'", "'\\''") .. "'"
17 -end
19 -local function run(command)
20 - os.execute(command .. " >/dev/null 2>&1")
21 -end
23 -local function mkdir(path)
24 - run("mkdir -p " .. shell_quote(path))
25 -end
27 -local function read_file(path)
28 - local file = io.open(path, "r")
29 - if not file then return nil end
30 - local data = file:read("*a")
31 - file:close()
32 - return data
33 -end
35 -local function write_file(path, content)
36 - local file = assert(io.open(path, "w"))
37 - file:write(content)
38 - file:close()
39 -end
41 -local home = assert(os.getenv("HOME"), "HOME unset")
42 -local config_home = os.getenv("XDG_CONFIG_HOME") or home .. "/.config"
43 -local cache_dir = home .. "/.cache/nugu"
44 -local mode_file = cache_dir .. "/mode"
45 -local auto_file = cache_dir .. "/auto"
47 -local function active_mode()
48 - local mode = trim(read_file(mode_file))
49 - if mode == "light" then return "light" end
50 - return "dark"
51 -end
53 -local function auto_mode()
54 - local hour = tonumber(os.date("%H")) or 0
55 - if hour >= 7 and hour < 19 then return "light" end
56 - return "dark"
57 -end
59 -local function auto_enabled()
60 - local value = read_file(auto_file)
61 - return value == nil or trim(value) ~= "0"
62 -end
64 -local function set_auto(enabled)
65 - mkdir(cache_dir)
66 - write_file(auto_file, enabled and "1" or "0")
67 -end
69 -local function write_desktop_color_scheme(mode)
70 - local scheme = mode == "dark" and "prefer-dark" or "prefer-light"
71 - run("gsettings set org.gnome.desktop.interface color-scheme " .. shell_quote(scheme))
72 -end
74 -local function write_mako(p)
75 - local dir = config_home .. "/mako"
76 - mkdir(dir)
77 - write_file(dir .. "/nugu.conf", string.format([[# Generated by hypr/scripts/theme.lua from Nugu palette.
78 -background-color=%see
79 -text-color=%sff
80 -border-color=%sff
81 -progress-color=over %sff
83 -[urgency=low]
84 -background-color=%se6
85 -text-color=%sff
86 -border-color=%sff
87 -progress-color=over %sff
89 -[urgency=normal]
90 -border-color=%sff
91 -progress-color=over %sff
93 -[urgency=critical]
94 -background-color=%sff
95 -text-color=%sff
96 -border-color=%sff
97 -progress-color=over %sff
99 -[summary~="[Ee]rror|[Ff]ailed|[Ff]ailure|[Cc]rash"]
100 -border-color=%sff
101 -progress-color=over %sff
103 -[summary~="[Ww]arn|[Ww]arning"]
104 -border-color=%sff
105 -progress-color=over %sff
107 -[summary~="[Ii]nfo|[Nn]otice"]
108 -border-color=%sff
109 -progress-color=over %sff
110 -]],
111 - p.ui.backdrop, p.ui.normal, p.ui.accent, p.ui.focus,
112 - p.content.backdrop, p.content.minor, p.ui.unfocus, p.content.minor,
113 - p.ui.accent, p.ui.focus,
114 - p.ui.backdrop, p.ui.important_global, p.error, p.error,
115 - p.error, p.error,
116 - p.warning, p.warning,
117 - p.info, p.info))
118 -end
120 -local function write_ironbar(p)
121 - local dir = config_home .. "/ironbar"
122 - mkdir(dir)
123 - write_file(dir .. "/nugu.css", string.format([[/* Generated by hypr/scripts/theme.lua from Nugu palette. */
124 -:root {
125 - --bg: %s;
126 - --bg-transparent: %see;
127 - --surface: %s;
128 - --fg: %s;
129 - --accent: %s;
130 - --focus: %s;
131 - --on-focus: %s;
132 - --muted: %s;
133 - --unfocus: %s;
134 - --error: %s;
135 - --warning: %s;
136 - --info: %s;
137 - --debug: %s;
138 - --border: %s;
140 -]],
141 - p.ui.backdrop,
142 - p.ui.backdrop,
143 - p.ui.minor,
144 - p.ui.normal,
145 - p.ui.accent,
146 - p.ui.focus,
147 - p.content.backdrop,
148 - p.ui.minor,
149 - p.ui.unfocus,
150 - p.error,
151 - p.warning,
152 - p.info,
153 - p.debug,
154 - p.ui.accent))
155 -end
157 -local function apply_mode(mode)
158 - mkdir(cache_dir)
159 - write_file(mode_file, mode)
161 - local p = assert(nugu.get(mode), "unknown mode: " .. tostring(mode))
162 - write_desktop_color_scheme(mode)
163 - write_mako(p)
164 - write_ironbar(p)
166 - run("hyprctl hyprpaper wallpaper " .. shell_quote(",~/.config/hypr/wallpapers/nugu-" .. mode .. ".png"))
167 - run("hyprctl reload")
168 - if os.getenv("NUGU_NO_RESTART_MAKO") ~= "1" then
169 - run("systemctl --user restart mako.service")
170 - end
171 - run("systemctl --user restart ironbar.service")
172 - if os.getenv("NUGU_NO_NOTIFY") ~= "1" then
173 - run("notify-send --expire-time 1500 nugu " .. shell_quote(mode .. " mode"))
174 - end
175 -end
177 -local function next_mode()
178 - return active_mode() == "dark" and "light" or "dark"
179 -end
181 -local function watch()
182 - while true do
183 - if auto_enabled() then
184 - local target = auto_mode()
185 - if target ~= active_mode() then apply_mode(target) end
186 - end
187 - os.execute("sleep 300")
188 - end
189 -end
191 -local mode = arg[1] or "toggle"
193 -if mode == "dark" or mode == "light" or mode == "toggle" then
194 - set_auto(false)
195 -elseif mode == "auto" then
196 - set_auto(true)
197 -end
199 -if mode == "dark" or mode == "light" then
200 - apply_mode(mode)
201 -elseif mode == "toggle" then
202 - apply_mode(next_mode())
203 -elseif mode == "auto" then
204 - apply_mode(auto_mode())
205 -elseif mode == "current" then
206 - apply_mode(active_mode())
207 -elseif mode == "watch" then
208 - watch()
209 -else
210 - io.stderr:write("mode must be dark|light|toggle|auto|current|watch\n")
211 - os.exit(1)
212 -end

hypr/scripts/tui_tab.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -local function shell_quote(value)
4 - value = tostring(value)
5 - return "'" .. value:gsub("'", "'\\''") .. "'"
6 -end
8 -local function trim(value)
9 - return (value or ""):gsub("^%s+", ""):gsub("%s+$", "")
10 -end
12 -local function run(command)
13 - local pipe = io.popen(command .. " 2>/dev/null")
14 - if not pipe then return nil end
16 - local output = pipe:read("*a")
17 - pipe:close()
19 - return trim(output)
20 -end
22 -function M.spawn(...)
23 - local args = { ... }
24 - if #args == 0 then return end
26 - for i, arg in ipairs(args) do
27 - args[i] = shell_quote(arg)
28 - end
30 - local pane_id = run("wezterm cli --prefer-mux spawn -- " .. table.concat(args, " "))
31 - if pane_id and pane_id:match("^%d+$") then
32 - hl.exec_cmd("wezterm cli --prefer-mux activate-pane --pane-id " .. shell_quote(pane_id))
33 - end
34 -end
36 -return M

hypr/systemd/ironbar.service

Modified
1 1 [Unit]
2 2 Description=Ironbar Wayland status bar
3 3 PartOf=graphical-session.target
4 -After=graphical-session.target nugu-theme.service
5 -Wants=nugu-theme.service
4 +After=graphical-session.target
7 6 [Service]
8 -Environment=GSK_RENDERER=cairo
9 7 ExecStart=/usr/bin/ironbar
10 8 Restart=on-failure
11 9 RestartSec=2

hypr/systemd/mako.service

Modified
4 4 [Unit]
5 5 Description=Mako notification daemon
6 6 PartOf=graphical-session.target
7 7 After=graphical-session.target
9 9 [Service]
10 -Environment=NUGU_NO_RESTART_MAKO=1
11 -Environment=NUGU_NO_NOTIFY=1
12 -ExecStartPre=/usr/bin/lua %h/.config/hypr/scripts/theme.lua current
13 10 ExecStart=/usr/bin/mako --config %h/.config/mako/config
14 11 Restart=on-failure
15 12 RestartSec=2

hypr/systemd/nugu-theme.service

Deleted
deleted file mode 100644
1 -[Unit]
2 -Description=Nugu automatic light/dark desktop mode
3 -PartOf=graphical-session.target
4 -After=graphical-session.target hyprpaper.service
5 -Wants=hyprpaper.service
7 -[Service]
8 -ExecStart=/usr/bin/lua %h/.config/hypr/scripts/theme.lua watch
9 -Restart=on-failure
10 -RestartSec=10
12 -[Install]
13 -WantedBy=graphical-session.target

hypr/tests/commands_test.lua

Added
new file mode 100644
1 +package.path = "./?.lua;./?/init.lua;" .. package.path
3 +local calls = {}
5 +hl = {
6 + dsp = {
7 + exec_cmd = function(command)
8 + table.insert(calls, { "exec_cmd", command })
9 + return { kind = "exec", command = command }
10 + end,
11 + focus = function(opts)
12 + table.insert(calls, { "focus", opts.workspace })
13 + return { kind = "focus", workspace = opts.workspace }
14 + end,
15 + window = {
16 + move = function(opts)
17 + table.insert(calls, { "move", opts.workspace })
18 + return { kind = "move", workspace = opts.workspace }
19 + end,
20 + },
21 + },
22 + dispatch = function(dispatcher)
23 + table.insert(calls, { "dispatch", dispatcher.kind, dispatcher.command or dispatcher.workspace })
24 + return "dispatched"
25 + end,
28 +local commands = require("modules.commands")
30 +assert(commands.to_dispatcher("firefox").command == "firefox")
31 +assert(commands.to_dispatcher("firefox").kind == "exec")
33 +local dispatcher = { kind = "raw" }
34 +assert(commands.to_dispatcher(dispatcher) == dispatcher)
36 +assert(commands.app("wifi") == "dispatched")
37 +assert(calls[#calls][1] == "dispatch")
38 +assert(calls[#calls][2] == "exec")
39 +assert(calls[#calls][3] == "wezterm start --class impala -- impala")
41 +assert(commands.app("battery") == "dispatched")
42 +assert(calls[#calls][1] == "dispatch")
43 +assert(calls[#calls][2] == "exec")
44 +assert(calls[#calls][3]:find("wezterm start --class battery -- nu -c", 1, true))
45 +assert(calls[#calls][3]:find("upower -i /org/freedesktop/UPower/devices/battery_BAT0", 1, true))
47 +assert(commands.workspace("3") == "dispatched")
48 +assert(calls[#calls][1] == "dispatch")
49 +assert(calls[#calls][2] == "focus")
50 +assert(calls[#calls][3] == "3")
52 +assert(commands.move_to_workspace("4") == "dispatched")
53 +assert(calls[#calls][1] == "dispatch")
54 +assert(calls[#calls][2] == "move")
55 +assert(calls[#calls][3] == "4")
57 +local ok, err = pcall(commands.app, "missing")
58 +assert(not ok)
59 +assert(tostring(err):find("missing", 1, true))
61 +print("commands ok")

hypr/tests/hypr_osd_test.lua

Added
new file mode 100644
1 +package.path = "./?.lua;./?/init.lua;" .. package.path
3 +local osd = require("modules.hypr_osd")
5 +local function assert_contains(haystack, needle)
6 + assert(haystack:find(needle, 1, true), haystack .. " does not contain " .. needle)
7 +end
9 +assert_contains(osd.session.reload, "hyprctl reload")
10 +assert_contains(osd.session.reload, "hyprctl notify 5")
11 +assert_contains(osd.capture.region("hyprshot -m region -z"), "Region captured")
12 +assert_contains(osd.controls.volume_up, "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+")
13 +assert_contains(osd.controls.volume_up, "Volume")
14 +assert_contains(osd.notifications.clear_all, "makoctl dismiss --all")
15 +assert_contains(osd.notifications.clear_all, "hyprctl dismissnotify")
17 +print("hypr_osd ok")

hypr/wallpapers/nugu-dark.png

Deleted
deleted file mode 100644

Previous version contains binary or non-UTF-8 data.

hypr/wallpapers/nugu-light.png

Deleted
deleted file mode 100644

Previous version contains binary or non-UTF-8 data.

ironbar/PLAN.md

Modified
105 105 - Prefer mux-backed WezTerm tabs for TUI apps over standalone terminal windows.
106 106 - Prefer implementation logic in Lua over shell snippets; shell command strings are acceptable only at process boundary.
107 107 - Prefer `require(...)` modules over `dofile(...)` in normal config and shared helpers.
108 -- Shared TUI launch logic lives in Hypr Lua: `hypr/scripts/tui_tab.lua`.
109 -- Hypr binds call it via `require("scripts.tui_tab")`; Ironbar actions bridge through `hyprctl eval 'require("scripts.tui_tab").spawn(...)'` so both use the same implementation.
110 -- TUI launcher should spawn into WezTerm mux and activate the new pane/tab.
108 +- Hypr binds call direct Lua functions or `hl.dsp.exec_cmd(...)`; no external Lua VM.
109 +- Ironbar actions cross the process boundary with `hyprctl dispatch exec ...` only.
110 +- TUI launchers open named WezTerm windows via `wezterm start --class <app> -- <app>`.
111 111 - Keep app-specific service/config files in app dirs when possible, e.g. WezTerm systemd unit under `wezterm/systemd/`.
112 112 - Avoid fighting ugly GTK popups when a better TUI exists; use Ironbar as status/launcher if builtin popup is poor.
226 226 - Ironbar builtin `bluetooth` module used only for bar status.
227 227 - Builtin Bluetooth popup disabled; GTK switch popup looked bad even after CSS work.
228 228 - Left/middle click opens `bluetui` through shared Hypr Lua TUI launcher:
229 - - `hyprctl eval 'require("scripts.tui_tab").spawn("bluetui")'`
229 + - `hyprctl dispatch exec 'wezterm start --class bluetui -- bluetui'`
230 230 - Bar label uses fixed semantic Bluetooth battery icon, not dynamic percentage icon:
231 231 - `󰥈 {device_battery_percent}%`
232 232 - `icon_theme` switched from missing `Papirus` to installed `Adwaita`; broken device image fixed.

ironbar/config.json

Modified
5 5 "icon_theme": "Adwaita",
6 6 "position": "top",
7 7 "height": 30,
8 8 "popup_autohide": true,
9 9 "popup_gap": 4,
10 + "ironvar_defaults": {
11 + "ws1": "1 󰖟",
12 + "ws2": "2 󰅨",
13 + "ws3": "3 󰆍",
14 + "ws4": "4 󰭹",
15 + "ws5": "5 󰎆",
16 + "ws9": "9 󰉋"
17 + },
10 18 "start": [
12 20 "type": "custom",
17 25 "type": "button",
18 26 "class": "workspace-item",
19 27 "label": "#ws1",
20 - "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"1\" }))'"
28 + "on_click": "!hyprctl eval 'require(\"modules.commands\").workspace(\"1\")'"
23 31 "type": "button",
24 32 "class": "workspace-item",
25 33 "label": "#ws2",
26 - "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"2\" }))'"
34 + "on_click": "!hyprctl eval 'require(\"modules.commands\").workspace(\"2\")'"
29 37 "type": "button",
30 38 "class": "workspace-item",
31 39 "label": "#ws3",
32 - "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"3\" }))'"
40 + "on_click": "!hyprctl eval 'require(\"modules.commands\").workspace(\"3\")'"
35 43 "type": "button",
36 44 "class": "workspace-item",
37 45 "label": "#ws4",
38 - "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"4\" }))'"
46 + "on_click": "!hyprctl eval 'require(\"modules.commands\").workspace(\"4\")'"
41 49 "type": "button",
42 50 "class": "workspace-item",
43 51 "label": "#ws5",
44 - "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"5\" }))'"
52 + "on_click": "!hyprctl eval 'require(\"modules.commands\").workspace(\"5\")'"
47 55 "type": "button",
48 56 "class": "workspace-item",
49 57 "label": "#ws9",
50 - "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"9\" }))'"
58 + "on_click": "!hyprctl eval 'require(\"modules.commands\").workspace(\"9\")'"
102 110 "cmd": "~/.config/ironbar/scripts/wifi-status.sh",
103 111 "mode": "poll",
104 112 "interval": 30000,
105 - "on_click_left": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"impala\")'",
106 - "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"impala\")'",
113 + "on_click_left": "hyprctl eval 'require(\"modules.commands\").app(\"wifi\")'",
114 + "on_click_middle": "hyprctl eval 'require(\"modules.commands\").app(\"wifi\")'",
107 115 "tooltip": "WiFi: left/middle opens impala"
116 124 "connected_battery": "󰂱 {device_battery_percent}%"
118 126 "disable_popup": true,
119 - "on_click_left": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"bluetui\")'",
120 - "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"bluetui\")'",
127 + "on_click_left": "hyprctl eval 'require(\"modules.commands\").app(\"bluetooth\")'",
128 + "on_click_middle": "hyprctl eval 'require(\"modules.commands\").app(\"bluetooth\")'",
121 129 "tooltip": "Bluetooth: left/middle opens bluetui"
130 138 "interval": {
131 139 "cpu": 2
133 - "on_click_left": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"btm\")'",
134 - "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"btm\")'",
141 + "on_click_left": "hyprctl eval 'require(\"modules.commands\").app(\"system_monitor\")'",
142 + "on_click_middle": "hyprctl eval 'require(\"modules.commands\").app(\"system_monitor\")'",
135 143 "tooltip": "System monitor: left/middle opens btm"
139 147 "on_scroll_up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+",
140 148 "on_scroll_down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-",
141 149 "on_click_right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
142 - "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"wiremix\")'",
150 + "on_click_middle": "hyprctl eval 'require(\"modules.commands\").app(\"audio_mixer\")'",
143 151 "smooth_scroll_speed": 1.0,
144 152 "show_sources": false,
145 153 "tooltip": "Volume: scroll adjusts, right mutes, middle opens wiremix"
148 156 "type": "brightness",
149 - "format": "{percentage}%",
150 - "icon_label": "display-brightness-symbolic",
157 + "format": "󰃠 {percentage}%",
151 158 "mode": {
152 159 "type": "systemd",
153 160 "subsystem": "backlight",
160 167 "type": "battery",
161 - "format": "{percentage}%",
162 - "icon_size": 10,
168 + "format": "󰁹 {percentage}%",
169 + "show_icon": false,
163 170 "show_if": "ls /sys/class/power_supply/ | grep -q '^BAT'",
164 171 "profiles": {
165 172 "warning": {
173 180 "format": "󰂎 {percentage}%"
176 - "tooltip": "Battery: left opens details"
183 + "on_click_left": "hyprctl eval 'require(\"modules.commands\").app(\"battery\")'",
184 + "on_click_middle": "hyprctl eval 'require(\"modules.commands\").app(\"battery\")'",
185 + "tooltip": "Battery: left/middle opens upower"
179 188 "type": "inhibit",
180 189 "durations": ["00:30:00", "01:00:00", "02:00:00", "inf"],
181 - "default_duration": "00:30:00",
190 + "default_duration": "inf",
182 191 "format_on": "󰅶 {duration}",
183 192 "format_off": "󰛊 {duration}",
184 193 "tooltip": "Inhibit: left toggles, right cycles duration"

ironbar/nugu.css

Modified
1 -/* Generated by hypr/scripts/theme.nu from Nugu palette. */
1 +/* Generated by Hyprland Lua from Nugu palette. */
2 2 :root {
3 3 --bg: #242424;
4 4 --bg-transparent: #242424ee;
6 6 --fg: #dbdbdb;
7 7 --accent: #d86dd8;
8 8 --focus: #9aabae;
9 + --important-global: #f3effb;
9 10 --on-focus: #121212;
10 11 --muted: #9d9d9d;
11 12 --unfocus: #6f6f6f;

ironbar/scripts/workspaces-watch.py

Modified
88 88 def markup(ws_id: str, icon: str, active: str, occupied: set[str], colors: dict[str, str]) -> str:
89 + label = f"{ws_id} {icon}"
89 90 if ws_id == active:
90 - return '<span foreground="{}" background="{}" font_weight="bold"> {} </span>'.format(
91 - colors["on-focus"],
92 - colors["focus"],
93 - icon,
94 - )
91 + return '<span foreground="{}">{}</span>'.format(colors["important-global"], label)
95 92 if ws_id in occupied:
96 - return '<span foreground="{}">{}</span>'.format(colors["fg"], icon)
97 - return '<span foreground="{}">{}</span>'.format(colors["muted"], icon)
93 + return '<span foreground="{}">{}</span>'.format(colors["fg"], label)
94 + return '<span foreground="{}">{}</span>'.format(colors["muted"], label)
100 97 def hypr_state() -> tuple[str, set[str]]:
106 103 def set_var(name: str, value: str) -> None:
107 104 if last_vars.get(name) == value:
108 105 return
109 - subprocess.run(("ironbar", "var", "set", name, value), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=False)
110 - last_vars[name] = value
106 + result = subprocess.run(("ironbar", "var", "set", name, value), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=False)
107 + if result.returncode == 0:
108 + last_vars[name] = value
113 111 def update() -> None:

ironbar/style.css

Modified
9 9 font-family: 'IBM Plex Mono';
10 10 font-size: var(--font-size);
11 + font-feature-settings: "tnum";
11 12 border: none;
12 13 box-shadow: none;
13 14 background-image: none;
61 62 .nugu-workspaces .workspace-item {
62 63 min-height: 0;
64 + min-width: 16px;
63 65 margin: 0 2px;
64 - padding: 1px 5px;
66 + padding: 1px 4px;
65 67 color: var(--muted);
68 -.nugu-workspaces .workspace-item:hover {
69 - background: var(--accent);
70 - color: var(--on-focus);
73 70 .bindmode {
74 71 margin-left: 8px;
75 72 padding: 1px 7px;
91 88 .volume {
92 - margin: 0 7px;
89 + min-width: 52px;
90 + margin: 0 3px;
93 +.volume .muted {
94 + color: var(--accent);
95 97 .popup-volume {
122 124 color: var(--on-focus);
125 -.popup-volume .btn-mute {
126 - color: var(--fg);
129 -.popup-volume .btn-mute:hover,
130 -.popup-volume .btn-mute:checked {
131 - background: var(--accent);
132 - color: var(--on-focus);
135 127 popover listview,
136 128 popover list,
137 129 popover row,
267 259 .brightness {
268 - margin: 0 7px;
260 + min-width: 52px;
261 + margin: 0 3px;
269 262 color: var(--fg);
272 265 .battery {
273 - margin: 0 7px;
266 + min-width: 52px;
267 + margin: 0 3px;
274 268 color: var(--fg);
296 290 .inhibit {
297 - margin: 0 7px 0 12px;
291 + min-width: 58px;
292 + margin: 0 3px 0 6px;
298 293 color: var(--muted);
393 388 .popup-clipboard {
394 389 padding: 8px;
390 + background-color: var(--bg-transparent);
391 + color: var(--fg);
394 +.popup-clipboard *,
395 +.popup-clipboard .item,
396 +.popup-clipboard .item label,
397 +.popup-clipboard .item .btn,
398 +.popup-clipboard .item .btn *,
399 +.popup-clipboard .item .btn-remove,
400 +.popup-clipboard .item .btn-remove * {
401 + color: var(--fg);
397 404 .popup-clipboard .item {
398 405 padding: 4px 8px;
399 406 border-radius: var(--radius);
400 - color: var(--fg);
407 + background: transparent;
403 -.popup-clipboard .item label {
404 - color: var(--fg);
410 +.popup-clipboard .item .btn,
411 +.popup-clipboard .item .btn-remove {
412 + background: transparent;
407 -.popup-clipboard .item:hover {
415 +.popup-clipboard .item:hover,
416 +.popup-clipboard .item:hover .btn,
417 +.popup-clipboard .item:hover .btn-remove {
408 418 background-color: var(--accent);
409 419 color: var(--on-focus);
412 -.popup-clipboard .item:hover label {
422 +.popup-clipboard .item:hover *,
423 +.popup-clipboard .item:hover .btn *,
424 +.popup-clipboard .item:hover .btn-remove * {
425 + color: var(--on-focus);
428 +.popup-clipboard .item .btn:checked,
429 +.popup-clipboard .item .btn:active,
430 +.popup-clipboard .item .btn-remove:active {
431 + background-color: var(--focus);
432 + color: var(--on-focus);
435 +.popup-clipboard .item .btn:checked *,
436 +.popup-clipboard .item .btn:active *,
437 +.popup-clipboard .item .btn-remove:active * {
413 438 color: var(--on-focus);
416 441 .mako-status {
417 - margin: 0 7px 0 12px;
442 + min-width: 30px;
443 + margin: 0 3px 0 6px;
418 444 color: var(--fg);
421 447 .wifi {
422 - margin: 0 7px;
448 + margin: 0 3px;
423 449 color: var(--fg);
426 452 .bluetooth {
427 - margin: 0 7px;
453 + min-width: 18px;
454 + margin: 0 3px;
457 +.bluetooth.connected {
458 + min-width: 50px;
430 461 .bluetooth.disabled,
443 474 .tray {
444 - margin: 0 7px 0 12px;
475 + margin: 0 3px 0 6px;
447 478 .tray popover contents {
457 488 color: var(--muted);
460 -.power-menu button:hover,
461 -.power-menu #power-btn:hover {
462 - background: var(--accent);
463 - color: var(--on-focus);
466 491 .power-menu button:checked,
467 492 .power-menu button:focus,
468 493 .power-menu #power-btn:checked,
471 496 color: var(--muted);
499 +.power-menu button:hover,
500 +.power-menu button:focus:hover,
501 +.power-menu button:checked:hover,
502 +.power-menu #power-btn:hover,
503 +.power-menu #power-btn:focus:hover,
504 +.power-menu #power-btn:checked:hover {
505 + background: var(--accent);
506 + color: var(--on-focus);
474 509 .popup-power-menu {
475 510 padding: 12px;
476 511 background-color: var(--bg-transparent);
522 557 .sysinfo {
523 - margin: 0 7px 0 16px;
558 + min-width: 54px;
559 + margin: 0 3px 0 8px;
526 562 .sysinfo > .item + .item {
527 563 margin-left: 8px;
530 -.music:hover,
531 -.clipboard:hover,
532 -.mako-status:hover,
533 -.wifi:hover,
534 -.bluetooth:hover,
535 -.tray:hover,
536 -.sysinfo:hover,
537 -.volume:hover,
538 -.brightness:hover,
539 -.battery:hover,
540 -.inhibit:hover,
541 -.clock:hover {
542 - background: var(--accent);
543 - color: var(--on-focus);
544 - border-radius: var(--radius);
547 -.music:hover label,
548 -.clipboard:hover label,
549 -.mako-status:hover label,
550 -.wifi:hover label,
551 -.bluetooth:hover label,
552 -.tray:hover label,
553 -.sysinfo:hover label,
554 -.volume:hover label,
555 -.brightness:hover label,
556 -.battery:hover label,
557 -.inhibit:hover label,
558 -.clock:hover label {
559 - color: var(--on-focus);
562 566 .music:checked,
563 567 .music:focus,
564 568 .clipboard:checked,
575 579 .sysinfo:focus,
576 580 .volume:checked,
577 581 .volume:focus,
578 -.volume button:checked,
579 -.volume button:focus,
580 582 .brightness:checked,
581 583 .brightness:focus,
582 584 .battery:checked,
587 589 color: var(--fg);
590 -.music:checked label,
591 -.music:focus label,
592 -.clipboard:checked label,
593 -.clipboard:focus label,
594 -.mako-status:checked label,
595 -.mako-status:focus label,
596 -.wifi:checked label,
597 -.wifi:focus label,
598 -.bluetooth:checked label,
599 -.bluetooth:focus label,
600 -.tray:checked label,
601 -.tray:focus label,
602 -.sysinfo:checked label,
603 -.sysinfo:focus label,
604 -.volume:checked label,
605 -.volume:focus label,
606 -.brightness:checked label,
607 -.brightness:focus label,
608 -.battery:checked label,
609 -.battery:focus label,
610 -.clock:checked label,
611 -.clock:focus label {
592 +.music:checked *,
593 +.music:focus *,
594 +.clipboard:checked *,
595 +.clipboard:focus *,
596 +.mako-status:checked *,
597 +.mako-status:focus *,
598 +.wifi:checked *,
599 +.wifi:focus *,
600 +.bluetooth:checked *,
601 +.bluetooth:focus *,
602 +.tray:checked *,
603 +.tray:focus *,
604 +.sysinfo:checked *,
605 +.sysinfo:focus *,
606 +.volume:checked *,
607 +.volume:focus *,
608 +.brightness:checked *,
609 +.brightness:focus *,
610 +.battery:checked *,
611 +.battery:focus *,
612 +.clock:checked *,
613 +.clock:focus * {
612 614 color: var(--fg);
617 +.music:hover,
618 +.music:focus:hover,
619 +.music:checked:hover,
620 +.clipboard:hover,
621 +.clipboard:focus:hover,
622 +.clipboard:checked:hover,
623 +.mako-status:hover,
624 +.mako-status:focus:hover,
625 +.mako-status:checked:hover,
626 +.wifi:hover,
627 +.wifi:focus:hover,
628 +.wifi:checked:hover,
629 +.bluetooth:hover,
630 +.bluetooth:focus:hover,
631 +.bluetooth:checked:hover,
632 +.tray:hover,
633 +.tray:focus:hover,
634 +.tray:checked:hover,
635 +.sysinfo:hover,
636 +.sysinfo:focus:hover,
637 +.sysinfo:checked:hover,
638 +.volume:hover,
639 +.volume:focus:hover,
640 +.volume:checked:hover,
641 +.brightness:hover,
642 +.brightness:focus:hover,
643 +.brightness:checked:hover,
644 +.battery:hover,
645 +.battery:focus:hover,
646 +.battery:checked:hover,
647 +.inhibit:hover,
648 +.inhibit:focus:hover,
649 +.inhibit:checked:hover,
650 +.clock:hover,
651 +.clock:focus:hover,
652 +.clock:checked:hover {
653 + background: var(--accent);
654 + color: var(--on-focus);
655 + border-radius: var(--radius);
658 +.music:hover *,
659 +.music:focus:hover *,
660 +.music:checked:hover *,
661 +.clipboard:hover *,
662 +.clipboard:focus:hover *,
663 +.clipboard:checked:hover *,
664 +.mako-status:hover *,
665 +.mako-status:focus:hover *,
666 +.mako-status:checked:hover *,
667 +.wifi:hover *,
668 +.wifi:focus:hover *,
669 +.wifi:checked:hover *,
670 +.bluetooth:hover *,
671 +.bluetooth:focus:hover *,
672 +.bluetooth:checked:hover *,
673 +.tray:hover *,
674 +.tray:focus:hover *,
675 +.tray:checked:hover *,
676 +.sysinfo:hover *,
677 +.sysinfo:focus:hover *,
678 +.sysinfo:checked:hover *,
679 +.volume:hover *,
680 +.volume:focus:hover *,
681 +.volume:checked:hover *,
682 +.brightness:hover *,
683 +.brightness:focus:hover *,
684 +.brightness:checked:hover *,
685 +.battery:hover *,
686 +.battery:focus:hover *,
687 +.battery:checked:hover *,
688 +.inhibit:hover *,
689 +.inhibit:focus:hover *,
690 +.inhibit:checked:hover *,
691 +.clock:hover *,
692 +.clock:focus:hover *,
693 +.clock:checked:hover * {
694 + color: var(--on-focus);
697 +.popup-volume .btn-mute,
698 +.popup-volume .btn-mute label,
699 +.popup-volume .btn-mute image,
700 +.popup-volume .btn-mute * {
701 + background: transparent;
702 + color: var(--fg);
705 +.popup-volume .btn-mute:checked,
706 +.popup-volume .btn-mute:checked label,
707 +.popup-volume .btn-mute:checked image,
708 +.popup-volume .btn-mute:checked * {
709 + background: transparent;
710 + color: var(--accent);
713 +.popup-volume .btn-mute:hover,
714 +.popup-volume .btn-mute:active,
715 +.popup-volume .btn-mute:checked:hover,
716 +.popup-volume .btn-mute:checked:active {
717 + background: var(--accent);
718 + color: var(--on-focus);
721 +.popup-volume .btn-mute:hover label,
722 +.popup-volume .btn-mute:hover image,
723 +.popup-volume .btn-mute:hover *,
724 +.popup-volume .btn-mute:active label,
725 +.popup-volume .btn-mute:active image,
726 +.popup-volume .btn-mute:active *,
727 +.popup-volume .btn-mute:checked:hover label,
728 +.popup-volume .btn-mute:checked:hover image,
729 +.popup-volume .btn-mute:checked:hover *,
730 +.popup-volume .btn-mute:checked:active label,
731 +.popup-volume .btn-mute:checked:active image,
732 +.popup-volume .btn-mute:checked:active * {
733 + color: var(--on-focus);
615 736 .popup {
616 737 padding: 8px;

mako/nugu.conf

Modified
1 -# Generated by hypr/scripts/theme.nu from Nugu palette.
1 +# Generated by Hyprland Lua from Nugu palette.
2 2 background-color=#242424ee
3 3 text-color=#dbdbdbff
4 4 border-color=#d86dd8ff

nugu/ironbar.nu

Modified
16 16 --fg: ($p.ui.normal);
17 17 --accent: ($p.ui.accent);
18 18 --focus: ($p.ui.focus);
19 + --important-global: ($p.ui.important_global);
19 20 --on-focus: ($on_focus);
20 21 --muted: ($p.ui.minor);
21 22 --unfocus: ($p.ui.unfocus);

nushell/modules/git.nu

Modified
463 463 public-migration $migration
466 -# Bootstrap checkout.
467 -export def --env co [
468 - source: string = "." # URL/path, or `.` to migrate current checkout
466 +# Bootstrap a new bare+worktree layout from a URL/path.
467 +export def --env "wt clone" [
468 + source: string # URL/path
469 469 name?: string # repo/root name
470 - --branch (-b): string = "" # branch to check out; default remote/current HEAD
471 - --dir (-d): path = "." # parent dir for fresh checkout
472 - --plan # with `co .`: preview only
470 + --branch (-b): string = "" # branch to check out; default remote HEAD
471 + --dir (-d): path = "." # parent dir
472 +] {
473 + co-fresh $source $name $branch $dir
476 +# Migrate the current checkout into a sibling bare+worktree layout.
477 +export def --env "wt migrate" [
478 + name?: string # repo/root name
479 + --branch (-b): string = "" # branch to check out; default current branch
480 + --plan # preview only
473 481 --dirty: string = $DIRTY_REFUSE # `refuse` | `copy`
475 - if $source == "." {
476 - co-current $name $branch $plan $dirty
477 - } else {
478 - if $plan { error make {msg: "--plan only applies to `co .`"} }
479 - if $dirty != $DIRTY_REFUSE { error make {msg: "--dirty only applies to `co .`"} }
480 - co-fresh $source $name $branch $dir
481 - }
483 + co-current $name $branch $plan $dirty
484 486 # Summary.

pi-ext

Modified
1 -Subproject commit a3fbd1e8b773dc8ceb865946a68f4e7c679aa6a9
1 +Subproject commit e3489ee81f19f0b72c761e50df075ad948a24e71

pi/agent/settings.json

Modified
8 8 "theme": "terminal",
9 9 "enabledModels": [
10 - "openai-codex/gpt-5.5",
11 - "kimi-coding/kimi-for-coding",
12 - "zai/glm-5.1",
13 - "zai/glm-5-turbo",
14 - "minimax/MiniMax-M2.7-highspeed",
15 - "minimax/MiniMax-M2.5-highspeed"
10 + "minimax/MiniMax-M3",
11 + "openai-codex/gpt-5.5"
17 - "defaultProvider": "minimax",
18 - "defaultModel": "MiniMax-M3",
13 + "defaultProvider": "openai-codex",
14 + "defaultModel": "gpt-5.5",
19 15 "defaultThinkingLevel": "high",
20 16 "quietStartup": true,
21 17 "collapseChangelog": true,
24 20 "showTerminalProgress": true
26 22 "sessionDir": "~/.local/state/pi/sessions",
27 - "hideThinkingBlock": true,
23 + "hideThinkingBlock": false,
28 24 "devil": {
29 25 "model": "zai/glm-5.1",
30 26 "defenderModel": "openai-codex/gpt-5.5",
76 72 "q": {
77 73 "model": "minimax/MiniMax-M2.7-highspeed"
79 -}

systemd/user/app-graphical.slice.d/10-x230-resources.conf

Added
new file mode 100644
1 +[Slice]
2 +CPUWeight=100
3 +IOWeight=100
4 +MemoryLow=512M
5 +MemoryHigh=10G

systemd/user/background-graphical.slice.d/10-x230-resources.conf

Added
new file mode 100644
1 +[Slice]
2 +CPUWeight=25
3 +IOWeight=25
4 +MemoryHigh=2G
5 +MemoryMax=4G

systemd/user/session-graphical.slice.d/10-x230-resources.conf

Added
new file mode 100644
1 +[Slice]
2 +CPUWeight=1000
3 +IOWeight=1000
4 +MemoryLow=768M

systemd/user/work.slice

Modified
1 +[Unit]
2 +Description=Interactive development work slice
3 +PartOf=graphical-session.target
4 +After=graphical-session.target
5 +Conflicts=wayland-session-shutdown.target
6 +Before=wayland-session-shutdown.target
1 8 [Slice]
2 -MemoryHigh=24G
3 -MemoryMax=28G
4 -CPUWeight=50
5 -IOWeight=50
9 +CPUWeight=100
10 +IOWeight=100
11 +MemoryLow=1G
12 +MemoryHigh=12G
13 +MemoryMax=14G
14 +MemorySwapMax=8G

wezterm/bugabinga/exec_domains.lua

Deleted
deleted file mode 100644
1 -local wez = require 'wezterm'
3 -local function append_all(dst, src)
4 - for _, value in ipairs(src) do
5 - table.insert(dst, value)
6 - end
7 -end
9 -local function scoped_domain(name, label, properties)
10 - return wez.exec_domain(name, function(cmd)
11 - local args = cmd.args or { 'nu', '--login' }
12 - local env = cmd.set_environment_variables or {}
13 - env.WEZTERM_EXEC_DOMAIN = name
14 - cmd.set_environment_variables = env
15 - local unit = 'wezterm-' .. name:gsub('[^%w_.-]', '-') .. '-' .. tostring(env.WEZTERM_PANE or os.time())
16 - local wrapped = {
17 - 'systemd-run',
18 - '--user',
19 - '--scope',
20 - '--same-dir',
21 - '--collect',
22 - '--quiet',
23 - '--unit=' .. unit,
24 - '--description=WezTerm ' .. name,
25 - }
27 - for _, property in ipairs(properties) do
28 - table.insert(wrapped, '-p')
29 - table.insert(wrapped, property)
30 - end
32 - append_all(wrapped, args)
33 - cmd.args = wrapped
34 - return cmd
35 - end, label)
36 -end
38 -return function(cfg)
39 - if not wez.target_triple:find( 'linux', 1, true ) then return end
41 - cfg.exec_domains = {
42 - scoped_domain('scope:build', 'scope:build CPU 25% MEM max 256M', {
43 - 'CPUQuota=25%',
44 - 'MemoryMax=256M',
45 - 'MemorySwapMax=0',
46 - 'OOMPolicy=stop',
47 - }),
48 - }
49 -end

wezterm/bugabinga/key_binds.lua

Modified
158 158 cwd = wez.home_dir,
161 - {
162 - key = 'b',
163 - mods = 'LEADER',
164 - action = wez.action.SpawnCommandInNewTab { domain = { DomainName = 'scope:build', }, },
165 - },
167 162 key = 'B',
168 163 mods = 'LEADER|SHIFT',

wezterm/bugabinga/mux.lua

Modified
9 9 no_serve_automatically = true,
13 - cfg.default_gui_startup_args = { 'connect', 'unix' }

wezterm/wezterm.lua

Modified
11 11 require 'bugabinga.status' ( cfg )
12 12 require 'bugabinga.launch' ( cfg )
13 13 require 'bugabinga.wsl' ( cfg )
14 -require 'bugabinga.exec_domains' ( cfg )
16 15 -- logs key presses
17 16 -- cfg.debug_key_events = true,

x230.symlinks

Modified
31 31 git/gitconfig.bugabinga
32 32 ~/.config/git/.gitconfig.include
34 +git/ignore
35 +~/.config/git/ignore
35 38 ~/.config/gh
100 103 hypr/systemd/wl-clip-persist.service
101 104 ~/.config/systemd/user/wl-clip-persist.service
103 -hypr/systemd/nugu-theme.service
104 -~/.config/systemd/user/nugu-theme.service
106 106 hypr/systemd/ironbar.service
107 107 ~/.config/systemd/user/ironbar.service
109 109 hypr/systemd/ironbar-workspaces.service
110 110 ~/.config/systemd/user/ironbar-workspaces.service
112 +systemd/user/session-graphical.slice.d/10-x230-resources.conf
113 +~/.config/systemd/user/session-graphical.slice.d/10-x230-resources.conf
115 +systemd/user/app-graphical.slice.d/10-x230-resources.conf
116 +~/.config/systemd/user/app-graphical.slice.d/10-x230-resources.conf
118 +systemd/user/background-graphical.slice.d/10-x230-resources.conf
119 +~/.config/systemd/user/background-graphical.slice.d/10-x230-resources.conf
121 +systemd/user/work.slice
122 +~/.config/systemd/user/work.slice
112 124 wezterm/systemd/wezterm-mux-server.service
113 125 ~/.config/systemd/user/wezterm-mux-server.service

yazi/package.toml

Modified
1 1 [[plugin.deps]]
2 2 use = "yazi-rs/plugins:full-border"
3 -rev = "c2c16c8"
3 +rev = "598cdb6"
4 4 hash = "7b625412411be411153886894d9acaf"
6 6 [[plugin.deps]]
7 7 use = "yazi-rs/plugins:toggle-pane"
8 -rev = "c2c16c8"
8 +rev = "598cdb6"
9 9 hash = "9c7987da2d2a2120dac33abb64132004"
11 11 [[plugin.deps]]
12 12 use = "yazi-rs/plugins:smart-enter"
13 -rev = "c2c16c8"
13 +rev = "598cdb6"
14 14 hash = "187cc58ba7ac3befd49c342129e6f1b6"
16 16 [[plugin.deps]]
17 17 use = "yazi-rs/plugins:smart-filter"
18 -rev = "c2c16c8"
18 +rev = "598cdb6"
19 19 hash = "c887903a63a2ff520081b6d90a4b3392"
21 21 [[plugin.deps]]
22 22 use = "yazi-rs/plugins:smart-paste"
23 -rev = "c2c16c8"
23 +rev = "598cdb6"
24 24 hash = "3f8d49413bc8691b4c652eb417a20178"
26 26 [[plugin.deps]]
27 27 use = "yazi-rs/plugins:git"
28 -rev = "c2c16c8"
28 +rev = "598cdb6"
29 29 hash = "88e56a64b7ce7c4314427452343fef17"
31 31 [[plugin.deps]]
32 32 use = "yazi-rs/plugins:chmod"
33 -rev = "c2c16c8"
33 +rev = "598cdb6"
34 34 hash = "f0c8c378184d5f8abd1b095a443d336d"
36 36 [[plugin.deps]]
37 37 use = "yazi-rs/plugins:diff"
38 -rev = "c2c16c8"
38 +rev = "598cdb6"
39 39 hash = "8b1af6b5a69797ee951f2a80ce570818"
41 41 [[plugin.deps]]
42 42 use = "yazi-rs/plugins:piper"
43 -rev = "c2c16c8"
43 +rev = "598cdb6"
44 44 hash = "d99cfbc3812e7738505f9e4bedb759cd"
46 46 [[plugin.deps]]