summaryrefslogtreecommitdiff
path: root/.config/lf/lfrc
blob: 5971a0a4a57d674e1a06aaabc388226a021ef1f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
set shell sh
set shellopts '-eu'
set ifs "\n"
set scrolloff 10
set hidden
set icons

set previewer ctpv
set cleaner ctpvclear
&ctpv -s $id
cmd on-quit $ctpv -e $id

cmd open ${{
    test -L $f && f=$(readlink -f $f)
    case $(file --mime-type $f -b) in
        text/*) $EDITOR $fx;;
        *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
    esac
}}

cmd on-cd &{{
   printf "\033]0; $(pwd | sed "s|$HOME|~|") - lf\007" > /dev/tty
}}
on-cd