about summary refs log tree commit diff
path: root/profile/.profile.d/nnn.sh
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>1970-01-01 03:00:00 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-20 11:51:54 +0300
commit38bab29776950ac2364ed64195b89887717c33de (patch)
treeedaaf366a55dbe96d268019124536bc504c64e87 /profile/.profile.d/nnn.sh
chore: init HEAD master
Diffstat (limited to 'profile/.profile.d/nnn.sh')
-rw-r--r--profile/.profile.d/nnn.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/profile/.profile.d/nnn.sh b/profile/.profile.d/nnn.sh
new file mode 100644
index 0000000..3890592
--- /dev/null
+++ b/profile/.profile.d/nnn.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if command -v nnn >/dev/null 2>&1; then
+	export NNN_BMS="h:~;s:~/src;d:~/downloads;e:/etc;u:/usr;p:/etc/portage;t:/tmp"
+	export NNN_PLUG="j:autojump"
+	export NNN_MULTISCRIPT=1
+	export NNN_NO_AUTOSELECT=1
+	export NNN_OPENER="nuke"
+	export NNN_QUOTE_ON=1
+	export NNN_TMPFILE="${XDG_CACHE_HOME}/nnn"
+	export NNN_TRASH=0
+	export NNN_USE_EDITOR=1
+
+	alias f="nnn"
+
+	# shellcheck disable=SC2139
+	alias ncp="cat ${NNN_TMPFILE}/.selection | tr '\0' '\n'"
+fi

Consider giving Nix/NixOS a try! <3