From a0bb023d782dd2d8703670d560b5ccd8d25d640e Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 4 Nov 2021 12:25:04 +0300 Subject: bins: shfmt, weasel suite, spark --- .local/bin/i3-get-window-criteria | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.local/bin/i3-get-window-criteria') diff --git a/.local/bin/i3-get-window-criteria b/.local/bin/i3-get-window-criteria index f46f65e..6d6ea1b 100755 --- a/.local/bin/i3-get-window-criteria +++ b/.local/bin/i3-get-window-criteria @@ -9,7 +9,7 @@ # quotes in "" are not escaped properly. This is a problem with the output of `xprop`, # reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807 -PROGNAME=`basename "$0"` +PROGNAME=$(basename "$0") # Check for xwininfo and xprop for cmd in xwininfo xprop; do @@ -25,13 +25,13 @@ match_qstring='"[^"\\]*(\\.[^"\\]*)*"' # NOTE: Adds 1 backreference { # Run xwininfo, get window id - window_id=`xwininfo -int | sed -nre "s/^xwininfo: Window id: ($match_int) .*$/\1/p"` + window_id=$(xwininfo -int | sed -nre "s/^xwininfo: Window id: ($match_int) .*$/\1/p") echo "id=$window_id" # Run xprop, transform its output into i3 criteria. Handle fallback to # WM_NAME when _NET_WM_NAME isn't set - xprop -id $window_id | - sed -nr \ + xprop -id $window_id \ + | sed -nr \ -e "s/^WM_CLASS\(STRING\) = ($match_qstring), ($match_qstring)$/instance=\1\nclass=\3/p" \ -e "s/^WM_WINDOW_ROLE\(STRING\) = ($match_qstring)$/window_role=\1/p" \ -e "/^WM_NAME\(STRING\) = ($match_string)$/{s//title=\1/; h}" \ -- cgit v1.2.3-70-g09d2