aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdot-profile22
1 files changed, 19 insertions, 3 deletions
diff --git a/dot-profile b/dot-profile
index fcf834b..0224be7 100755
--- a/dot-profile
+++ b/dot-profile
@@ -4,11 +4,27 @@
# PROFILE
#
+# FUNCTIONS
+installed() {
+ command -v $1 >/dev/null 2>&1
+}
+
# SCRIPTS
[ -d ~/repos/scripts ] && PATH=$PATH:~/repos/scripts
+# NODE & NPM
+# use ~/.local directory for global 'npm -g <PKG>' installs
+# and therefore not requiring root privileges
+export PATH=~/.local/bin:$PATH
+if installed node; then
+ export NODE_PATH=~/.local/lib/node_modules:$NODE_PATH
+fi
+if installed npm; then
+ export npm_config_prefix=~/.local
+fi
+
# EDITOR
-if command -v vim >/dev/null 2>&1; then
+if installed vim; then
export EDITOR=vim
export VISUAL=vim
fi
@@ -29,7 +45,7 @@ export LESS_TERMCAP_us=$'\e[1;37m' # start underlining
export LESS_TERMCAP_ue=$'\e[0m' # end underline
# BEMENU
-if command -v bemenu >/dev/null 2>&1; then
+if installed bemenu; then
fg="#eeeeee"
bg="#000000"
mg="#111111"
@@ -61,7 +77,7 @@ fi
# GUI THEMES
export QT_QPA_PLATFORMTHEME=gtk3
-# START SWAY
+# AUTOSTART WINDOW MANAGER
if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then
export XDG_CURRENT_DESKTOP=sway
dbus-run-session sway