summaryrefslogtreecommitdiff
path: root/.config/yash/profile
diff options
context:
space:
mode:
authormhsn <mail@mhsn.net>2025-10-02 16:31:39 +0100
committermhsn <mail@mhsn.net>2025-10-02 16:31:39 +0100
commit98635f24a1b5a3781c82baada3956a2b9aee6467 (patch)
tree31ef618b04ca17b4be7748bcea15b8062ea23ada /.config/yash/profile
downloaddotfiles-98635f24a1b5a3781c82baada3956a2b9aee6467.tar.gz
dotfiles-98635f24a1b5a3781c82baada3956a2b9aee6467.zip
yash configs
Diffstat (limited to '.config/yash/profile')
-rw-r--r--.config/yash/profile38
1 files changed, 38 insertions, 0 deletions
diff --git a/.config/yash/profile b/.config/yash/profile
new file mode 100644
index 0000000..cc445cf
--- /dev/null
+++ b/.config/yash/profile
@@ -0,0 +1,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