*copy working image previews lf config to repo
*set zsh to show colorscript -r at startupmaster
parent
ef5914ad58
commit
369e5dd7e8
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
img () {
|
||||||
|
chafa "$1" --size="$2"x"$3" | sed 's/#/\n#/g'
|
||||||
|
}
|
||||||
|
|
||||||
W="$(($(tput cols)/2 - 10))"
|
W="$(($(tput cols)/2 - 10))"
|
||||||
#H="$(tput lines)"
|
#H="$(tput lines)"
|
||||||
|
|
||||||
|
@ -14,9 +18,9 @@ case "$fn" in
|
||||||
*.zip) unzip -l "$1";;
|
*.zip) unzip -l "$1";;
|
||||||
*.rar) unrar l "$1";;
|
*.rar) unrar l "$1";;
|
||||||
*.7z) 7z l "$1";;
|
*.7z) 7z l "$1";;
|
||||||
*.jpg | *.JPG | *.jpeg) chafa "$fn" --size="$w"x"$h" ;;#viu -t "$1" -w "$2" ;;
|
*.jpg | *.JPG | *.jpeg) img "$fn" "$w" "$h";;
|
||||||
*.png | *.svg | *.gif) chafa "$fn" --size="$w"x"$h" ;;
|
*.png | *.svg | *.gif) img "$fn" "$w" "$h";; #viu -t "$1" -w "$W" ;; #chafa "$fn" --size="$w"x"$h" ;;
|
||||||
*.mp4 | *.mkv | *.webm | *.avi | *.mpg | *.mpeg | *.ogv | *.flv | *.wmv | *.WMV) ffmpegthumbnailer -i "$fn" -c jpeg -o - | chafa - --size="$w"x"$h";;
|
*.mp4 | *.mkv | *.webm | *.avi | *.mpg | *.mpeg | *.ogv | *.flv | *.wmv | *.WMV) ffmpegthumbnailer -i "$fn" -c jpeg -o - | img - "$w" "$h";;
|
||||||
*.pdf) pdftotext "$1" -;;
|
*.pdf) pdftotext "$1" -;;
|
||||||
*) bat -f "$1";; #*) highlight -O ansi "$1" || cat "$1";;
|
*) bat -f "$1";; #*) highlight -O ansi "$1" || cat "$1";;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -82,7 +82,7 @@ if ! [ -f $HOME/.local/share/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# prompt stuff
|
# prompt stuff
|
||||||
pfetch
|
colorscript -r
|
||||||
|
|
||||||
#if [ -f "/usr/bin/starship" ]; then
|
#if [ -f "/usr/bin/starship" ]; then
|
||||||
# eval "$(starship init zsh)"
|
# eval "$(starship init zsh)"
|
||||||
|
|
Loading…
Reference in New Issue