dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 0dd738bf63d4540e1e67435866c20a3b55cc83fe
parent a597e5473f646c20639af0ee19d3af2a3fe53a86
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 28 Nov 2019 11:03:25 +0100

Add define target to linkhandler

Diffstat:
M.local/bin/linkhandler | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler @@ -34,7 +34,7 @@ handle_url() { notify-send "linkhandler" "comic" action="comic" ;; *) - action="$(printf "open\nopen (tbb)\nxclip\nducksearch\nmap\nbookmark\ndownload\nhtml to pdf\nsci-hub\nscholarref\nmpv\nxdg-open\nyoutube-dl\nyoutube-dl-music" | \ + action="$(printf "open\nopen (tbb)\nxclip\nducksearch\nmap\nbookmark\ndownload\nhtml to pdf\nsci-hub\nscholarref\nmpv\nxdg-open\nyoutube-dl\nyoutube-dl-music\ndefine" | \ dmenu -i -p "$(echo "$url" | sed 's/.*:\/\///' | cut -c-80)")";; esac @@ -81,8 +81,10 @@ handle_url() { sleep 1; rm "$f" ;; "youtube-dl") echo "youtube-dl '$url' >/dev/null" | at now;; - "youtube-dl-music") + "youtube-dl-music") nohup $TERMINAL -e youtube-dl-music "$url" >/dev/null 2>&1 & ;; + "define") + define -g "$url\n";; *) notify-send "${0##/*}" "Error: Action not understood" exit 1 ;;