aboutsummaryrefslogtreecommitdiff
path: root/dot-profile
blob: 0224be760c1bff1fb09f69a2a441e90a19678a42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# vim: ft=sh

#
# 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 installed vim; then
	export EDITOR=vim
	export VISUAL=vim
fi

# HISTORY
export HISTFILE=~/.cache/bash_history

# LESS
export LESS="-R"
export LESSCHARSET=utf-8
export LESSHISTFILE=~/.cache/less_history
export LESS_TERMCAP_mb=$'\e[01;33m'       # begin blinking
export LESS_TERMCAP_md=$'\e[01;33m'       # begin bold
export LESS_TERMCAP_me=$'\e[0m'           # end all mode like so, us, mb, md, mr
export LESS_TERMCAP_so=$'\e[7m'           # start standout mode
export LESS_TERMCAP_se=$'\e[0m'           # end standout-mode
export LESS_TERMCAP_us=$'\e[1;37m'        # start underlining
export LESS_TERMCAP_ue=$'\e[0m'           # end underline

# BEMENU
if installed bemenu; then
	fg="#eeeeee"
	bg="#000000"
	mg="#111111"
	hl="#00ffff"

	export BEMENU_OPTS="
	--ignorecase \
	--no-spacing \
	--width-factor 0.4 \
	--line-height 20 \
	--list 10 \
	--border 2 \
	--border-radius 5 \
	--prompt '>' \
	--scroll always \
	--single-instance \
	--bdr $hl \
	--tb $mg --tf $hl \
	--cb $fg --cf $fg \
	--nb $bg --nf $fg \
	--hb $hl --hf $bg \
	--fb $mg --ff $fg \
	--sb '#00ff00' --sf '#0000ff' \
	--ab $bg --af $fg \
	--scb $bg --scf $hl
	"
fi

# GUI THEMES
export QT_QPA_PLATFORMTHEME=gtk3

# AUTOSTART WINDOW MANAGER
if [ -z $DISPLAY  ] && [ $(tty) = /dev/tty1 ]; then
	export XDG_CURRENT_DESKTOP=sway
	dbus-run-session sway
fi