aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJopStro <[email protected]>2021-02-01 15:24:41 +0000
committerJopStro <[email protected]>2021-02-01 15:24:41 +0000
commit636ff4a7815b89b01b126f57d29ffc47fc33bb5e (patch)
tree706ac99813dcc656549e976f3bc022dc61efdf3c
parent81b622450d4f645fdc330e85f517897799588c2f (diff)
parentb99e6c06249670422c58bcd995bc1e552fc77d94 (diff)
Merge branch 'master' of https://github.com/wisaTong/bspswallow into wisaTong-master
-rwxr-xr-xbspswallow4
1 files changed, 3 insertions, 1 deletions
diff --git a/bspswallow b/bspswallow
index 7525013..1466857 100755
--- a/bspswallow
+++ b/bspswallow
@@ -6,7 +6,9 @@ get_class() {
if [ -z "$id" ]; then
echo ""
else
- xprop -id "$id" | sed -n '/WM_CLASS\|WM_COMMAND/s/.*"\(.*\)".*/\1/p'
+ xprop -id "$id" | sed -n \
+ -e '/WM_CLASS/s/\( "\)/\n/g; s/[^\n]*\n\([^"]*\)[^\n]*/\1\n/g' \
+ -e '/WM_COMMAND/s/[^"]*/\n\n/1; s/\n"//1; s/\n\([^"]*\)".*/\n\1/; /\n/p'
fi
}