blob: fa4e307deff9dba2835eea242f483dfcc41a5976 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Due to the fact that ueberzug is no longer maintained and
# adds extra complexity, it is not included in the configuration."
# Options
set incsearch
set scrolloff 4 # Smooth scrolling
# Bindings
map <enter> shell
map m push $mkdir<space>
map t push $touch<space>
map D trash
map <c-f> $lf -remote "send $id select \"$(fzf --reverse)\""
map x $$f # Execute current file (must be executable)
map zb :{{ set sortby natural; set info size; set preview; set ratios 5:2; }}
map zz :{{ set preview; set ratios 1:2:3; }}
# Directory change keybinds (some overwrite default ones)
# <c-h> and <c-k> might fail on some terminal emulators
map <c-h> cd ~/
map <c-p> cd ~/proj
map <c-t> cd ~/tproj
map <c-k> cd /tmp
map <c-w> cd ~/work
# Theme
set cursoractivefmt "\033[0;1;7m"
set cursorparentfmt "\033[0;1;7m"
set tagfmt "\033[32;1;7m"
set rulerfmt "\033[32;1;7m"
set promptfmt "\033[48;1;234m %w/%f"
# Use a custom separator to safely split filenames that contain spaces.
set filesep " / "
cmd trash ${{
set -f
mkdir -p ~/.trash
echo "$fx" | sed 's/ \/ /\n/g' | while IFS= read -r file; do
tmp=~/.trash/$(basename -- "${file}")
trash_path=$(printf '%s' "$tmp" | tr ' ' '_')
if [ -e "${trash_path}" ]; then
printf '%s exists\n' "${trash_path}" >&2
trash_path="${trash_path}_$(date +%s)_$RANDOM"
printf 'moving to %s\n' "${trash_path}" >&2
fi
mv -- "${file}" "${trash_path}"
done
}}
|