init
[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 gs. cd ~/School
27 map gsc cd ~/School/cs145
28 map gsm5 cd ~/School/math135
29 map gsm7 cd ~/School/math137
30 map gsp cd ~/School/phys121
31 map gss cd ~/School/spcom223
32
33 # config
34 map gc. cd ~/.config
35
36 # music
37 map gm. cd ~/Music
38 map gd. cd ~/Downloads
39
40 # install
41 map gi. cd ~/installs
42
43 # repos
44 map gr. cd ~/Repos
45
46 # define a custom 'open' command
47 # This command is called when current file is not a directory. You may want to
48 # use either file extensions and/or mime types here. Below uses an editor for
49 # text files and a file opener for the rest.
50 cmd open ${{
51     case $(file --mime-type $f -b) in
52         text/*) $EDITOR $fx;;
53         *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
54     esac
55 }}
56
57 cmd mkdir % echo "New directory name:"; read dirname; mkdir $dirname
58
59 cmd touch %echo  "New file name:"; read filename; touch $filename
60