From d14a68c9384ac9e2b3578c561453e2c60c6d733f Mon Sep 17 00:00:00 2001 From: krolyxon Date: Tue, 5 Jul 2022 17:58:51 +0530 Subject: [PATCH] stuff --- .config/lf/lfrc | 6 +++--- .local/bin/linkhandler | 23 ----------------------- 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100755 .local/bin/linkhandler diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 07f830f..bcebcf5 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -41,7 +41,7 @@ cmd extract ${{ printf "%s\n\t" "$fx" printf "extract?[y/N]" read ans - [ $ans = "y" ] && aunpack $fx + [ $ans = "y" ] && ext $fx }} cmd delete ${{ @@ -75,7 +75,7 @@ cmd copyto ${{ notify-send "📋 File(s) copied." "File(s) copies to $dest." }} -cmd setbg "$1" +cmd genwall "$1" cmd bulkrename $vidir # Bindings @@ -102,7 +102,7 @@ map I push A # at the very beginning map i push A # before extension map a push A # after extension map B bulkrename -map b $setbg $f +map b $genwall $f map down map up diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler deleted file mode 100755 index fa74caf..0000000 --- a/.local/bin/linkhandler +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# Feed script a url or file location. -# If an image, it will view in sxiv, -# if a video or gif, it will view in mpv -# if a music file or pdf, it will download, -# otherwise it opens link in browser. - -# If no url given. Opens browser. For using script as $BROWSER. -[ -z "$1" ] && { "$BROWSER"; exit; } - -case "$1" in - *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*) - setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; - *png|*jpg|*jpe|*jpeg|*gif) - curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; - *pdf|*cbz|*cbr) - curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; - *mp3|*flac|*opus|*mp3?source*) - qndl "$1" 'curl -LO' >/dev/null 2>&1 ;; - *) - [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1 -esac