ref: ae86f1edc75173a5fca6fd363b92c2d61a582099
parent: 039fb2ad3872fb18231e04fb8fa55c15065da3fd
author: Halfwit <michaelmisch1985@gmail.com>
date: Thu Mar 30 08:23:07 PDT 2017
Grab jjust the first part
--- a/autotag
+++ b/autotag
@@ -3,9 +3,8 @@
WIN=$XDG_CONFIG_HOME/x11/tags
focus="`awk -v r="$(watom "$1" WM_NAME)" -v s="$(watom $1 WM_CLASS)" '$0 ~ r || $0 ~ s {print $2}' "$WIN"`"
-test focus = true && wtf "$focus"
+test focus = true && wtf "$focus" && chwso "$1"
group="`awk -v r="$(watom "$1" WM_NAME)" -v s="$(watom $1 WM_CLASS)" '$0 ~ r || $0 ~ s {print $3}' "$WIN"`"
-chwso -r "$1"
if [ $group ]; then
grp "$group" "$1"
--- a/wshuf
+++ b/wshuf
@@ -9,7 +9,7 @@
winsize() {
while read -r id; do
# Find our command to run in our file, else set it as default
- cmd="`awk -v r="$(watom $id WM_NAME)" -v s="$(watom $id WM_CLASS)" '$0 ~ r || $0 ~ s {$1=""; print}' "$WIN"`"
+ cmd="`awk -v r="$(watom $id WM_NAME | awk '{print $1}')" -v s="$(watom $id WM_CLASS)" '$0 ~ r || $0 ~ s {$1=""; print}' "$WIN"`"
test -z "$cmd" && cmd="`awk '/default/{$1=""; print}' "$WIN"`"
printf '%s %s\n' "`eval "$cmd"`" "$id"
done