commit 804e81d2891efc3ee02fe8c829dc6d6a04f51eea
parent 824e57ad0cf03edaf2fade771da946488a0c57b8
Author: Alex Balgavy <alex@balgavy.eu>
Date: Sun, 6 Mar 2022 01:06:24 +0100
opener + linkhandler: use nsxiv instead of sxiv
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/linkhandler b/scripts/linkhandler
@@ -6,9 +6,9 @@ case "$1" in
setsid -f mpvq "$1" 1>/dev/null 2>&1
;;
*png|*jpg|*jpe|*jpeg|*gif)
- notify 'Starting sxiv' "Opening $1..." 'linkhandler'
+ notify 'Starting image viewer' "Opening $1..." 'linkhandler'
curl -sL "$1" > "/tmp/$(printf "%s" "$1" | sed "s/.*\///")" \
- && sxiv -a "/tmp/$(printf "%s" "$1" | sed "s/.*\///")" 1>/dev/null 2>&1 &
+ && opener "/tmp/$(printf "%s" "$1" | sed "s/.*\///")" 1>/dev/null 2>&1 &
;;
*gifv)
setsid -f mpv -loop "$1" 1>/dev/null 2>&1
diff --git a/scripts/opener b/scripts/opener
@@ -7,7 +7,7 @@ case "$1" in
*)
case $(file --mime-type "$1" -bL) in
text/*|application/json|inode/x-empty) { [ -n "$VIM_TERMINAL" ] && vimsend "$1"; } || ${EDITOR:-vim} "$1";;
- image/*) setsid -f nsxiv "$@" 2>&1;;
+ image/*) setsid -f nsxiv -a "$@" 2>&1;;
application/epub*) setsid -f ebook-viewer "$1" >/dev/null 2>&1;;
application/pdf*) setsid -f zathura "$1" >/dev/null 2>&1;;
application/x-sc|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) sc-im "$1";;