From e417a25165fc1f6c8a0d96c3b7872e6e074f1840 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 10 Mar 2011 21:02:51 -0500 Subject: Normalize cut arguments --- examples/data/scripts/instance-select-wmii.sh | 8 ++++---- examples/data/scripts/util/uzbl-window.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/instance-select-wmii.sh b/examples/data/scripts/instance-select-wmii.sh index 565ff48..ec6a3c1 100755 --- a/examples/data/scripts/instance-select-wmii.sh +++ b/examples/data/scripts/instance-select-wmii.sh @@ -18,24 +18,24 @@ case "$1" in "list") list="" # get window id's of uzbl clients. we could also get the label in one shot but it's pretty tricky - for i in $( wmiir read /tag/sel/index | grep uzbl | cut -d ' ' -f2 ); do + for i in $( wmiir read /tag/sel/index | grep uzbl | cut -d ' ' -f 2 ); do label="$( wmiir read /client/$i/label )" list="$list$i : $label\n" done - window="$( printf "$list\n" | $DMENU | cut -d ' ' -f1 )" + window="$( printf "$list\n" | $DMENU | cut -d ' ' -f 1 )" wmiir xwrite /tag/sel/ctl "select client $window" ;; "next") current="$( wmiir read /client/sel/ctl | head -n 1 )" # find the next uzbl window and focus it - next="$( wmiir read /tag/sel/index | grep -A 10000 " $current " | grep -m 1 uzbl | cut -d ' ' -f2 )" + next="$( wmiir read /tag/sel/index | grep -A 10000 " $current " | grep -m 1 uzbl | cut -d ' ' -f 2 )" if [ -n "$next" ]; then wmiir xwrite /tag/sel/ctl "select client $next" fi ;; "prev") current="$( wmiir read /client/sel/ctl | head -n 1 )" - prev="$( wmiir read /tag/sel/index | grep -B 10000 " $current " | tac | grep -m 1 uzbl | cut -d ' ' -f2 )" + prev="$( wmiir read /tag/sel/index | grep -B 10000 " $current " | tac | grep -m 1 uzbl | cut -d ' ' -f 2 )" if [ -n "$prev" ]; then wmiir xwrite /tag/sel/ctl "select client $prev" fi diff --git a/examples/data/scripts/util/uzbl-window.sh b/examples/data/scripts/util/uzbl-window.sh index 077887b..351eff7 100644 --- a/examples/data/scripts/util/uzbl-window.sh +++ b/examples/data/scripts/util/uzbl-window.sh @@ -5,7 +5,7 @@ UZBL_WIN_POS="$( xwininfo -id "$UZBL_XID" | \ sed -n -e 's/Corners:[ ]*[+-]\([0-9]*\)[+-]\([0-9]*\).*$/\1 \2/p' )" UZBL_WIN_SIZE="$( xwininfo -id "$UZBL_XID" | \ sed -n -e 's/-geometry[ ]*\([0-9]*\)x\([0-9]*\).*$/\1 \2/p' )" -UZBL_WIN_POS_X="$( echo "$UZBL_WIN_POS" | cut -d\ -f1 )" -UZBL_WIN_POS_Y="$( echo "$UZBL_WIN_POS" | cut -d\ -f2 )" -UZBL_WIN_WIDTH="$( echo "$UZBL_WIN_SIZE" | cut -d\ -f1 )" -UZBL_WIN_HEIGHT="$( echo "$UZBL_WIN_SIZE" | cut -d\ -f2 )" +UZBL_WIN_POS_X="$( echo "$UZBL_WIN_POS" | cut -d ' ' -f 1 )" +UZBL_WIN_POS_Y="$( echo "$UZBL_WIN_POS" | cut -d ' ' -f 2 )" +UZBL_WIN_WIDTH="$( echo "$UZBL_WIN_SIZE" | cut -d ' ' -f 1 )" +UZBL_WIN_HEIGHT="$( echo "$UZBL_WIN_SIZE" | cut -d ' ' -f 2 )" -- cgit v1.2.3