diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-18 11:44:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-18 11:44:56 +0200 |
| commit | 97a5fc27e011c024393c3b1610f044f3c751bd91 (patch) | |
| tree | b4167224de53db10c2d44abcffbc48c303e42171 /bin/blackpearl-sshmenu.sh | |
| parent | 140e0f906a9e8566b26267d84eb0aa1a7e2f0d94 (diff) | |
| download | unified-desktop-theme-97a5fc27e011c024393c3b1610f044f3c751bd91.tar.gz unified-desktop-theme-97a5fc27e011c024393c3b1610f044f3c751bd91.zip | |
feat(rofi): shared wallpaper header for the searchable layouts
The ssh menu's banner, title plate and plated search bar move into
header.rasi, which ssh.rasi, list.rasi and grid.rasi import, so every
searchable menu gets the same header with its -p as the title. The
banner's @WPAPER@ now lives in header.rasi, so that file is generated
and ssh.rasi is linked again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin/blackpearl-sshmenu.sh')
| -rwxr-xr-x | bin/blackpearl-sshmenu.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/bin/blackpearl-sshmenu.sh b/bin/blackpearl-sshmenu.sh deleted file mode 100755 index a94217e..0000000 --- a/bin/blackpearl-sshmenu.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# SSH menu: the hosts in ~/.ssh/config as cards, rofi themed by udt. -# Copyright (C) 2026 Danilo M. <danix@danix.xyz> -# Licensed under the GNU General Public License v2 only. - -# rofi's own ssh mode shows the alias only, so the config is read here. -# ponytail: plain "Keyword value" lines in ~/.ssh/config only; Include and -# Match are not followed, wildcard Host patterns are skipped. -mapfile -t hosts < <(awk ' - function flush() { if (name != "") print name "\t" user "\t" addr } - tolower($1) == "host" { flush(); name = ($2 ~ /[*?]/) ? "" : $2; user = ""; addr = $2 } - tolower($1) == "hostname" { addr = $2 } - tolower($1) == "user" { user = $2 } - END { flush() }' ~/.ssh/config) - -# Two lines a card: the alias, then "user · address" with the user only where -# the config sets one. Entries are joined on "|" so each can hold a newline. -entries=() -for h in "${hosts[@]}"; do - IFS=$'\t' read -r name user addr <<< "$h" - entries+=("<b>$name</b> -<span size='small' fgalpha='65%'>${user:+$user · }$addr</span>") -done - -i=$(IFS='|'; printf '%s' "${entries[*]}" | rofi -dmenu -i -markup-rows \ - -sep '|' -eh 2 -format i -p ' SSH:' -theme ~/.config/rofi/udt/ssh.rasi) || exit -name=${hosts[i]%%$'\t'*} -exec rofi-sensible-terminal -e ssh "$name" |
