lf icon indicating copy to clipboard operation
lf copied to clipboard

How to set the default application for a file type?

Open kurkii opened this issue 2 years ago • 3 comments

When I open a PNG file, it gets opened with Librewolf, I want it to open with sxiv. I already set sxiv as default with mimeopen, yet lf doesnt seem to follow this.

Thanks

kurkii avatar Jul 30 '22 14:07 kurkii

lf's default opener on Linux is xdg-open, not mimeopen. See https://pkg.go.dev/github.com/gokcehan/lf#hdr-Opening_Files

lahwaacz avatar Jul 30 '22 15:07 lahwaacz

lf's default opener on Linux is xdg-open, not mimeopen. See https://pkg.go.dev/github.com/gokcehan/lf#hdr-Opening_Files

how could i make lf open with mimeos defaults?

kurkii avatar Jul 31 '22 17:07 kurkii

Hey, I have this cmd open:-

`cmd open ${{ case "$f" in

   *.html|*.htm|*.xml) firefox $fx  >/dev/null 2>&1 &;;
   *.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus) mpv $fx >/dev/null 2>&1 &;;
   *.bmp|*.jpg|*.jpeg|*.png|*.gif|*.xpm) swayimg $fx >/dev/null 2>&1 &;;
    *.pdf) zathura $fx >/dev/null 2>&1 &;;
    *.xopp) xournalpp.AppImage $fx >/dev/null 2>&1 &;;
    *.odt|*.doc|*.docx|*.xls|*.xlsx|*.odp|*.pptx) libreoffice $fx >/dev/null 2>&1 &;; 
    *) foot kak $fx >/dev/null 2>&1 &;;

  esac

}}` where dev null keep disable & send error null file and & keep application alive even after we close lf.

first u need to setup

set ifn "\n" need for fx (mutiple file open).

deepaknegilachu avatar Dec 23 '22 06:12 deepaknegilachu