~mil/sxmo-devel

v2 sxmo-utils: sxmo_wm.sh: fix fringe cases in focused program v1 PROPOSED

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/52953/mbox | git am -3
Learn more about email & git

[PATCH v2 sxmo-utils] 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>
---

v2 - Fixed patch line

 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