dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Reviews Compare Notes Search Review guide CI runs Merge remote-tracking branch 'bugabinga/trunk' into trunk ab9b78c379b701c9c41769cc136dcade5ab4eb7f
Oliver Jan Krylow <oliver@bugabinga.net > · 16 Jun 2026
unsigned
Browse files Compare with HEAD
# Conflicts:
# enable_user_services.nu
# pi-ext
# pi/agent/settings.json
Changed files (56) +1848 / −918 text lines · all files grouped into 32 bars · 1 metadata-only · 2 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately
Diff layout Auto Unified Split
docs/super/inventory/2026-06-14-nugu-theme-current-state.md Added new file mode 100644+335 / −0 text lines
1 + # Nugu Theme Current-State Inventory — 2026-06-14 3 + Goal: build theme switching system with Nugu as source of truth.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`.17 + - `nugu/linux_console.nu`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`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`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`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.89 + - `hypr/generated/nugu.lua`90 + - `hypr/modules/appearance.lua`91 + - `hypr/modules/rules.lua`92 + - `hypr/modules/hypr_osd.lua`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.103 + - `hyprctl reload config-only` should refresh Lua config and Nugu colors.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.116 + - `hypr/systemd/mako.service`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`.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.134 + - `ironbar/style.css`136 + - `ironbar/config.json`137 + - `ironbar/scripts/workspaces-watch.py`138 + - `hypr/systemd/ironbar.service`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.149 + - Ironbar docs/help: style changes hot-loaded; `ironbar reload` exists.150 + - `ironbar --theme <path>` can select CSS path at start.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.161 + - `hypr/hyprtoolkit.conf`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.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 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`.188 + - `gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'|'prefer-light'`.190 + Gap: no Nugu switch command currently sets it.197 + - `ghostty/themes/nugu-dark`198 + - `ghostty/themes/nugu-light`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.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`218 + - Generated palettes exist for both modes.219 + - `theme.lua` prefers `~/.cache/nugu/mode`, then falls back to WezTerm GUI appearance.223 + - Update mode reader to local-state.224 + - Need reload behavior decision; automatic reload not verified.231 + - `neovim/colors/nugu.lua`232 + - `neovim/lua/bugabinga/nugu/palette.lua`233 + - `neovim/lua/bugabinga/nugu/init.lua`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.248 + - `helix/config.toml`249 + - `helix/themes/nugu-dark.toml`250 + - `helix/themes/nugu-light.toml`254 + - `helix/config.toml` hard-codes `theme = "nugu-dark"`.256 + Gap: no dynamic switch currently.263 + - `yazi/flavors/nugu-dark.yazi/flavor.toml`264 + - `yazi/flavors/nugu-light.yazi/flavor.toml`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.278 + - `aerc/stylesets/nugu-dark`279 + - `aerc/stylesets/nugu-light`283 + - `aerc/aerc.conf` hard-codes `styleset-name=nugu-dark`.285 + Gap: no dynamic switch currently.292 + - `bash/linux-console/nugu-dark.sh`293 + - `bash/linux-console/nugu-light.sh`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 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.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+478 / −0 text lines
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.13 + **Phase:** Single-plan implementation15 + **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`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.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`.64 + ## Task 1: Update Nugu Hypr generator paths + runtime fragments 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:81 + ' local state_home = os.getenv("XDG_STATE_HOME") or (os.getenv("HOME") .. "/.local/state")'82 + ' local path = state_home .. "/nugu/mode"'85 + - [ ] Add helpers to `nugu/hypr.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)" }93 + - [ ] Add exported fragment generators to `nugu/hypr.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")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")111 + border-color=(rgba $p.ui.accent "ff")112 + progress-color=over (rgba $p.ui.focus "ff")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. */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);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)172 + - [ ] Extend `nugu/justfile` `hypr` recipe to generate/copy `runtime/{dark,light}/{mako.conf,ironbar-vars.css,hyprtoolkit.conf}`.177 + just --justfile nugu/justfile --working-directory nugu hypr178 + just --justfile nugu/justfile --working-directory nugu check181 + Expected: both exit `0`; runtime generated files exist.185 + ## Task 2: Add local-state switch command 189 + - Create: `hypr/scripts/nugu-theme.nu`191 + - [ ] Create script with this behavior:196 + const valid_modes = [dark light]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" }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" }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 {222 + } else if $mode == "current" {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 $path234 + 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)" } }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")249 + def write-ironbar [mode: string] {250 + let vars = (copy-generated $mode "ironbar-vars.css")251 + let css = $'@import url("(ironbar-base-css-uri)");253 + write-text (themes-dir | path join "ironbar.css") $css256 + 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 $scheme261 + 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 $path273 + 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)" | ignore279 + export def status [] { read-mode }281 + export def prepare [mode = "current"] {282 + let m = (target-mode $mode)286 + write-hyprtoolkit $m289 + export def main [mode = "toggle"] {290 + let m = (target-mode $mode)304 + chmod +x hypr/scripts/nugu-theme.nu305 + nu-check --as-script hypr/scripts/nugu-theme.nu306 + nu hypr/scripts/nugu-theme.nu prepare current307 + nu hypr/scripts/nugu-theme.nu status310 + Expected: script checks; state files exist; status prints `dark` or `light`.314 + ## Task 3: Wire app configs to local-state fragments 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:329 + include=~/.config/mako/nugu.conf335 + include=~/.local/state/nugu/themes/mako.conf338 + - [ ] In `ironbar/style.css`, delete first line:341 + @import url("nugu.css");344 + - [ ] In `ironbar/scripts/workspaces-watch.py`, replace tracked CSS path with local state:347 + state_home = Path(os.environ.get("XDG_STATE_HOME" , Path.home() / ".local" / "state" ))348 + path = state_home / "nugu" / "themes" / "ironbar.css" 351 + - [ ] In `wezterm/bugabinga/theme.lua`, replace cache reader with local-state reader: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' )358 + - [ ] In `hypr/systemd/mako.service`, add before `ExecStart=`:361 + ExecStartPre=/usr/bin/nu %h/.config/hypr/scripts/nugu-theme.nu prepare current364 + - [ ] In `hypr/systemd/ironbar.service`, add before `ExecStart=`:367 + ExecStartPre=/usr/bin/nu %h/.config/hypr/scripts/nugu-theme.nu prepare current370 + and start with runtime CSS:373 + ExecStart=/usr/bin/ironbar --theme %h/.local/state/nugu/themes/ironbar.css376 + - [ ] In `hypr/hyprtoolkit.conf`, keep static settings and end with:379 + # Runtime Nugu color override. Hyprtoolkit watches this file, not sourced files.380 + source = ~/.local/state/nugu/themes/hyprtoolkit.conf386 + nu hypr/scripts/nugu-theme.nu prepare current389 + hyprctl reload config-only392 + Expected: commands exit `0` when services/Hyprland are running.396 + ## Task 4: Add Hyprland toggle bind + OSD 400 + - Modify: `hypr/modules/hypr_osd.lua`401 + - Modify: `hypr/modules/binds.lua`403 + - [ ] In `hypr/modules/hypr_osd.lua`, add before `M.notifications`:407 + toggle = around("nu ~/.config/hypr/scripts/nugu-theme.nu toggle", notify(ok, 1200, t.ui.accent, "Nugu theme toggled")),411 + - [ ] In `hypr/modules/binds.lua`, add after reload bind:414 + bind(mod .. " + SHIFT + T", osd.theme.toggle, "toggle nugu light/dark")420 + lua hypr/tests/commands_test.lua421 + lua hypr/tests/hypr_osd_test.lua422 + hyprctl reload config-only426 + Expected: tests pass; no new config error.430 + ## Task 5: Final verification 432 + - [ ] Run generator validation:435 + just --justfile nugu/justfile --working-directory nugu check436 + just --justfile nugu/justfile --working-directory nugu hypr439 + - [ ] Run diff invariant:442 + before= $(git status --short --ignore-submodules = dirty) 443 + nu hypr/scripts/nugu-theme.nu light444 + nu hypr/scripts/nugu-theme.nu dark445 + after= $(git status --short --ignore-submodules = dirty) 446 + test "$before" = "$after" 449 + - [ ] Verify GTK preference:452 + nu hypr/scripts/nugu-theme.nu light453 + gsettings get org.gnome.desktop.interface color-scheme454 + nu hypr/scripts/nugu-theme.nu dark455 + gsettings get org.gnome.desktop.interface color-scheme465 + - [ ] Ask user for visual confirmation:468 + nu ~/.config/hypr/scripts/nugu-theme.nu light469 + nu ~/.config/hypr/scripts/nugu-theme.nu dark472 + 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+279 / −0 text lines
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.7 + Tracked source of truth:12 + - `nugu/*.nu` app generators14 + 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/*`34 + Invalid/missing mode fallback:36 + - Missing mode → `dark`.37 + - Invalid mode content → `dark`; overwrite with valid mode on next switch/prepare.56 + ${XDG_STATE_HOME:-$HOME/.local/state}/nugu63 + single-line active mode: dark|light66 + generated mako color/style fragment only69 + generated complete Ironbar runtime CSS:70 + @import tracked base style.css + generated CSS custom properties72 + themes/hyprtoolkit.conf73 + generated hyprtoolkit color fragment only76 + No behavior/layout/binds/timeouts/modules belong in state theme files.83 + ~/.config/hypr/scripts/nugu-theme.nu89 + nu ~/.config/hypr/scripts/nugu-theme.nu dark90 + nu ~/.config/hypr/scripts/nugu-theme.nu light91 + nu ~/.config/hypr/scripts/nugu-theme.nu toggle92 + nu ~/.config/hypr/scripts/nugu-theme.nu current93 + nu ~/.config/hypr/scripts/nugu-theme.nu status98 + - `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:107 + nu ~/.config/hypr/scripts/nugu-theme.nu prepare dark108 + nu ~/.config/hypr/scripts/nugu-theme.nu prepare light109 + nu ~/.config/hypr/scripts/nugu-theme.nu prepare current112 + `prepare` writes state files but does not call external reload hooks. It is useful for service startup and tests.116 + ### GTK / Qt / portal preference 121 + gsettings set org.gnome.desktop.interface color-scheme prefer-dark127 + gsettings set org.gnome.desktop.interface color-scheme prefer-light135 + hyprctl reload config-only138 + Hyprland colors come from `hypr/generated/nugu.lua`, which must read:141 + ${XDG_STATE_HOME:-$HOME/.local/state}/nugu/mode152 + Tracked config includes:155 + include=~/.local/state/nugu/themes/mako.conf164 + No restart unless reload is unavailable or fails for a running daemon.177 + ~/.local/state/nugu/themes/ironbar.css180 + Service starts Ironbar with:183 + ironbar --theme %h/.local/state/nugu/themes/ironbar.css186 + 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`.195 + hypr/hyprtoolkit.conf198 + Tracked main config owns fallback colors + static appearance variables and ends with:201 + source = ~/.local/state/nugu/themes/hyprtoolkit.conf204 + 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.215 + Already matches contract via:218 + theme = light:nugu-light,dark:nugu-dark221 + Switch command only needs to set GTK/portal color-scheme.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.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.243 + The switch command must pass:246 + before= $(git status --short --ignore-submodules = dirty) 247 + nu hypr/scripts/nugu-theme.nu light248 + nu hypr/scripts/nugu-theme.nu dark249 + after= $(git status --short --ignore-submodules = dirty) 250 + test "$before" = "$after" 253 + ## Validation contract 255 + Generator validation:258 + just --justfile nugu/justfile --working-directory nugu check259 + just --justfile nugu/justfile --working-directory nugu hypr265 + nu hypr/scripts/nugu-theme.nu status266 + nu hypr/scripts/nugu-theme.nu light267 + gsettings get org.gnome.desktop.interface color-scheme268 + nu hypr/scripts/nugu-theme.nu dark269 + gsettings get org.gnome.desktop.interface color-scheme272 + Expected GSettings output:279 + Human visual confirmation remains required for final goal completion.enable_user_services.nu Modified +0 / −1 text lines
13 13 [cliphist cliphist cliphist.service] [cliphist cliphist cliphist.service]14 14 [wl-clip-persist wl-clip-persist wl-clip-persist.service] [wl-clip-persist wl-clip-persist wl-clip-persist.service]15 15 [wezterm-mux-server wezterm-mux-server wezterm-mux-server.service] [wezterm-mux-server wezterm-mux-server wezterm-mux-server.service]16 - [nugu-theme lua nugu-theme.service]
17 16 [ironbar ironbar ironbar.service] [ironbar ironbar ironbar.service]18 17 [ironbar-workspaces python ironbar-workspaces.service] [ironbar-workspaces python ironbar-workspaces.service]+1 / −4 text lines
2 2 a = add --all a = add --all 4 3 ci = commit --all ci = commit --all 5 4 co = checkout co = checkout 6 5 bare = clone --bare bare = clone --bare 9 8 ra = rebase --abort ra = rebase --abort10 9 rc = rebase --continue rc = rebase --continue11 10 st = status --short st = status --short13 11 unstage = reset HEAD -- unstage = reset HEAD --14 12 last = log -1 HEAD last = log -1 HEAD15 13 ui = !gitu ui = !gitu19 17 attributesfile = .gitattributes attributesfile = .gitattributes 20 18 autocrlf = false autocrlf = false 21 20 compression = 9 compression = 9 22 21 editor = nvim editor = nvim 23 22 fscache = true fscache = true 24 23 fsmonitor = true fsmonitor = true 25 24 preloadindex = true preloadindex = true 26 25 quotepath = false quotepath = false 28 26 symlinks = true symlinks = true 29 27 untrackedcache = true untrackedcache = true 30 28 pager = delta pager = delta 191 189 [worktree ][worktree ]192 190 guessRemote = true guessRemote = true 193 - useRelativePaths = true
+1 / −0 text lines
1 1 .superpowers/.superpowers/new file mode 100644+10 / −0 text lines
2 + "$schema" : "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json" ,4 + "library" : ["/usr/share/hypr/stubs" ],5 + "runtime.version" : "LuaJIT" +0 / −25 text lines
1 - # AGENTS — Nugu theming 3 - Scope: `hypr/` desktop theming.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`.17 - - Never rewrite `hyprtoolkit.conf` while Hyprtoolkit apps run.18 - - Bug: https://github.com/hyprwm/hyprtoolkit/issues/9219 - - Static session config only until fixed.
21 1 Nugu semantics:Nugu semantics:22 2 - `content.*` = app/content/terminal text surfaces.- `content.*` = app/content/terminal text surfaces.23 3 - `ui.*` = chrome/widgets/borders/status bars.- `ui.*` = chrome/widgets/borders/status bars.36 16 - Use IBM Plex family exclusively in Hypr desktop configs.- Use IBM Plex family exclusively in Hypr desktop configs.37 17 - UI sans: `IBM Plex Sans`; mono/status: `IBM Plex Mono`.- UI sans: `IBM Plex Sans`; mono/status: `IBM Plex Mono`.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 +0 / −4 text lines
4 1 require ("modules.env" )require ("modules.env" )5 - require ("modules.permissions" )
6 2 require ("modules.monitors" )require ("modules.monitors" )7 3 require ("modules.input" )require ("modules.input" )8 4 require ("modules.appearance" )require ("modules.appearance" )hypr/hyprpaper.conf Deleted deleted file mode 100644+0 / −7 text lines
3 - path = ~ /.config/hypr/wallpapers/nugu-dark.png
hypr/hyprtoolkit.conf Modified +0 / −2 text lines
5 3 background = 0xFF121212background = 0xFF1212126 4 base = 0xFF242424base = 0xFF242424deleted file mode 100644+0 / −23 text lines
1 - local tui = require ("scripts.tui_tab" )4 - terminal = "wezterm connect unix" ,5 - terminal_class = "wezterm start --always-new-process --class" ,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 ,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" ,
hypr/modules/appearance.lua Modified +71 / −58 text lines
1 1 local nugu = require ("generated.nugu" )local nugu = require ("generated.nugu" )2 - local t = nugu.current()
3 2 local rgba = nugu.rgbalocal rgba = nugu.rgba11 - active_border = { colors = { rgba(t.content.accent, "ee" ), rgba(t.content.important_local, "ee" ) }, angle = 42 },12 - inactive_border = rgba(t.ui.unfocus, "88" ),7 + local t = mode and assert (nugu.get(mode), "unknown mode: " .. tostring (mode)) or nugu.current()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" ),18 + resize_on_border = true ,19 + allow_tearing = false ,14 - resize_on_border = true ,15 - allow_tearing = false ,
22 - active_opacity = 1.0 ,23 - inactive_opacity = 0.96 ,28 - color = rgba(t.content.backdrop, "cc" ),26 + active_opacity = 1.0 ,27 + inactive_opacity = 0.96 ,32 + color = rgba(t.content.backdrop, "cc" ),44 + preserve_split = true ,40 - preserve_split = true ,45 - new_status = "master" ,50 - border_active = rgba(t.content.accent, "ee" ),51 - border_inactive = rgba(t.ui.unfocus, "88" ),49 + new_status = "master" ,56 - force_default_wallpaper = 0 ,57 - disable_hyprland_logo = true ,58 - disable_splash_rendering = true ,53 + fullscreen_on_one_column = true ,63 - no_update_news = true ,64 - no_donation_nag = true ,58 + border_active = rgba(t.content.accent, "ee" ),59 + border_inactive = rgba(t.ui.unfocus, "88" ),64 + force_default_wallpaper = 0 ,65 + disable_hyprland_logo = true ,66 + disable_splash_rendering = true ,71 + no_update_news = true ,72 + no_donation_nag = true ,hypr/modules/apps.lua Added new file mode 100644+36 / −0 text lines
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 .. " -- " .. name21 + browser = app .. "firefox" ,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+28 / −0 text lines
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 .. " -- " .. name13 + browser = app .. "firefox",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 +52 / −55 text lines
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" )local workspaces = require ("modules.workspaces" )3 5 local mod = "SUPER" 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 )9 + opts.description = opts.description or description11 + return hl.bind(key, commands.to_dispatcher(action), opts)10 14 bind(mod .. " + Return" , apps.terminal, "terminal: wezterm" )bind(mod .. " + Return" , apps.terminal, "terminal: wezterm" )11 15 bind(mod .. " + Space" , apps.launcher, "launcher: hyprlauncher" )bind(mod .. " + Space" , apps.launcher, "launcher: hyprlauncher" )12 16 bind(mod .. " + B" , apps.browser, "browser: firefox" )bind(mod .. " + B" , apps.browser, "browser: firefox" )14 17 bind(mod .. " + E" , apps.file_manager, "files: yazi" )bind(mod .. " + E" , apps.file_manager, "files: yazi" )15 18 bind(mod .. " + N" , apps.wifi, "wifi: impala" )bind(mod .. " + N" , apps.wifi, "wifi: impala" )16 19 bind(mod .. " + U" , apps.bluetooth, "bluetooth: bluetui" )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" )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" )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 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+28 / −0 text lines
1 + local apps = require ("modules.apps" )5 + function M.to_dispatcher (action)6 + if type (action) == "string" then 7 + return hl.dsp.exec_cmd(action)12 + function M.exec (command)13 + return hl.dispatch(hl.dsp.exec_cmd(command))17 + return M.exec(assert (apps[name], name))20 + function M.workspace (id)21 + return hl.dispatch(hl.dsp.focus({ workspace = id }))24 + function M.move_to_workspace (id)25 + return hl.dispatch(hl.dsp.window.move({ workspace = id }))hypr/modules/hypr_osd.lua Added new file mode 100644+114 / −0 text lines
1 + local nugu = require ("generated.nugu" )2 + local t = nugu.current()6 + local function squote (value)7 + return "'" .. tostring (value):gsub("'" , "'\"'\"'" ) .. "'" 10 + local function dquote (value)11 + return '"' .. tostring (value):gsub('\\' , '\\\\' ):gsub('"' , '\\"' ) .. '"' 14 + local function notify (icon, ms, color, message)15 + return table .concat ({19 + squote(nugu.rgb(color)),24 + local function notify_live (icon, ms, color, message)25 + return table .concat ({29 + squote(nugu.rgb(color)),34 + local function sh (command)35 + return "bash -lc " .. squote(command)38 + local function after (command, notice)39 + return sh(command .. " && " .. notice)42 + local function around (command, notice)43 + return sh(command .. "; " .. notice)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" ),57 + clear_all = sh("makoctl dismiss --all; hyprctl dismissnotify" ),61 + region = function (command)62 + return after(command, notify(ok, 1400 , t.ui.accent, "Region captured" ))64 + window = function (command)65 + return after(command, notify(ok, 1400 , t.ui.accent, "Window captured" ))67 + output = function (command)68 + return after(command, notify(ok, 1400 , t.ui.accent, "Output captured" ))70 + annotate = function (command)71 + return after(command, notify(ok, 1400 , t.ui.accent, "Screenshot annotated" ))73 + color = function (command)74 + return after(command, notify(ok, 1200 , t.ui.accent, "Color copied" ))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" )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" )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" )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" )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" )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" )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" )),hypr/modules/input.lua Modified +0 / −2 text lines
21 - hl.gesture({ fingers = 3 , direction = "horizontal" , action = "workspace" })
hypr/modules/monitors.lua Modified +7 / −1 text lines
8 8 icc = "/home/oli/.config/icc/thinkpad_x230.icc" , icc = "/home/oli/.config/icc/thinkpad_x230.icc" ,10 - hl.monitor({ output = "" , mode = "preferred" , position = "auto" , scale = 1 })hypr/modules/permissions.lua Deleted deleted file mode 100644+0 / −5 text lines
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 +1 / −3 text lines
10 10 hl.window_rule({ match = { class = "^(firefox|org.mozilla.firefox)$" }, workspace = "1" })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" })hl.window_rule({ match = { class = "^(wezterm|org.wezfurlong.wezterm)$" }, workspace = "3" })14 13 hl.window_rule({ match = { class = "^yazi$" }, workspace = "3" })hl.window_rule({ match = { class = "^yazi$" }, workspace = "3" })16 15 hl.window_rule({ match = { class = "^(mpv|com.github.celluloid_player.Celluloid)$" }, workspace = "5" })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 })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 })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" ) })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 })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 })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 })hl.window_rule({ match = { float = false , workspace = "f[1]s[false]" }, border_size = 0 , rounding = 0 })hypr/modules/workspaces.lua Modified +2 / −5 text lines
6 6 { key = "3" , id = "3" , name = "term" }, { key = "3" , id = "3" , name = "term" },7 7 { key = "4" , id = "4" , name = "chat" }, { key = "4" , id = "4" , name = "chat" },8 8 { key = "5" , id = "5" , name = "media" }, { key = "5" , id = "5" , name = "media" },9 - { key = "9" , id = "9" , name = "misc" },
12 11 for _, ws in ipairs (M.list) do for _, ws in ipairs (M.list) do 13 12 hl.workspace_rule({ workspace = ws.id, monitor = "LVDS-1" }) 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" } })hypr/scripts/common.lua Deleted deleted file mode 100644+0 / −37 text lines
4 - return (value or "" ):gsub("^%s+" , "" ):gsub("%s+$" , "" )7 - function M.shell_quote (value)8 - value = tostring (value)9 - return "'" .. value:gsub("'" , "'\\''" ) .. "'" 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 "" 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" )30 - local selected = M.trim(M.read_command("hyprlauncher --dmenu < " .. M.shell_quote(path)))33 - if selected == "" then return nil end
hypr/scripts/cycle_clients.lua Deleted deleted file mode 100644+0 / −73 text lines
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))16 - local function parse_active ()17 - return common.read_command("hyprctl activewindow" ):match("^Window%s+(%S+)%s+%-%>" )20 - local function parse_clients ()24 - for line in common.read_command("hyprctl clients" ):gmatch("[^\n]+" ) do 25 - local address, title = line:match("^Window%s+(%S+)%s+%-%>%s+(.+):$" )27 - current = { address = address, title = title, class = "" , workspace = 0 , mapped = true , hidden = false }28 - clients[# clients + 1 ] = current30 - local key, value = line:match("^%s*([%w_]+):%s*(.*)$" )31 - if key == "class" then 32 - current.class = value33 - 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" 44 - for _, client in ipairs (clients) do 45 - if client.mapped and not client.hidden then filtered[# filtered + 1 ] = client 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.address58 - 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()65 - for i, client in ipairs (clients) do 66 - if client.address == active then 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+0 / −77 text lines
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" },17 - local function has_bit (value, bit)18 - return value % (bit * 2 ) >= bit21 - local function mods (mask)23 - for _, mod in ipairs (modifier_bits) do 24 - if has_bit(mask, mod.bit) then out[# out + 1 ] = mod.name end 26 - if # out == 0 then return "None" end 27 - return table .concat (out, "+" )30 - local function format_key (key)31 - if key:match("^mouse:" ) then return key:gsub("^mouse:" , "MOUSE_" ) end 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)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 48 - elseif key == "dispatcher" then 49 - current.dispatcher = value50 - elseif key == "arg" then 52 - elseif key == "description" then 53 - current.description = value61 - 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 ] = label64 - by_label[label] = bind67 - 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))
hypr/scripts/show_clients.lua Deleted deleted file mode 100644+0 / −48 text lines
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" )13 - for line in common.read_command("hyprctl clients" ):gmatch("[^\n]+" ) do 14 - local address, title = line:match("^Window%s+(%S+)%s+%-%>%s+(.+):$" )16 - current = { address = address, title = title, class = "?" , workspace = "?" }17 - table .insert (clients, current)19 - local key, value = line:match("^%s*([%w_]+):%s*(.*)$" )20 - if key == "class" then 21 - current.class = value22 - elseif key == "workspace" then 23 - current.workspace = value:match("%((.-)%)" ) or value:match("^(%S+)" ) or "?" 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 ] = label34 - by_label[label] = client37 - 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.address44 - if not address:match("^0x" ) then address = "0x" .. address end 46 - local target = "address:" .. address47 - 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+0 / −212 text lines
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+$" , "" )14 - local function shell_quote (value)15 - value = tostring (value)16 - return "'" .. value:gsub("'" , "'\\''" ) .. "'" 19 - local function run (command)20 - os .execute (command .. " >/dev/null 2>&1" )23 - local function mkdir (path)24 - run("mkdir -p " .. shell_quote(path))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" )35 - local function write_file (path, content)36 - local file = assert (io .open (path, "w" ))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 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 59 - local function auto_enabled ()60 - local value = read_file(auto_file)61 - return value == nil or trim(value) ~= "0" 64 - local function set_auto (enabled)66 - write_file(auto_file, enabled and "1" or "0" )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))74 - local function write_mako (p)75 - local dir = config_home .. "/mako" 77 - write_file(dir .. "/nugu.conf" , string .format ([[# Generated by hypr/scripts/theme.lua from Nugu palette. 81 - progress-color=over %sff 87 - progress-color=over %sff 91 - progress-color=over %sff 97 - progress-color=over %sff 99 - [summary~="[Ee]rror|[Ff]ailed|[Ff]ailure|[Cc]rash"] 101 - progress-color=over %sff 103 - [summary~="[Ww]arn|[Ww]arning"] 105 - progress-color=over %sff 107 - [summary~="[Ii]nfo|[Nn]otice"] 109 - progress-color=over %sff 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,116 - p.warning, p.warning,120 - local function write_ironbar (p)121 - local dir = config_home .. "/ironbar" 123 - write_file(dir .. "/nugu.css" , string .format ([[/* Generated by hypr/scripts/theme.lua from Nugu palette. */ 126 - --bg-transparent: %see; 157 - local function apply_mode (mode)159 - write_file(mode_file, mode)161 - local p = assert (nugu.get(mode), "unknown mode: " .. tostring (mode))162 - write_desktop_color_scheme(mode)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" )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" ))177 - local function next_mode ()178 - return active_mode() == "dark" and "light" or "dark" 181 - local function watch ()183 - if auto_enabled() then 184 - local target = auto_mode()185 - if target ~= active_mode() then apply_mode(target) end 187 - os .execute ("sleep 300" )191 - local mode = arg[1 ] or "toggle" 193 - if mode == "dark" or mode == "light" or mode == "toggle" then 195 - elseif mode == "auto" then 199 - if mode == "dark" or mode == "light" then 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 210 - io .stderr :write("mode must be dark|light|toggle|auto|current|watch\n" )
hypr/scripts/tui_tab.lua Deleted deleted file mode 100644+0 / −36 text lines
3 - local function shell_quote (value)4 - value = tostring (value)5 - return "'" .. value:gsub("'" , "'\\''" ) .. "'" 8 - local function trim (value)9 - return (value or "" ):gsub("^%s+" , "" ):gsub("%s+$" , "" )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" )24 - if # args == 0 then return end 26 - for i, arg in ipairs (args) do 27 - args[i] = shell_quote(arg)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))
hypr/systemd/ironbar.service Modified +1 / −3 text lines
2 2 Description=Ironbar Wayland status barDescription=Ironbar Wayland status bar3 3 PartOf=graphical-session.targetPartOf=graphical-session.target4 - After=graphical-session.target nugu-theme.service 5 - Wants=nugu-theme.service4 + After=graphical-session.target8 - Environment=GSK_RENDERER=cairo
9 7 ExecStart=/usr/bin/ironbarExecStart=/usr/bin/ironbar10 8 Restart=on-failureRestart=on-failure11 9 RestartSec=2RestartSec=2hypr/systemd/mako.service Modified +0 / −3 text lines
4 4 After=graphical-session.targetAfter=graphical-session.target7 - Environment=NUGU_NO_RESTART_MAKO=18 - Environment=NUGU_NO_NOTIFY=19 - ExecStartPre=/usr/bin/lua %h/.config/hypr/scripts/theme.lua current
10 7 ExecStart=/usr/bin/mako --config %h/.config/mako/configExecStart=/usr/bin/mako --config %h/.config/mako/config11 8 Restart=on-failureRestart=on-failure12 9 RestartSec=2RestartSec=2hypr/systemd/nugu-theme.service Deleted deleted file mode 100644+0 / −13 text lines
2 - Description=Nugu automatic light/dark desktop mode3 - PartOf=graphical-session.target4 - After=graphical-session.target hyprpaper.service5 - Wants=hyprpaper.service8 - ExecStart=/usr/bin/lua %h/.config/hypr/scripts/theme.lua watch13 - WantedBy=graphical-session.target
hypr/tests/commands_test.lua Added new file mode 100644+61 / −0 text lines
1 + package .path = "./?.lua;./?/init.lua;" .. package .path 7 + exec_cmd = function (command)8 + table .insert (calls, { "exec_cmd" , command })9 + return { kind = "exec" , command = command }11 + focus = function (opts)12 + table .insert (calls, { "focus" , opts.workspace })13 + return { kind = "focus" , workspace = opts.workspace }16 + move = function (opts)17 + table .insert (calls, { "move" , opts.workspace })18 + return { kind = "move" , workspace = opts.workspace }22 + dispatch = function (dispatcher)23 + table .insert (calls, { "dispatch" , dispatcher.kind, dispatcher.command or dispatcher.workspace })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" )59 + assert (tostring (err):find("missing" , 1 , true ))hypr/tests/hypr_osd_test.lua Added new file mode 100644+17 / −0 text lines
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)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" )hypr/wallpapers/nugu-dark.png Deleted deleted file mode 100644Binary size (old → new): 9858 → 0 bytes.
hypr/wallpapers/nugu-light.png Deleted deleted file mode 100644Binary size (old → new): 131656 → 0 bytes.
+4 / −4 text lines
105 105 - Prefer mux-backed WezTerm tabs for TUI apps over standalone terminal windows.- 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.- 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.- 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/`.- 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.- 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.- Ironbar builtin `bluetooth` module used only for bar status.227 227 - Builtin Bluetooth popup disabled; GTK switch popup looked bad even after CSS work.- 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:- 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:- Bar label uses fixed semantic Bluetooth battery icon, not dynamic percentage icon:231 231 - ` {device_battery_percent}%` - ` {device_battery_percent}%`232 232 - `icon_theme` switched from missing `Papirus` to installed `Adwaita`; broken device image fixed.- `icon_theme` switched from missing `Papirus` to installed `Adwaita`; broken device image fixed.ironbar/config.json Modified +28 / −19 text lines
4 4 "height" : 30 , "height" : 30 ,5 5 "popup_autohide" : true , "popup_autohide" : true ,6 6 "popup_gap" : 4 , "popup_gap" : 4 ,7 15 "start" : [ "start" : [9 17 "type" : "custom" , "type" : "custom" ,17 25 "type" : "button" , "type" : "button" ,18 26 "class" : "workspace-item" , "class" : "workspace-item" ,19 27 "label" : "#ws1" , "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" , "type" : "button" ,24 32 "class" : "workspace-item" , "class" : "workspace-item" ,25 33 "label" : "#ws2" , "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" , "type" : "button" ,30 38 "class" : "workspace-item" , "class" : "workspace-item" ,31 39 "label" : "#ws3" , "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" , "type" : "button" ,36 44 "class" : "workspace-item" , "class" : "workspace-item" ,37 45 "label" : "#ws4" , "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" , "type" : "button" ,42 50 "class" : "workspace-item" , "class" : "workspace-item" ,43 51 "label" : "#ws5" , "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" , "type" : "button" ,48 56 "class" : "workspace-item" , "class" : "workspace-item" ,49 57 "label" : "#ws9" , "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" , "cmd" : "~/.config/ironbar/scripts/wifi-status.sh" ,103 111 "mode" : "poll" , "mode" : "poll" ,104 112 "interval" : 30000 , "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" "tooltip" : "WiFi: left/middle opens impala" 116 124 "connected_battery" : " {device_battery_percent}%" "connected_battery" : " {device_battery_percent}%" 118 126 "disable_popup" : true , "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" "tooltip" : "Bluetooth: left/middle opens bluetui" 130 138 "interval" : { "interval" : {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" "tooltip" : "System monitor: left/middle opens btm" 139 147 "on_scroll_up" : "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+" , "on_scroll_up" : "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+" ,140 148 "on_scroll_down" : "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-" , "on_scroll_down" : "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-" ,141 149 "on_click_right" : "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" , "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 , "smooth_scroll_speed" : 1.0 ,144 152 "show_sources" : false , "show_sources" : false ,145 153 "tooltip" : "Volume: scroll adjusts, right mutes, middle opens wiremix" "tooltip" : "Volume: scroll adjusts, right mutes, middle opens wiremix" 148 156 "type" : "brightness" , "type" : "brightness" ,149 - "format" : "{percentage}%" ,150 - "icon_label" : "display-brightness-symbolic" ,157 + "format" : " {percentage}%" ,151 158 "mode" : { "mode" : {152 159 "type" : "systemd" , "type" : "systemd" ,153 160 "subsystem" : "backlight" , "subsystem" : "backlight" ,160 167 "type" : "battery" , "type" : "battery" ,161 - "format" : "{percentage}%" ,168 + "format" : " {percentage}%" ,163 170 "show_if" : "ls /sys/class/power_supply/ | grep -q '^BAT'" , "show_if" : "ls /sys/class/power_supply/ | grep -q '^BAT'" ,164 171 "profiles" : { "profiles" : {165 172 "warning" : { "warning" : {173 180 "format" : " {percentage}%" "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" , "type" : "inhibit" ,180 189 "durations" : ["00:30:00" , "01:00:00" , "02:00:00" , "inf" ], "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}" , "format_on" : " {duration}" ,183 192 "format_off" : " {duration}" , "format_off" : " {duration}" ,184 193 "tooltip" : "Inhibit: left toggles, right cycles duration" "tooltip" : "Inhibit: left toggles, right cycles duration" +2 / −1 text lines
3 3 --bg : #242424 ; --bg : #242424 ;4 4 --bg-transparent : #242424ee ; --bg-transparent : #242424ee ;6 6 --fg: #dbdbdb; --fg: #dbdbdb;7 7 --accent: #d86dd8; --accent: #d86dd8;8 8 --focus: #9aabae; --focus: #9aabae;
9 + --important-global : #f3effb;9 10 --on-focus : #121212; --on-focus : #121212;10 11 --muted: #9d9d9d; --muted: #9d9d9d;11 12 --unfocus: #6f6f6f; --unfocus: #6f6f6f;ironbar/scripts/workspaces-watch.py Modified +7 / −9 text lines
88 88 def markup (ws_id: str , icon: str , active: str , occupied: set [str ], colors: dict [str , str ]) -> str :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: if ws_id == active:90 - return '<span foreground="{}" background="{}" font_weight="bold"> {} </span>' .format(91 + return '<span foreground="{}">{}</span>' .format(colors["important-global" ], label)95 92 if ws_id in occupied: 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 ]]:def hypr_state () -> tuple [str , set [str ]]:106 103 def set_var (name: str , value: str ) -> None :def set_var (name: str , value: str ) -> None :107 104 if last_vars.get(name) == value: if last_vars.get(name) == value:109 - subprocess.run(("ironbar" , "var" , "set" , name, value), stdout= subprocess.DEVNULL, stderr= subprocess.DEVNULL, check= False )110 - last_vars[name] = value106 + 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] = value113 111 def update () -> None :def update () -> None :ironbar/style.css Modified +213 / −92 text lines
9 9 font-family : 'IBM Plex Mono' ; font-family : 'IBM Plex Mono' ;10 10 font-size : var (--font-size ); font-size : var (--font-size );
11 + font-feature-settings : "tnum" ;11 12 border : none ; border : none ;12 13 box-shadow : none ; box-shadow : none ;13 14 background-image : none ; background-image : none ;61 62 .nugu-workspaces .workspace-item {.nugu-workspaces .workspace-item {62 63 min-height : 0 ; min-height : 0 ;63 65 margin : 0 2 px ; margin : 0 2 px ;65 67 color : var (--muted ); color : var (--muted );68 - .nugu-workspaces .workspace-item:hover {69 - background : var (--accent );70 - color : var (--on-focus );
73 70 .bindmode {.bindmode {74 71 margin-left : 8 px ; margin-left : 8 px ;75 72 padding : 1 px 7 px ; padding : 1 px 7 px ;94 + color : var (--accent );95 97 .popup-volume {.popup-volume {122 124 color: var (--on-focus ); color: var (--on-focus );125 - .popup-volume .btn-mute {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,popover listview,136 128 popover list,popover list,137 129 popover row,popover row,267 259 .brightness {.brightness {269 262 color : var (--fg ); color : var (--fg );272 265 .battery {.battery {274 268 color : var (--fg ); color : var (--fg );296 290 .inhibit {.inhibit {297 - margin : 0 7 px 0 12 px ;292 + margin : 0 3 px 0 6 px ;298 293 color : var (--muted ); color : var (--muted );393 388 .popup-clipboard {.popup-clipboard {394 389 padding : 8 px ; padding : 8 px ;
390 + background-color : var (--bg-transparent );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 * {397 404 .popup-clipboard .item {.popup-clipboard .item {398 405 padding : 4 px 8 px ; padding : 4 px 8 px ;399 406 border-radius : var (--radius ); border-radius : var (--radius );407 + background : transparent ;403 - .popup-clipboard .item label {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 ); background-color : var (--accent );409 419 color : var (--on-focus ); 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 ); color : var (--on-focus );416 441 .mako-status {.mako-status {417 - margin : 0 7 px 0 12 px ;443 + margin : 0 3 px 0 6 px ;418 444 color : var (--fg ); color : var (--fg );423 449 color : var (--fg ); color : var (--fg );426 452 .bluetooth {.bluetooth {457 + .bluetooth.connected {430 461 .bluetooth.disabled,.bluetooth.disabled,444 - margin : 0 7 px 0 12 px ;475 + margin : 0 3 px 0 6 px ;447 478 .tray popover contents {.tray popover contents {457 488 color: var (--muted); 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,.power-menu button :checked,467 492 .power-menu button :focus,.power-menu button :focus,468 493 .power-menu #power-btn:checked,.power-menu #power-btn:checked,471 496 color: var (--muted); 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 {.popup-power-menu {475 510 padding : 12 px ; padding : 12 px ;476 511 background-color : var (--bg-transparent ); background-color : var (--bg-transparent );522 557 .sysinfo {.sysinfo {523 - margin : 0 7 px 0 16 px ;559 + margin : 0 3 px 0 8 px ;526 562 .sysinfo > .item + .item {.sysinfo > .item + .item {527 563 margin-left : 8 px ; margin-left : 8 px ;542 - background : var (--accent );543 - color : var (--on-focus );544 - border-radius : var (--radius );548 - .clipboard:hover label ,549 - .mako-status:hover label ,551 - .bluetooth:hover label ,553 - .sysinfo:hover label ,555 - .brightness:hover label ,556 - .battery:hover label ,557 - .inhibit:hover label ,559 - color : var (--on-focus );
562 566 .music:checked,.music:checked,563 567 .music:focus,.music:focus,564 568 .clipboard:checked,.clipboard:checked,575 579 .sysinfo:focus,.sysinfo:focus,576 580 .volume:checked,.volume:checked,577 581 .volume:focus,.volume:focus,578 - .volume button :checked,579 - .volume button :focus,
580 582 .brightness:checked,.brightness:checked,581 583 .brightness:focus,.brightness:focus,582 584 .battery:checked,.battery:checked,587 589 color: var (--fg); color: var (--fg);590 - .music:checked label ,592 - .clipboard:checked label ,593 - .clipboard:focus label ,594 - .mako-status:checked label ,595 - .mako-status:focus label ,598 - .bluetooth:checked label ,599 - .bluetooth:focus label ,602 - .sysinfo:checked label ,603 - .sysinfo:focus label ,604 - .volume:checked label ,606 - .brightness:checked label ,607 - .brightness:focus label ,608 - .battery:checked label ,609 - .battery:focus label ,610 - .clock:checked label ,594 + .clipboard:checked * ,596 + .mako-status:checked * ,597 + .mako-status:focus * ,600 + .bluetooth:checked * ,608 + .brightness:checked * ,612 614 color : var (--fg ); color : var (--fg );
619 + .music:checked:hover,621 + .clipboard:focus:hover,622 + .clipboard:checked:hover,624 + .mako-status:focus:hover,625 + .mako-status:checked:hover,630 + .bluetooth:focus:hover,631 + .bluetooth:checked:hover,636 + .sysinfo:focus:hover,637 + .sysinfo:checked:hover,640 + .volume:checked:hover,642 + .brightness:focus:hover,643 + .brightness:checked:hover,645 + .battery:focus:hover,646 + .battery:checked:hover,648 + .inhibit:focus:hover,649 + .inhibit:checked:hover,652 + .clock:checked:hover {653 + background : var (--accent );654 + color : var (--on-focus );655 + border-radius : var (--radius );659 + .music:focus:hover * ,660 + .music:checked:hover * ,662 + .clipboard:focus:hover * ,663 + .clipboard:checked:hover * ,664 + .mako-status:hover * ,665 + .mako-status:focus:hover * ,666 + .mako-status:checked:hover * ,669 + .wifi:checked:hover * ,671 + .bluetooth:focus:hover * ,672 + .bluetooth:checked:hover * ,675 + .tray:checked:hover * ,677 + .sysinfo:focus:hover * ,678 + .sysinfo:checked:hover * ,680 + .volume:focus:hover * ,681 + .volume:checked:hover * ,683 + .brightness:focus:hover * ,684 + .brightness:checked:hover * ,686 + .battery:focus:hover * ,687 + .battery:checked:hover * ,689 + .inhibit:focus:hover * ,690 + .inhibit:checked: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 ;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 );616 737 padding : 8 px ; padding : 8 px ;+1 / −1 text lines
2 2 background-color=background-color=4 4 border-color=border-color=+1 / −0 text lines
16 16 --fg: ($p.ui.normal ); --fg: ($p.ui.normal );17 17 --accent: ($p.ui.accent ); --accent: ($p.ui.accent );18 18 --focus: ($p.ui.focus ); --focus: ($p.ui.focus );
19 + --important-global: ($p.ui.important_global );19 20 --on-focus: ($on_focus ); --on-focus: ($on_focus );20 21 --muted: ($p.ui.minor ); --muted: ($p.ui.minor );21 22 --unfocus: ($p.ui.unfocus ); --unfocus: ($p.ui.unfocus );nushell/modules/git.nu Modified +15 / −13 text lines
463 463 public-migration $migration public-migration $migration 467 - export def --env co [468 - source : string = "." 467 + export def --env "wt clone" [469 469 name?: string name?: string 470 - --branch (-b): string = "" 471 - --dir (-d): path = "." 470 + --branch (-b): string = "" 471 + --dir (-d): path = "." 473 + co-fresh $source $name $branch $dir 477 + export def --env "wt migrate" [479 + --branch (-b): string = "" 473 481 --dirty: string = $DIRTY_REFUSE --dirty: string = $DIRTY_REFUSE 476 - co-current $name $branch $plan $dirty 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 483 + co-current $name $branch $plan $dirty Link change (old → new): 75a8dfd28c23d1551f8181c3bd286dfebd75b734 → e3489ee81f19f0b72c761e50df075ad948a24e71.
pi/agent/settings.json Modified +4 / −9 text lines
8 8 "theme" : "terminal" , "theme" : "terminal" ,9 9 "enabledModels" : [ "enabledModels" : [10 - "openai-codex/gpt-5.5" ,11 - "kimi-coding/kimi-for-coding" ,14 - "minimax/MiniMax-M2.7-highspeed" ,
15 10 "minimax/MiniMax-M3" , "minimax/MiniMax-M3" ,16 - "minimax/MiniMax-M2.5-highspeed" 11 + "openai-codex/gpt-5.5" 18 - "defaultProvider" : "minimax" ,19 - "defaultModel" : "MiniMax-M3" ,13 + "defaultProvider" : "openai-codex" ,14 + "defaultModel" : "gpt-5.5" ,20 15 "defaultThinkingLevel" : "high" , "defaultThinkingLevel" : "high" ,21 16 "quietStartup" : true , "quietStartup" : true ,22 17 "collapseChangelog" : true , "collapseChangelog" : true ,systemd/user/app-graphical.slice.d/10-x230-resources.conf Added new file mode 100644+5 / −0 text lines
systemd/user/background-graphical.slice.d/10-x230-resources.conf Added new file mode 100644+5 / −0 text lines
systemd/user/session-graphical.slice.d/10-x230-resources.conf Added new file mode 100644+4 / −0 text lines
systemd/user/work.slice Modified +13 / −4 text lines
2 + Description=Interactive development work slice3 + PartOf=graphical-session.target4 + After=graphical-session.target5 + Conflicts=wayland-session-shutdown.target6 + Before=wayland-session-shutdown.targetwezterm/bugabinga/exec_domains.lua Deleted deleted file mode 100644+0 / −49 text lines
1 - local wez = require 'wezterm' 3 - local function append_all (dst, src)4 - for _, value in ipairs (src) do 5 - table .insert (dst, value)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 = name14 - cmd.set_environment_variables = env15 - local unit = 'wezterm-' .. name:gsub('[^%w_.-]' , '-' ) .. '-' .. tostring (env.WEZTERM_PANE or os .time ())24 - '--description=WezTerm ' .. name,27 - for _, property in ipairs (properties) do 28 - table .insert (wrapped, '-p' )29 - table .insert (wrapped, property)32 - append_all(wrapped, args)39 - if not wez.target_triple:find( 'linux' , 1 , true ) then return end 42 - scoped_domain('scope:build' , 'scope:build CPU 25% MEM max 256M' , {
wezterm/bugabinga/key_binds.lua Modified +0 / −5 text lines
158 158 cwd = wez.home_dir, cwd = wez.home_dir,164 - action = wez.action.SpawnCommandInNewTab { domain = { DomainName = 'scope:build' , }, },
167 162 key = 'B' , key = 'B' ,168 163 mods = 'LEADER|SHIFT' , mods = 'LEADER|SHIFT' ,wezterm/bugabinga/mux.lua Modified +0 / −2 text lines
9 9 no_serve_automatically = true , no_serve_automatically = true ,13 - cfg.default_gui_startup_args = { 'connect' , 'unix' }
wezterm/wezterm.lua Modified +0 / −1 text lines
11 11 require 'bugabinga.status' ( cfg )require 'bugabinga.status' ( cfg )12 12 require 'bugabinga.launch' ( cfg )require 'bugabinga.launch' ( cfg )13 13 require 'bugabinga.wsl' ( cfg )require 'bugabinga.wsl' ( cfg )14 - require 'bugabinga.exec_domains' ( cfg )
+15 / −3 text lines
31 31 git/gitconfig.bugabingagit/gitconfig.bugabinga32 32 ~/.config/git/.gitconfig.include~/.config/git/.gitconfig.include35 38 ~/.config/gh~/.config/gh100 103 hypr/systemd/wl-clip-persist.servicehypr/systemd/wl-clip-persist.service101 104 ~/.config/systemd/user/wl-clip-persist.service~/.config/systemd/user/wl-clip-persist.service103 - hypr/systemd/nugu-theme.service104 - ~/.config/systemd/user/nugu-theme.service
106 106 hypr/systemd/ironbar.servicehypr/systemd/ironbar.service107 107 ~/.config/systemd/user/ironbar.service~/.config/systemd/user/ironbar.service109 109 hypr/systemd/ironbar-workspaces.servicehypr/systemd/ironbar-workspaces.service110 110 ~/.config/systemd/user/ironbar-workspaces.service~/.config/systemd/user/ironbar-workspaces.service
112 + systemd/user/session-graphical.slice.d/10-x230-resources.conf113 + ~/.config/systemd/user/session-graphical.slice.d/10-x230-resources.conf115 + systemd/user/app-graphical.slice.d/10-x230-resources.conf116 + ~/.config/systemd/user/app-graphical.slice.d/10-x230-resources.conf118 + systemd/user/background-graphical.slice.d/10-x230-resources.conf119 + ~/.config/systemd/user/background-graphical.slice.d/10-x230-resources.conf121 + systemd/user/work.slice122 + ~/.config/systemd/user/work.slice112 124 wezterm/systemd/wezterm-mux-server.servicewezterm/systemd/wezterm-mux-server.service113 125 ~/.config/systemd/user/wezterm-mux-server.service~/.config/systemd/user/wezterm-mux-server.serviceyazi/package.toml Modified +9 / −9 text lines
1 1 [[plugin .deps ]][[plugin .deps ]]2 2 use = "yazi-rs/plugins:full-border" use = "yazi-rs/plugins:full-border" 4 4 hash = "7b625412411be411153886894d9acaf" hash = "7b625412411be411153886894d9acaf" 6 6 [[plugin .deps ]][[plugin .deps ]]7 7 use = "yazi-rs/plugins:toggle-pane" use = "yazi-rs/plugins:toggle-pane" 9 9 hash = "9c7987da2d2a2120dac33abb64132004" hash = "9c7987da2d2a2120dac33abb64132004" 11 11 [[plugin .deps ]][[plugin .deps ]]12 12 use = "yazi-rs/plugins:smart-enter" use = "yazi-rs/plugins:smart-enter" 14 14 hash = "187cc58ba7ac3befd49c342129e6f1b6" hash = "187cc58ba7ac3befd49c342129e6f1b6" 16 16 [[plugin .deps ]][[plugin .deps ]]17 17 use = "yazi-rs/plugins:smart-filter" use = "yazi-rs/plugins:smart-filter" 19 19 hash = "c887903a63a2ff520081b6d90a4b3392" hash = "c887903a63a2ff520081b6d90a4b3392" 21 21 [[plugin .deps ]][[plugin .deps ]]22 22 use = "yazi-rs/plugins:smart-paste" use = "yazi-rs/plugins:smart-paste" 24 24 hash = "3f8d49413bc8691b4c652eb417a20178" hash = "3f8d49413bc8691b4c652eb417a20178" 26 26 [[plugin .deps ]][[plugin .deps ]]27 27 use = "yazi-rs/plugins:git" use = "yazi-rs/plugins:git" 29 29 hash = "88e56a64b7ce7c4314427452343fef17" hash = "88e56a64b7ce7c4314427452343fef17" 31 31 [[plugin .deps ]][[plugin .deps ]]32 32 use = "yazi-rs/plugins:chmod" use = "yazi-rs/plugins:chmod" 34 34 hash = "f0c8c378184d5f8abd1b095a443d336d" hash = "f0c8c378184d5f8abd1b095a443d336d" 36 36 [[plugin .deps ]][[plugin .deps ]]37 37 use = "yazi-rs/plugins:diff" use = "yazi-rs/plugins:diff" 39 39 hash = "8b1af6b5a69797ee951f2a80ce570818" hash = "8b1af6b5a69797ee951f2a80ce570818" 41 41 [[plugin .deps ]][[plugin .deps ]]42 42 use = "yazi-rs/plugins:piper" use = "yazi-rs/plugins:piper" 44 44 hash = "d99cfbc3812e7738505f9e4bedb759cd" hash = "d99cfbc3812e7738505f9e4bedb759cd" 46 46 [[plugin .deps ]][[plugin .deps ]]