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