X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=examples%2Fdata%2Fuzbl%2Fscripts%2Fclipboard.sh;fp=examples%2Fdata%2Fuzbl%2Fscripts%2Fclipboard.sh;h=60567d39f9276be8bfff55d32a71652f832cc371;hb=591e555354d7b0031acdd26a971a5bc1b3130e62;hp=0000000000000000000000000000000000000000;hpb=c4da3596f8ef552bcc34046d5ed0f90d59805f39;p=uzbl-mobile diff --git a/examples/data/uzbl/scripts/clipboard.sh b/examples/data/uzbl/scripts/clipboard.sh new file mode 100755 index 0000000..60567d3 --- /dev/null +++ b/examples/data/uzbl/scripts/clipboard.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# with this script you can store the current url in the clipboard, or go to the url which is stored in the clipboard. + +clip=xclip + +fifo="$5" +action="$1" +url="$7" + +selection=`$clip -o` + +case $action in + "yank" ) echo -n "$url" | eval "$clip";; + "goto" ) echo "uri $selection" > "$fifo";; + * ) echo "clipboard.sh: invalid action";; +esac