using initialTitle instead of currentTitle

This commit is contained in:
Zacharias-Brohn
2025-10-14 20:58:34 +02:00
parent 2350b6db28
commit 800f3c53e7
6 changed files with 52 additions and 15 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/zsh
raw="$(hyprctl activewindow)"
json="$(echo "$raw" | jq -Rn '
[ inputs
| sub("\r$"; "")
| select(test(":"))
| capture("^(?<key>[^:]+):[ \t]*(?<value>.*)$")
| .key |= ltrim
]
| from_entries
')"
title="$(echo "$json" | jq '.initialTitle')"
echo "$title"