dotfiles

My configuration files.
Log | Files | Refs | README

commit 32bd4f673fcea4a9537bfbc4eff036a9b276d9ef
parent 7ab2ba22231b2ad41183ec277fc046626657e2bc
Author: Sven Möller <sven-moeller@outlook.de>
Date:   Mon, 13 Dec 2021 23:40:11 +0100

For android

Diffstat:
Mbin/.local/bin/lh | 14+++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/bin/.local/bin/lh b/bin/.local/bin/lh @@ -1,6 +1,14 @@ #!/bin/sh -case $1 in -*.png|*.jpg) curl $1 | setsid -f $IMAGE_VIEWER -;; -*) setsid -f $BROWSER $1 ;; +image() { + if [ "$(uname -o)" = "Android" ]; then + "$BROWSER" "$1" +else + curl "$1" | setsid -f "$IMAGE_VIEWER" - +fi +} + +case "$1" in +*.png|*.jpg) image "$1";; +*) setsid -f "$BROWSER" "$1" ;; esac