From 7277088f94753d17336b355381a5ce9117a42e70 Mon Sep 17 00:00:00 2001 From: gandalf3 Date: Mon, 6 Jun 2022 13:32:55 -0700 Subject: [PATCH] Add fallback to WM_NAME wmctrl only reads _NET_WM_NAME, however some applications (e.g. steam) do not set it and only set WM_NAME. When _NET_WM_NAME is missing, wmctrl gives the name as "N/A"; in such a case there is a chance we can still get the right name from WM_NAME. --- jumpapp | 1 + 1 file changed, 1 insertion(+) diff --git a/jumpapp b/jumpapp index b0c7e57..0fcd5ad 100755 --- a/jumpapp +++ b/jumpapp @@ -366,6 +366,7 @@ list_pids_for_command_from_procfs() { list_windows() { local windowid workspace pid wm_class hostname title while read -r windowid workspace pid wm_class hostname title; do + [[ "$title" == "N/A" ]] && title=$(xprop -id $windowid WM_NAME) printf '%s\n' "$windowid $hostname $pid $workspace ${wm_class##*.} $title" done < <(wmctrl -lpx) }