about summary refs log tree commit diff stats
path: root/config/lf/lfrc
blob: 138c47048ac86a28fb011a68f39c43fa28d88d6f (plain) (blame)
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
26
27
28
29
30
# sets
set shell sh
set shellopts '-eu'
set ifs "\n"

set promptfmt "\033[1;31m%u\033[0;32m@\033[1;34m%h\033[0m:\033[1;36m%w/\033[0m\033[1m%f\033[0m"
# cmds
cmd open ${{
	opener $f
}}

cmd ttmsh ${{
	TTMURL="curl -F 'file=@-' https://ttm.sh < $f"
	if [ -n "$TTMURL" ]; then
		echo "$TTMURL"|tee "$HOME/ttmsh"|xclip -r
	done
	notify-send  'successfully uploaded to ttm!' 'link copied to selection, backup is in $HOME/ttmsh'
}}

cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1

# binds
map D delete
map a push %mkdir<space>
map r push :rename<space>
map <enter> shell
map R reload
map x $$f
map X !$f
map t ttmsh