aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Sylvester Johansson <scj@archlinux.us>2009-05-27 03:31:28 +0200
committerGravatar Sylvester Johansson <scj@archlinux.us>2009-05-27 03:31:28 +0200
commit4adea4371d9ed70a4cdb8c88e09d3c916814245e (patch)
tree45d9392faa1419df8b4de5bf93b6d3c7af445ad4 /examples
parent5967d904d18835d7f2dac806ffe5279d6ee2a0f2 (diff)
updated the yank.sh
Diffstat (limited to 'examples')
-rw-r--r--examples/configs/sampleconfig4
-rwxr-xr-xexamples/scripts/yank.sh9
2 files changed, 7 insertions, 6 deletions
diff --git a/examples/configs/sampleconfig b/examples/configs/sampleconfig
index 06f3f13..df9b77b 100644
--- a/examples/configs/sampleconfig
+++ b/examples/configs/sampleconfig
@@ -89,8 +89,8 @@ bind B = spawn /usr/share/uzbl/examples/scripts/insert_bookmark.sh
bind U = spawn /usr/share/uzbl/examples/scripts/load_url_from_history.sh
bind u = spawn /usr/share/uzbl/examples/scripts/load_url_from_bookmarks.sh
# with the sample yank script, you can yank one of the arguments into clipboard/selection
-bind yurl = spawn /usr/share/uzbl/examples/scripts/yank.sh 8 primary
-bind ytitle = spawn /usr/share/uzbl/examples/scripts/yank.sh 9 clipboard
+bind yurl = spawn /usr/share/uzbl/examples/scripts/yank.sh 6 primary
+bind ytitle = spawn /usr/share/uzbl/examples/scripts/yank.sh 7 clipboard
# does the same as yurl but without needing a script
bind y2url = sh "echo -n $6 | xclip"
# go the page from primary selection
diff --git a/examples/scripts/yank.sh b/examples/scripts/yank.sh
index d4926be..ee140c7 100755
--- a/examples/scripts/yank.sh
+++ b/examples/scripts/yank.sh
@@ -2,10 +2,11 @@
# in your uzbl config, make the first argument the number of the (later) argument you want to use (see README for list of args)
# make the 2nd argument one of : primary, secondary, clipboard.
# examples:
-# bind yurl = spawn ./examples/scripts/yank.sh 8 primary
-# bind ytitle = spawn ./examples/scripts/yank.sh 9 clipboard
+# bind yurl = spawn ./examples/scripts/yank.sh 6 primary
+# bind ytitle = spawn ./examples/scripts/yank.sh 7 clipboard
which xclip &>/dev/null || exit 1
-[ "$2" == primary -o "$2" == secondary -o "$2" == clipboard ] || exit 2
+[ "$9" == primary -o "$9" == secondary -o "$9" == clipboard ] || exit 2
-echo -n "${!1}" | xclip -selection $2 \ No newline at end of file
+echo echo -n "${!8}" '|' xclip -selection $9
+echo -n "${!8}" | xclip -selection $9