summaryrefslogtreecommitdiff
path: root/bin/guiscripts/linkhandler
diff options
context:
space:
mode:
Diffstat (limited to 'bin/guiscripts/linkhandler')
-rwxr-xr-xbin/guiscripts/linkhandler5
1 files changed, 1 insertions, 4 deletions
diff --git a/bin/guiscripts/linkhandler b/bin/guiscripts/linkhandler
index a3a6b64..da2d656 100755
--- a/bin/guiscripts/linkhandler
+++ b/bin/guiscripts/linkhandler
@@ -6,11 +6,8 @@
# if a music file or pdf, it will download,
# otherwise it opens link in browser.
-if [ -z "$1" ]; then
+test -z "${url:=$1}" &&
url="$(xclip -sel c -o)"
-else
- url="$1"
-fi
dunstify "linkhandler" "<b>handling</b> $url"
case "$url" in