empty workspace fix

This commit is contained in:
Rachel Lambda Samuelsson 2024-03-12 14:52:40 +01:00
parent 9ddd8edd1f
commit c4b963cd7e

View File

@ -104,6 +104,7 @@ in rec {
]}" ]}"
current_display=$(wmctrl -d|awk '/*/ {print $1}') current_display=$(wmctrl -d|awk '/*/ {print $1}')
out=$(
wmctrl -lx | wmctrl -lx |
awk -v current_display="$current_display" '{ awk -v current_display="$current_display" '{
if ($2==current_display) { if ($2==current_display) {
@ -111,6 +112,10 @@ in rec {
printf "%s ", "["tolower(window_title[2])"]" printf "%s ", "["tolower(window_title[2])"]"
} }
}' }'
)
# workaround for clearing on empty output
printf '%s\n' "$out"
''; '';
executable = true; executable = true;
}; };