Krolyxon
Commit d14a68c

Branches

Refs →

dotfiles-x11d14a68c

stuff

Author
krolyxon
Date
2022-07-05 17:58 +0530
Parent
164c9d2
Commit
d14a68c9384ac9e2b3578c561453e2c60c6d733f

+3 −26

2 files changed

  1. M .config/lf/lfrc +3 −3
  2. D .local/bin/linkhandler +0 −23
M .config/lf/lfrc View
@@ -41,7 +41,7 @@ cmd extract ${{
4141 printf "%s\n\t" "$fx"
4242 printf "extract?[y/N]"
4343 read ans
44โˆ’ [ $ans = "y" ] && aunpack $fx
44+ [ $ans = "y" ] && ext $fx
4545 }}
4646
4747 cmd delete ${{
@@ -75,7 +75,7 @@ cmd copyto ${{
7575 notify-send "๐Ÿ“‹ File(s) copied." "File(s) copies to $dest."
7676 }}
7777
78โˆ’cmd setbg "$1"
78+cmd genwall "$1"
7979 cmd bulkrename $vidir
8080
8181 # Bindings
@@ -102,7 +102,7 @@ map I push A<c-a> # at the very beginning
102102 map i push A<a-b><a-b><a-f> # before extension
103103 map a push A<a-b> # after extension
104104 map B bulkrename
105โˆ’map b $setbg $f
105+map b $genwall $f
106106
107107 map <c-e> down
108108 map <c-y> up
D .local/bin/linkhandler View
@@ -1,23 +0,0 @@
1โˆ’#!/bin/sh
2โˆ’
3โˆ’# Feed script a url or file location.
4โˆ’# If an image, it will view in sxiv,
5โˆ’# if a video or gif, it will view in mpv
6โˆ’# if a music file or pdf, it will download,
7โˆ’# otherwise it opens link in browser.
8โˆ’
9โˆ’# If no url given. Opens browser. For using script as $BROWSER.
10โˆ’[ -z "$1" ] && { "$BROWSER"; exit; }
11โˆ’
12โˆ’case "$1" in
13โˆ’ *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
14โˆ’ setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;;
15โˆ’ *png|*jpg|*jpe|*jpeg|*gif)
16โˆ’ 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 & ;;
17โˆ’ *pdf|*cbz|*cbr)
18โˆ’ curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
19โˆ’ *mp3|*flac|*opus|*mp3?source*)
20โˆ’ qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
21โˆ’ *)
22โˆ’ [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1
23โˆ’esac