Add kitty image previewer'
This commit is contained in:
parent
2876aa3991
commit
d356617460
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
file=$1
|
||||||
|
w=$2
|
||||||
|
h=$3
|
||||||
|
x=$4
|
||||||
|
y=$5
|
||||||
|
|
||||||
|
if [[ "$( file -Lb --mime-type "$file")" =~ ^image ]]; then
|
||||||
|
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pistol "$file"
|
|
@ -1,3 +1,7 @@
|
||||||
|
# kitty previewer
|
||||||
|
set previewer ~/.config/lf/lf_kitty_preview
|
||||||
|
set cleaner ~/.config/lf/lf_kitty_clean
|
||||||
|
|
||||||
# extract the current file with the right command
|
# extract the current file with the right command
|
||||||
# (xkcd link: https://xkcd.com/1168/)
|
# (xkcd link: https://xkcd.com/1168/)
|
||||||
cmd extract ${{
|
cmd extract ${{
|
||||||
|
|
Loading…
Reference in New Issue