From 717ad1d3a9b2e487d216725a0b809424fc72bbc4 Mon Sep 17 00:00:00 2001 From: Nic O'Connor Date: Sun, 1 Nov 2026 09:08:09 -0500 Subject: [PATCH] base: Super+Ctrl+T toggles one persistent btop Omarchy's Activity binding launches a fresh btop each time, so its graph history is gone on every open. base now starts a single btop at login on special:activity and binds Super+Ctrl+T to show/hide it; if btop is quit, the next toggle re-seeds it. Ships as hypr/layers/10-base.lua so every profile, including the Coder desktops, gets it. Co-Authored-By: Claude Opus 5.5 --- README.md | 4 ++-- profiles/base/config/hypr/layers/10-base.lua | 22 ++++++++++++++++++++ profiles/base/profile | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 profiles/base/config/hypr/layers/10-base.lua diff --git a/README.md b/README.md index 28f523c..28be1e7 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ and shared layers beneath it. `./install.sh --show` prints the result. | Layer | Used by | What | |---|---|---| -| `base` | all | `hyprland.lua` with the `hypr/layers/` loader; `bindings.lua` kept at stock | +| `base` | all | `hyprland.lua` with the `hypr/layers/` loader; `bindings.lua` kept at stock; Super+Ctrl+T toggles one persistent btop | | `personal` | both laptops | branding, default agent (`claude`), herdr, opencode, voxtype | | `personal-desktop` | HP | the three hand-built themes, the shell plugins, bar layout, Claude/Herdr bindings | | `features/handoff` | both laptops | `omarchy-handoff` + patched lan-mouse, its unit and binding | @@ -66,7 +66,7 @@ and shared layers beneath it. `./install.sh --show` prints the result. **Hyprland settings never share a file.** `base`'s `hyprland.lua` loads every `~/.config/hypr/layers/*.lua` in name order (Omarchy's own `require_all`, with reload), after `monitors`/`input`/`bindings`/`looknfeel`/`autostart`. Each -layer ships its own `NN-.lua` there — roles 20s, `personal-desktop` 40, +layer ships its own `NN-.lua` there — `base` 10, roles 20s, `personal-desktop` 40, features 50, machines 80 — and `bindings.lua` stays stock so nothing is bound twice. `install.sh` warns about a file in `hypr/layers/` that no layer of the current profile provides (a role you dropped). diff --git a/profiles/base/config/hypr/layers/10-base.lua b/profiles/base/config/hypr/layers/10-base.lua new file mode 100644 index 0000000..ebc349e --- /dev/null +++ b/profiles/base/config/hypr/layers/10-base.lua @@ -0,0 +1,22 @@ +-- Activity (btop) as a persistent drop-down: a single btop starts at login on +-- its own special workspace, and SUPER+CTRL+T shows/hides it instead of +-- launching a fresh btop (and losing its graph history) every time. + +local app_id = "org.omarchy.activity" +local launch = "omarchy-launch-tui --app-id=" .. app_id .. " btop" + +-- Route the window by class: launch-tui goes through setsid/uwsm-app, so an +-- exec rule can't follow the PID. +o.window(app_id, { workspace = "special:activity silent" }) + +-- Start it at login, and re-seed it if btop was quit and the toggle finds the +-- workspace empty. +o.exec_on_start(launch) +hl.workspace_rule({ + workspace = "special:activity", + on_created_empty = launch, +}) + +-- Was: launch a new btop each time. +hl.unbind("SUPER + CTRL + T") +o.bind("SUPER + CTRL + T", "Activity", hl.dsp.workspace.toggle_special("activity")) diff --git a/profiles/base/profile b/profiles/base/profile index 4e83995..9f3f4d5 100644 --- a/profiles/base/profile +++ b/profiles/base/profile @@ -1,4 +1,4 @@ # Every machine, including the Coder desktops. Keeps hyprland.lua and # bindings.lua at stock plus the hypr/layers/ loader, so every other layer adds # Hyprland settings as its own file instead of editing a shared one. -description="Shared by every machine: the hypr/layers/ loader" +description="Shared by every machine: the hypr/layers/ loader, persistent Activity (btop) toggle"