aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 21:02:51 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 22:32:50 -0500
commite417a25165fc1f6c8a0d96c3b7872e6e074f1840 (patch)
tree6984c16674ca791c313523a7d521db0012f041cc /examples
parenta501850008e061f10c744071ef035fa8d82fe535 (diff)
Normalize cut arguments
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/data/scripts/instance-select-wmii.sh8
-rw-r--r--examples/data/scripts/util/uzbl-window.sh8
2 files changed, 8 insertions, 8 deletions
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 )"