-
Notifications
You must be signed in to change notification settings - Fork 0
/
.profile
144 lines (120 loc) · 3.75 KB
/
.profile
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
142
143
144
#!/bin/sh
# Make sure that the PATH is updated exactly once {{{1
# (like an #ifdef guard in C)
if [ -z "$PATHSET" ]
then
export PATHSET=1
export PATH=~/bin:~/bin/rehome:~/perl5/bin:~/.cargo/bin:~/.gem/ruby/2.7.0/bin:"$PATH"
fi
# }}}1
# Enable IBus where possible {{{1
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
# }}}1
# Preferred programs {{{1
export EDITOR=vim
export MANPAGER='vim -M +MANPAGER +"setl nonumber" -'
# }}}1
# Disable gnome-keyring graphical SSH password prompts
# (see <https://askubuntu.com/a/163216/>)
unset SSH_AUTH_SOCK
export VDPAU_DRIVER=nvidia
# Fix Qt scaling issues
# https://github.com/keepassxreboot/keepassxc/issues/5029
# https://github.com/qutebrowser/qutebrowser/issues/7899
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR_ROUNDING_POLICY=round
# Use dmenu colors in bemenu
IFS='' read BEMENU_OPTS <<'EOF'
--tb '#005577' --tf '#eeeeee' \
--fb '#222222' --ff '#bbbbbb' \
--nb '#222222' --nf '#bbbbbb' \
--hb '#005577' --hf '#eeeeee' \
--sb '#005577' --sf '#eeeeee'
EOF
export BEMENU_OPTS
# Use qt5ct
export QT_QPA_PLATFORMTHEME=qt5ct
export GHC_FLAGS=-dynamic
# XDG Base Directory Specification environment variables {{{1
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
export XDG_DATA_HOME=~/.local/share
export XDG_CONFIG_HOME=~/.config
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_CACHE_HOME=~/.cache
# }}}1
# Export XDG user directories {{{1
. "$XDG_CONFIG_HOME"/user-dirs.dirs
export XDG_DESKTOP_DIR
export XDG_DOWNLOAD_DIR
export XDG_TEMPLATES_DIR
export XDG_PUBLICSHARE_DIR
export XDG_DOCUMENTS_DIR
export XDG_MUSIC_DIR
export XDG_PICTURES_DIR
export XDG_VIDEOS_DIR
# }}}1
# Make misbehaving programs put their configuration and data files in {{{1
# XDG directories
# Environment variables {{{2
# ~/.asy/
export ASYMPTOTE_HOME="$XDG_CONFIG_HOME"/asymptote/
# ~/.cargo/
export CARGO_HOME="$XDG_DATA_HOME"/cargo
# ~/go/
export GOPATH="$XDG_DATA_HOME"/go
# ~/.ipython/
export IPYTHONDIR="$XDG_CONFIG_HOME"/ipython
# ~/.Mathematica/
export MATHEMATICA_USERBASE="$XDG_DATA_HOME"/mathematica
# ~/.meteor/
export METEOR_WAREHOUSE_DIR="$XDG_DATA_HOME"/meteor
# ~/.nvm/
export NVM_DIR="$XDG_DATA_HOME"/nvm
# ~/.npmrc and ~/.npm/ (set in npmrc)
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
# ~/.sage/
export DOT_SAGE="$XDG_CONFIG_HOME"/sage
# ~/.XCompose
export XCOMPOSEFILE="$XDG_CONFIG_HOME"/ibus/Compose
# ~/.Xauthority
export XAUTHORITY="$XDG_DATA_HOME"/X11/Xauthority
# ~/.xinitrc
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
# ~/.bash_history/
export HISTFILE="$XDG_DATA_HOME"/bash/history
# ~/.node_repl_history/
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node/repl_history
# ~/.octave_hist/
export OCTAVE_HISTFILE="$XDG_DATA_HOME"/octave/history
# ~/.lesshst
# less(1) does not need a history file.
export LESSHISTFILE=-
# ~/.vimrc and ~/.vim/ (set in vimrc)
export MYVIMRC="$XDG_CONFIG_HOME"/vim/vimrc
export VIMINIT='source $MYVIMRC'
# ~/.pentadactylrc and ~/.pentadactyl/
export PENTADACTYL_RUNTIME="$XDG_CONFIG_HOME"/pentadactyl
export MY_PENTADACTYLRC="$XDG_CONFIG_HOME"/pentadactyl/pentadactylrc
export PENTADACTYL_INIT=':source $MY_PENTADACTYLRC'
# }}}2
# Aliases {{{2
# ~/.xinitrc
alias startx='startx $XINITRC'
# Enable Vim server (for SyncTeX)
alias vim='vim --servername VIM'
# }}}2
# }}}1
# Make sure ~/.xsession-errors points to /dev/null {{{1
# so that it does not grow to a huge size
# https://www.daniloaz.com/en/how-to-prevent-the-xsession-errors-file-from-growing-to-huge-size/
if [ ! -L "$HOME"/.xsession-errors ]
then
rm -f "$HOME"/.xsession-errors
ln -s /dev/null "$HOME"/.xsession-errors
fi
# }}}1
[ -e "$XDG_CONFIG_HOME/$(hostname).profile" ] && . "$XDG_CONFIG_HOME/$(hostname).profile"
# vim: set fdm=marker: