diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-26 11:25:26 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-26 11:25:26 +0100 |
| commit | f161ba41344c6834f10eaa5064dc02bc9c1cfdf6 (patch) | |
| tree | 941d27d5f25c961b4b6fe3f1f68175814255a72a /hosts/README.md | |
| parent | cf4f2665ee02058ed65cf08fc2b5f313523f6191 (diff) | |
| download | quickshell-f161ba41344c6834f10eaa5064dc02bc9c1cfdf6.tar.gz quickshell-f161ba41344c6834f10eaa5064dc02bc9c1cfdf6.zip | |
hosts: the vault's LAN map as a searchable overlay
A new standalone shell, shaped like keybinds, that replaces the rofi
SSH menu (blackpearl-sshmenu.sh) on ALT+SHIFT+Return. hosts.py reads
the frontmatter of every host note in the vault's Local Network/services
folder and the plain lines of ~/.ssh/config, and joins each alias to the
note whose ip or hostname is its HostName (or whose short hostname is the
alias). Aliases that match no note get cards of their own, so everything
the rofi menu listed is still reachable. It runs on every opening, so a
vault edit shows next time with no cache to go stale.
Each card shows ip:port, hostname, the Proxmox node and CT id, and only
the actions its data allows: ssh per alias (a kitty tab, via ssh-tab,
lifted from the rofi script), open for a url, copy for the address.
Enter runs the first.
The cards are laid out in rows of five inside a Flickable rather than a
GridView, because a GridView gives every cell one height: a fixed height
tall enough for the most aliased host left every other card half empty,
and a short one clipped its chips. Each row now takes its busiest card's
height. The grid keeps a 24px margin inside its clip, without which the
first row's glow was cut off at the top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'hosts/README.md')
| -rw-r--r-- | hosts/README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/hosts/README.md b/hosts/README.md new file mode 100644 index 0000000..1be1dd7 --- /dev/null +++ b/hosts/README.md @@ -0,0 +1,46 @@ +# hosts + +The LAN map from the Obsidian vault as a searchable list, over a dimmed +screen. ALT+SHIFT+Return opens it, Escape or a click outside closes it. It +replaces the rofi SSH menu, `blackpearl-sshmenu.sh`. + +Each card shows a host's `ip:port`, its hostname, the Proxmox node and CT id +it runs on, and the actions its data allows: + +- `ssh <alias>`, one per `~/.ssh/config` alias pointing at it, in a kitty tab + (`ssh-tab`, lifted from the rofi script); +- `open`, when the note has a `url`; +- `copy <ip:port>`, through `wl-copy`. + +Type to filter (every word must match name, ip, port, hostname, node, CT id +or alias), Up/Down to move, Enter runs the first action, chips run their own. + +`hosts.py` builds the list on every opening, so there is no cache. It reads +the frontmatter of each note in the vault's `Local Network/services/` +(`HOSTS_DIR` overrides the path) and the ssh config. An alias joins the note +whose `ip` or `hostname` is its `HostName`, or whose short hostname is the +alias; an alias that matches no note gets a card of its own, so everything +the rofi menu listed is still here. Aliases with the same `HostName` share a +card. Like the rofi script, it reads plain `Keyword value` lines only: +`Include` and `Match` are not followed, wildcard `Host` patterns are skipped. + +## Running + + qs -p ./hosts + qs -p ./hosts ipc call hosts toggle + +## Blur + +Optional, in the Hyprland config: + + hl.layer_rule({ + name = "blur-hosts", + match = { namespace = "^(keystone-hosts)$" }, + blur = true, + xray = false, + ignore_alpha = 0.1, + }) + +## Check + + /usr/bin/python3 hosts/hosts.py --check |
