Several bug fixes to cookie_daemon.py
[uzbl-mobile] / examples / data / uzbl / scripts / clipboard.sh
1 #!/bin/sh
2
3 # with this script you can store the current url in the clipboard, or go to the url which is stored in the clipboard.
4
5 clip=xclip
6
7 fifo="$5"
8 action="$1"
9 url="$7"
10
11 selection=`$clip -o`
12
13 case $action in
14   "yank" ) echo -n "$url" | eval "$clip";;
15   "goto" ) echo "uri $selection" > "$fifo";;
16   * ) echo "clipboard.sh: invalid action";;
17 esac