diff options
author | Yigit Sever | 2020-06-17 13:54:14 +0300 |
---|---|---|
committer | Yigit Sever | 2020-06-17 13:54:14 +0300 |
commit | 49032218a03fd4c6b991004a2d64cfb94d83a682 (patch) | |
tree | 283334e92ad447e674a322ca34bd16fc87171018 | |
parent | 384e750b1d43665b151cfccfcd930463cafffc1b (diff) | |
download | dotfiles-49032218a03fd4c6b991004a2d64cfb94d83a682.tar.gz dotfiles-49032218a03fd4c6b991004a2d64cfb94d83a682.tar.bz2 dotfiles-49032218a03fd4c6b991004a2d64cfb94d83a682.zip |
nnn config
-rw-r--r-- | .zshrc | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -165,5 +165,38 @@ function te { | |||
165 | 165 | ||
166 | source /home/yigit/.config/broot/launcher/bash/br | 166 | source /home/yigit/.config/broot/launcher/bash/br |
167 | 167 | ||
168 | n () | ||
169 | { | ||
170 | # Block nesting of nnn in subshells | ||
171 | if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then | ||
172 | echo "nnn is already running" | ||
173 | return | ||
174 | fi | ||
175 | |||
176 | # The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set) | ||
177 | # To cd on quit only on ^G, remove the "export" as in: | ||
178 | # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" | ||
179 | # NOTE: NNN_TMPFILE is fixed, should not be modified | ||
180 | NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" | ||
181 | export NNN_OPENER=nuke | ||
182 | |||
183 | # Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn | ||
184 | # stty start undef | ||
185 | # stty stop undef | ||
186 | # stty lwrap undef | ||
187 | # stty lnext undef | ||
188 | |||
189 | nnn -c "$@" | ||
190 | |||
191 | if [ -f "$NNN_TMPFILE" ]; then | ||
192 | . "$NNN_TMPFILE" | ||
193 | rm -f "$NNN_TMPFILE" > /dev/null | ||
194 | fi | ||
195 | } | ||
196 | |||
197 | export NNN_BMS='w:~/Nextcloud/personal_wiki;r:~/Nextcloud/remind' | ||
198 | export NNN_COLORS="2136" # use a different color for each context | ||
199 | export NNN_PLUG='d:dragdrop' | ||
200 | |||
168 | # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | 201 | # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. |
169 | export PATH="$PATH:$HOME/.rvm/bin" | 202 | export PATH="$PATH:$HOME/.rvm/bin" |