Found that the mpv pseudo-gui listed its WM_CLASS as `WM_CLASS(STRING) = "gl", "mpv"`
xorgfocusedwindow was only looking at the first field for the app: rename so it
was always set to gl. This patch changes the field to the second.
Testing on my machine hasn't found any issues as everything was detected
correctly on a few different windows.
Signed-off-by: hazardchem <hazardchem@disroot.org>
---
scripts/core/sxmo_wm.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/core/sxmo_wm.sh b/scripts/core/sxmo_wm.sh
index d6625c6..67360ac 100755
--- a/scripts/core/sxmo_wm.sh+++ b/scripts/core/sxmo_wm.sh
@@ -103,7 +103,7 @@ swayinputevent() {
xorgfocusedwindow() {
activeoutput="$(xprop -id "$(xdotool getactivewindow 2>/dev/null)" 2>/dev/null)"
printf %s "$activeoutput" | \
- grep ^WM_CLASS | cut -d" " -f3- | cut -d"," -f1 | \+ grep ^WM_CLASS | cut -d" " -f3- | cut -d"," -f2 | \ xargs printf 'app: %s'
printf "\n"
printf %s "$activeoutput" | \
--
2.45.1