sxmo_wm.sh: fix fringe cases in focused program v1 SUPERSEDED

hazardchem: 1
 sxmo_wm.sh: fix fringe cases in focused program

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mil/sxmo-devel/patches/52952/mbox | git am -3
Learn more about email & git

[PATCH] sxmo_wm.sh: fix fringe cases in focused program Export this patch

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" | \
Marking as superseded