aboutsummaryrefslogtreecommitdiff
path: root/.config/lf/lfrc
blob: 56ca258353acd945d3b75f0f1141d5dc7d50da30 (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
25
set ifs "\n"
set icons
set sixel true
set cleaner ~/.config/lf/cleaner
set previewer ~/.config/lf/scope

cmd open ${{
  case $(file --mime-type "$(readlink -f $f)" -b) in
    text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
    video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
    audio/*|video/x-ms-asf) mpv --audio-display=no $f ;;
    *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
  esac
}}

cmd delete ${{
	clear; tput cup $(($(tput lines)/3)); tput bold
	set -f
	printf "%s\n\t" "$fx"
	printf "delete?[y/N]"
	read ans
	[ $ans = "y" ] && rm -rf -- $fx
}}

map D delete