1 # use this script to pipe any variable to xclip, so you have it in your clipboard
2 # in your uzbl config, make the first argument the number of the (later) argument you want to use (see README for list of args)
3 # make the 2nd argument one of : primary, secondary, clipboard.
5 # bind yurl = spawn ./examples/scripts/yank.sh 8 primary
6 # bind ytitle = spawn ./examples/scripts/yank.sh 9 clipboard
8 which xclip &>/dev/null || exit 1
9 [ "$2" == primary -o "$2" == secondary -o "$2" == clipboard ] || exit 2
11 echo -n "${!1}" | xclip -selection $2