summaryrefslogtreecommitdiff
path: root/darwin
diff options
context:
space:
mode:
Diffstat (limited to 'darwin')
-rw-r--r--darwin/home.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/darwin/home.nix b/darwin/home.nix
index 5ae2bd0..626d4b9 100644
--- a/darwin/home.nix
+++ b/darwin/home.nix
@@ -77,4 +77,41 @@
77 signByDefault = true; 77 signByDefault = true;
78 }; 78 };
79 }; 79 };
80 programs.lf = {
81 enable = true;
82 settings = {
83 shell = "sh";
84 icons = true;
85 drawbox = true;
86 scrolloff = 10;
87 shellopts = "-eu";
88 };
89 commands = {
90 extract = ''
91 %{{
92 set -f
93 case $f in
94 *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
95 *.tar.gz|*.tgz) tar xzvf $f;;
96 *.tar.xz|*.txz) tar xJvf $f;;
97 *.zip) unzip $f;;
98 *.rar) unrar x $f;;
99 *.7z) 7z x $f;;
100 esac
101 }}
102 '';
103 open = ''
104 %{{
105 case $(file --mime-type -Lb $f) in
106 text/*) lf -remote "send $id \$$EDITOR \$fx";;
107 *) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
108 esac
109 }}
110 '';
111 };
112 keybindings = {
113 "<enter>" = "shell";
114 "." = "set hidden!";
115 };
116 };
80} 117}