aboutsummaryrefslogtreecommitdiff
path: root/.config/lf/lfrc
blob: 685f374754732b5a013a5d3b32adca8119a1e915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;;
    *) 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