aboutsummaryrefslogtreecommitdiff
path: root/.config/lf/lfrc
diff options
context:
space:
mode:
Diffstat (limited to '.config/lf/lfrc')
-rw-r--r--.config/lf/lfrc27
1 files changed, 20 insertions, 7 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index e104591..dad917d 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -30,7 +30,7 @@ set autoquit true
cmd open ${{
case $(file --mime-type "$(readlink -f $f)" -b) in
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
- image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
+ image/vnd.djvu|application/pdf|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
@@ -45,12 +45,18 @@ cmd open ${{
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
application/pdf|application/vnd.djvu|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
application/pgp-encrypted) $EDITOR $fx ;;
- application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
- *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
+ application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
+ application/octet-stream) case ${f##*.} in
+ doc|docx|xls|xlsx|odt|ppt|pptx) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
+ ghw) setsid -f gtkwave $f >/dev/null 2>&1 ;;
+ ts) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
+ *) setsid -f zathura $fx >/dev/null 2>&1 ;;
+ esac ;;
+ *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
esac
}}
-cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
+cmd mkdir $mkdir -p "$@"
cmd extract ${{
clear; tput cup $(($(tput lines)/3)); tput bold
@@ -133,13 +139,13 @@ cmd bulkrename ${{
# Bindings
map <c-f> $lf -remote "send $id select \"$(fzf)\""
map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
-map gh
+map H cd ~
map g top
map D delete
map E extract
map C copyto
map M moveto
-map <c-n> push :mkdir<space>
+map <c-n> push :mkdir<space>""<left>
map <c-r> reload
map <c-s> set hidden!
map <enter> shell
@@ -162,7 +168,14 @@ map V push :!nvim<space>
map W $setsid -f $TERMINAL >/dev/null 2>&1
-map Y $printf "%s" "$fx" | xclip -selection clipboard
+map U $printf "%s" "$fx" | xclip -selection clipboard
+map u $printf "%s" "$fx" | sed 's/.*\///' | xclip -selection clipboard
+map . $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/www.youtube.com\/watch?v=/' | sed -E 's/\]\..+//' | xclip -selection clipboard
+map <gt> $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/piped.video\/watch?v=/' | sed -E 's/\]\..+//' | xclip -selection clipboard
+map T $nsxiv -t "$(pwd)" # opens thumbnail mode
+map <c-l> unselect
+
+
# Source Bookmarks
source "~/.config/lf/shortcutrc"