ctpv
ctpv copied to clipboard
chafa: Unknown option -f when using lf
met this issue after installed chafa and ctpv in ubuntu:
apt install chafa libmagic-dev
git clone https://github.com/NikitaIvanovV/ctpv
cd ctpv
make
sudo make install
lfrc:
set previewer ctpv
set cleaner ctpvclear
&ctpv -s $id
&ctpvquit $id
# Basic Settings
set hidden true
set ignorecase true
set icons true
# Custom Functions
cmd mkdir ${{
printf "Directory Name: "
read ans
mkdir $ans
}}
cmd mkfile ${{
printf "File Name: "
read ans
nvim $ans
}}
# Archive bindings
cmd unarchive ${{
case "$f" in
*.zip) unzip "$f" ;;
*.tar.gz) tar -xzvf "$f" ;;
*.tar.bz2) tar -xjvf "$f" ;;
*.tar) tar -xvf "$f" ;;
*) echo "Unsupported format" ;;
esac
}}
# nvim
cmd open_nvim ${{
nvim
}}
cmd open_nvim_file ${{
nvim "$f"
}}
# fuzzy finder
cmd fzf_jump ${{
res="$(find . -maxdepth 1 | fzf --reverse --header='Jump to location')"
if [ -n "$res" ]; then
if [ -d "$res" ]; then
cmd="cd"
else
cmd="select"
fi
res="$(printf '%s' "$res" | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id $cmd \"$res\""
fi
}}
map <c-f> :fzf_jump
map E :open_nvim
map e :open_nvim_file
# Bindings
map d
map m
map c $vscodium "$f"
map au unarchive
map ae $wine "$f"
# Basic Functions
map . set hidden!
map dd trash
map dr restore_trash
map p paste
map x cut
map y copy
map <enter> open
map <backspace2> :updir
map J :updir; down; open
map K :updir; up; open
map R reload
map mf mkfile
map md mkdir
map bg setwallpaper
map C clear
map S shell
# Movement
map gn cd ~/.config/nvim
map gl cd ~/.config/lf
map gw cd ~/work
map gh cd ~
map ga cd ~/app
map gt cd ~/.local/share/Trash/files
then this happend:
i don't know why, is it about the version of chafa? i'm using apt install in ubuntu:
❯ chafa --version
Chafa version 1.2.1
Features: mmx sse4.1 popcnt
Applying: mmx sse4.1 popcnt
Copyright (C) 2018 Hans Petter Jansson et al.
Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.