added lf, Hack font & tweaked nvim-conf

This commit is contained in:
Nicole Dresselhaus
2024-10-07 12:59:48 +02:00
parent 56d963b0e3
commit a78fdf9f0d
18 changed files with 169 additions and 12 deletions

2
.config/lf/cleaner Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file </dev/null >/dev/tty

2
.config/lf/lfrc Normal file
View File

@ -0,0 +1,2 @@
set previewer ~/.config/lf/previewer
set cleaner ~/.config/lf/cleaner

24
.config/lf/previewer Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
draw() {
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" </dev/null >/dev/tty
exit 1
}
file="$1"
w="$2"
h="$3"
x="$4"
y="$5"
case "$(file -Lb --mime-type "$file")" in
image/*)
draw "$file"
;;
video/*)
# vidthumb is from here:
# https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb
draw "$(vidthumb "$file")"
;;
esac
pistol "$file"