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 <noreply@anthropic.com>
23 lines
862 B
Lua
23 lines
862 B
Lua
-- 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"))
|