feat(desktop): improve launcher and window picker presentation

This commit is contained in:
2026-03-26 21:26:19 -07:00
committed by Kat Huang
parent f0222e5528
commit 1c2fc23e6b
7 changed files with 20 additions and 13 deletions

View File

@@ -220,10 +220,12 @@ windowrule = match:title ^(Confirm)$, float on
# (Matches both class and title because rumno may set either depending on backend.)
windowrule = match:class ^(.*[Rr]umno.*)$, float on
windowrule = match:class ^(.*[Rr]umno.*)$, pin on
windowrule = match:class ^(.*[Rr]umno.*)$, center on
windowrule = match:class ^(.*[Rr]umno.*)$, decorate off
windowrule = match:class ^(.*[Rr]umno.*)$, no_shadow on
windowrule = match:title ^(.*[Rr]umno.*)$, float on
windowrule = match:title ^(.*[Rr]umno.*)$, pin on
windowrule = match:title ^(.*[Rr]umno.*)$, center on
windowrule = match:title ^(.*[Rr]umno.*)$, decorate off
windowrule = match:title ^(.*[Rr]umno.*)$, no_shadow on

View File

@@ -27,8 +27,8 @@ trap 'rm -f "$TMPFILE"' EXIT
while IFS=$'\t' read -r address class title ws_id; do
icon=$(icon_for_class "$class")
addresses+=("$address")
printf '%-20s %-40s WS:%s\0icon\x1f%s\n' \
"$class" "${title:0:40}" "$ws_id" "$icon"
printf '%-24s %s WS:%s\0icon\x1f%s\n' \
"$class" "$title" "$ws_id" "$icon"
done <<< "$WINDOW_DATA" > "$TMPFILE"
INDEX=$(rofi -dmenu -i -show-icons -p "Bring window" -format i < "$TMPFILE") || exit 0

View File

@@ -22,8 +22,8 @@ trap 'rm -f "$TMPFILE"' EXIT
while IFS=$'\t' read -r address class title ws_id; do
icon=$(icon_for_class "$class")
addresses+=("$address")
printf '%-20s %-40s WS:%s\0icon\x1f%s\n' \
"$class" "${title:0:40}" "$ws_id" "$icon"
printf '%-24s %s WS:%s\0icon\x1f%s\n' \
"$class" "$title" "$ws_id" "$icon"
done <<< "$WINDOW_DATA" > "$TMPFILE"
INDEX=$(rofi -dmenu -i -show-icons -p "Go to window" -format i < "$TMPFILE") || exit 0

View File

@@ -32,8 +32,8 @@ trap 'rm -f "$TMPFILE"' EXIT
while IFS=$'\t' read -r address class title ws_id; do
icon=$(icon_for_class "$class")
addresses+=("$address")
printf '%-20s %-40s WS:%s\0icon\x1f%s\n' \
"$class" "${title:0:40}" "$ws_id" "$icon"
printf '%-24s %s WS:%s\0icon\x1f%s\n' \
"$class" "$title" "$ws_id" "$icon"
done <<< "$WINDOW_DATA" > "$TMPFILE"
INDEX=$(rofi -dmenu -i -show-icons -p "Replace with" -format i < "$TMPFILE") || exit 0

View File

@@ -11,7 +11,7 @@ configuration {
font: "Fira Code 10";
show-icons: true;
display-drun: "";
drun-display-format: "{name}";
drun-display-format: "{name} {generic}";
disable-history: false;
sidebar-mode: false;
}
@@ -25,7 +25,8 @@ window {
border: 0px;
border-color: @ac;
border-radius: 12px;
width: 40%;
width: 88%;
height: 78%;
location: center;
x-offset: 0;
y-offset: 0;
@@ -64,8 +65,8 @@ inputbar {
listview {
background-color: @al;
padding: 10px;
columns: 2;
lines: 7;
columns: 1;
lines: 18;
spacing: 1%;
cycle: false;
dynamic: true;

View File

@@ -507,8 +507,8 @@ myDecorateName ws w = do
workspaceToName <- getWorkspaceNames'
let iconName = fromMaybe (map toLower $ head classes) $
lookupIconFromClasses classes
entryString = printf "%-20s%-40s %+30s in %s \0icon\x1f%s"
classTitle (take 40 name) " "
entryString = printf "%-24s %s in %s \0icon\x1f%s"
classTitle name
(fromMaybe "" $ workspaceToName (W.tag ws)) iconName
return entryString

View File

@@ -1,3 +1,7 @@
#!/usr/bin/env zsh
ps -o 'pid cmd' x | rofi -dmenu -i | get_cols 1 | xargs kill -9
ps -o 'pid= cmd=' x \
| sed -E 's@/nix/store/[[:alnum:]]{32}-@@g' \
| rofi -dmenu -i \
| get_cols 1 \
| xargs kill -9