update joshuto config

This commit is contained in:
LordMZTE 2022-01-08 16:37:20 +01:00
parent 330dcf4a20
commit 5763ad0234
2 changed files with 16 additions and 4 deletions

View file

@ -23,10 +23,10 @@ directories_first = true
reverse = false
# Not fully implemented yet
#[preview]
#max_preview_size = 2097152 # 2MB
#preview_images = true
#preview_script = "~/.config/joshuto/preview.sh"
[preview]
max_preview_size = 2097152 # 2MB
preview_images = true
preview_script = "~/.config/joshuto/preview.sh"
[tab]
# inherit, home, root

12
.config/joshuto/preview.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
set -e
# viuer doesn't like xterm-kitty
export TERM=xterm-256color
mime=$(file -b --mime-type "$1")
case $mime in
image/*) viu $1 ;;
*) bat $1 --color=always ;;
esac