blob: 9a0859d12669c3e4faf82ff321f28f7611b75bde (
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
#!/bin/sh
##--Environment variables--##
## Modified env vars.
export PATH="$PATH:$(du -L "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
## Useful vars.
export MAINMON="DP-2"
export SECMON="HDMI-1"
## Default programs.
export EDITOR="nvim"
export TERMINAL="alacritty"
export BROWSER="firefox"
export READER="zathura"
export FILE="ranger"
# export MUSIC="spotify"
export MAILMGR="thunderbird"
# export MSGCHAT="telegram-desktop"
export SSMGR="flameshot"
export SSPATH="$HOME/pix/ss/"
## ~/ cleanup.
# XDG base directory specification found in:
# https://wiki.archlinux.org/index.php/XDG_Base_Directory
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
# Ruby/gem.
export GEM_HOME="$XDG_DATA_HOME/gem"
export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem"
export PATH="$PATH:$GEM_HOME/bin"
# Older way of handling ruby/gem.
# if command -v ruby >/dev/null 2>&1; then
# export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
# fi
# Node.js.
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
export NVM_DIR="$XDG_DATA_HOME/nvm"
export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history"
# Ncurses.
export TERMINFO="$XDG_DATA_HOME/terminfo"
export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo:/usr/share/terminfo"
# GTK.
export GTK_RC_FILES="$XDG_CONFIG_HOME/gtk-1.0/gtkrc"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
# Jupyter lab.
export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter"
export JUPYTERLAB_DIR="$XDG_DATA_HOME/jupyter/lab"
# Other.
export MYCLI_HISTFILE="$XDG_CACHE_HOME/mycli/history"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export GOPATH="$XDG_DATA_HOME/go"
export TEXMFHOME="$XDG_DATA_HOME/texmf"
export LESSHISTFILE="-"
export HISTFILE="$XDG_DATA_HOME/history"
export WGETRC="$XDG_CONFIG_HOME/wgetrc"
export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
export IPYTHONDIR="$XDG_CONFIG_HOME/ipython"
# export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
# export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
# export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
# export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc"
# export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
# export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
# export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
# export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
# export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
# export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
# export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
# export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
# export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat"
## Less.
# There are definitions for less to not make history file above on ~/ cleanup.
export LESS=-R
# Taken from LS's dots. Not sure if should keep the '\e', since without it
# less freaks out. Also, more info on the following links:
# https://unix.stackexchange.com/questions/108699/documentation-on-less-termcap-variables
# https://misc.flogisoft.com/bash/tip_colors_and_formatting
# At last, I changed the codes to actually do what they're supposed to do.
export LESS_TERMCAP_mb="$(printf '%b' '\e[5;31m')"
export LESS_TERMCAP_md="$(printf '%b' '\e[1;36m')"
export LESS_TERMCAP_me="$(printf '%b' '\e[0m')"
export LESS_TERMCAP_so="$(printf '%b' '\e[1;45;33m')"
export LESS_TERMCAP_se="$(printf '%b' '\e[0m')"
export LESS_TERMCAP_us="$(printf '%b' '\e[4;32m')"
export LESS_TERMCAP_ue="$(printf '%b' '\e[0m')"
# What these termcap variables mean:
# termcap terminfo
# ks smkx make the keypad send commands
# ke rmkx make the keypad send digits
# vb flash emit visual bell
# mb blink start blink
# md bold start bold
# me sgr0 turn off bold, blink and underline
# so smso start standout (reverse video)
# se rmso stop standout
# us smul start underline
# ue rmul stop underline
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
## Ranger.
export RANGER_LOAD_DEFAULT_RC=FALSE
## CUDA.
# There is a definition for the cuda cache path above on ~/ cleanup.
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/cuda/lib64"
## Tensorflow.
export TF_CPP_MIN_LOG_LEVEL="0"
# 0 = all messages are logged (default behavior)
# 1 = INFO messages are not printed
# 2 = INFO and WARNING messages are not printed
# 3 = INFO, WARNING, and ERROR messages are not printed
## TexLive.
# There is a definition for the texmf home above in ~/ cleanup.
export TEXMFDIST=/usr/share/texmf-dist
## qBittorrent.
export QT_AUTO_SCREEN_SCALE_FACTOR=0
## Java.
# This is for blank window on window managers.
export _JAVA_AWT_WM_NONREPARENTING=1
## Crypto stuff.
export ELECTRUMDIR="$XDG_DATA_HOME/electrum"
##--Start X automatically--##
# Following: https://wiki.archlinux.org/index.php/Xinit#Autostart_X_at_login
# More on autologin and autostarting x without a DM:
# https://forums.bunsenlabs.org/viewtopic.php?id=5544
# Also LS's config could be important here:
# ttps://github.com/LukeSmithxyz/voidrice/blob/master/.config/shell/profile
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
exec startx
fi
|