update
[dotfiles.git] / .config / lf / lfrc
1
2 # unmap some stuff
3 map d
4
5
6
7 set icons true
8 set hidden true
9 map . set hidden!
10
11 set shell sh
12 set shellopts '-eu'
13 set ifs "\n"
14
15 # leave some space at the top and the bottom of the screen
16 set scrolloff 10
17
18 # use enter for shell commands
19 map <enter> shell
20
21 map dd delete
22
23 # =-=-=-=-= custom 'go to' commands
24
25 # school
26 map gd cd ~/Downloads
27 map gS cd ~/Scripts
28 map gs. cd ~/School
29 map gsc cd ~/School/cs145
30 map gsm5 cd ~/School/math135
31 map gsm7 cd ~/School/math137
32 map gsp cd ~/School/phys121
33 map gss cd ~/School/spcom223
34
35 # config
36 map gc. cd ~/.config
37
38 # music
39 map gm. cd ~/Music
40 map gd. cd ~/Downloads
41
42 # install
43 map gi. cd ~/installs
44
45 # repos
46 map gr. cd ~/Repos
47
48 # define a custom 'open' command
49 # This command is called when current file is not a directory. You may want to
50 # use either file extensions and/or mime types here. Below uses an editor for
51 # text files and a file opener for the rest.
52 cmd open ${{
53     case $(file --mime-type $f -b) in
54         text/*) $EDITOR $fx;;
55         *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
56     esac
57 }}
58
59 cmd mkdir % echo "New directory name:"; read dirname; mkdir $dirname
60
61 cmd touch %echo  "New file name:"; read filename; touch $filename
62