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 6955ad7682dbef8277ed55d81a06137517aa3943
parent af300ae998b30d3e1312f315aeae131844958540
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 12 Apr 2019 12:17:26 +0200

Add Play option using mpv

Diffstat:
Mbin/linkhandler | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/linkhandler b/bin/linkhandler @@ -2,8 +2,6 @@ for url in "$@"; do case "$url" in - *mkv|*webm|*mp4|*gif|*youtube.com*|*youtu.be*|*hooktube.com*|*bitchute.com*) - setsid mpv -quiet "$url" >/dev/null 2>&1 & ;; *png|*jpg|*jpe|*jpeg) setsid sxiv "$url" >/dev/null 2>&1 & ;; *mp3|*flac|*opus|*mp3?source) @@ -13,7 +11,7 @@ for url in "$@"; do "$TERMINAL" -e "$EDITOR $url" else url="$(echo "$url" | sed 's|http.*://scholar\.google\..*url=||;s|&rt=.*$||')" - action="$(printf "Open\nOpen (Tor Browser)\nCopy\nDownload\nSci-Hub\nAdd reference" | dmenu_themed -i -p "Action:")" + action="$(printf "Open\nOpen (Tor Browser)\nCopy\nDownload\nSci-Hub\nAdd reference\nPlay" | dmenu_themed -i -p "Action:")" if [ "$action" = "Open" ]; then setsid xdg-open "$url" >/dev/null 2>&1 & elif [ "$action" = "Open (Tor Browser)" ]; then @@ -26,6 +24,8 @@ for url in "$@"; do setsid tsp shdl --tor-socks --notify "$url" >/dev/null 2>&1 & elif [ "$action" = "Add reference" ]; then getdoi "$url" | getref --notify >> "$BIB" & + elif [ "$action" = "Play" ]; then + setsid mpv -quiet "$url" >/dev/null 2>&1 & else notify-send "Error: Action not understood" exit 1