summaryrefslogtreecommitdiff
path: root/.config/yash/profile
blob: cc445cf768d43ee633504912b372232d255409fe (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
# vim: filetype=sh

# load system profile
[ -e /etc/profile.env ] && . /etc/profile.env

if [ -z $XDG_RUNTIME_DIR ]; then
    export XDG_RUNTIME_DIR=/tmp/$(whoami)-runtime-dir
    [ -d $XDG_RUNTIME_DIR ] || mkdir $XDG_RUNTIME_DIR
fi

export XDG_CACHE_HOME=$HOME/.cache
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state

# clean up files
export ANDROID_USER_HOME=$XDG_DATA_HOME/android
export CARGO_HOME=$XDG_DATA_HOME/cargo
export GNUPGHOME=$XDG_STATE_HOME/gnupg
export ICEAUTHORITY=$XDG_CACHE_HOME/ICEauthority
export PARALLEL_HOME=$XDG_CONFIG_HOME/parallel
export PASSWORD_STORE_DIR=~/priv/pass
export PYTHON_HISTORY=$XDG_CACHE_HOME/python_history
export RUSTUP_HOME=$XDG_DATA_HOME/rustup
export SQLITE_HISTORY=$XDG_CACHE_HOME/sqlite_history
export XAUTHORITY=$XDG_RUNTIME_DIR/Xauthority
export XINITRC=$XDG_CONFIG_HOME/X11/xinitrc

export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.local/share/cargo/bin:$PATH

# stop here if root
[ $(id -u) -eq 0 ] && return

# use gpg-agent over ssh-agent
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
    export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi