1
0
Fork 0
dotfiles/common/.config/zsh/.zprofile

151 lines
4.8 KiB
Plaintext
Raw Normal View History

2023-04-04 17:44:51 +02:00
#!/bin/zsh
2024-02-26 10:19:04 +01:00
set +a
2023-03-29 16:15:06 +02:00
# profile file. Runs on login. Environmental variables are set here.
2023-06-04 11:31:11 +02:00
# If you don't want this in your home directory, execute this command and move this file
# echo 'export ZDOTDIR="$HOME/.config/zsh"' | sudo tee -a /etc/zsh/zshenv
2023-03-29 16:15:06 +02:00
export EDITOR="nvim"
export TERMINAL="st"
2024-02-01 10:50:28 +01:00
export TERMCMD=$TERMINAL
export OPENER=opener
2024-06-10 14:33:47 +02:00
export BROWSER="firefox"
2023-03-29 16:15:06 +02:00
2024-01-02 19:03:09 +01:00
# Locale
2024-02-19 14:49:31 +01:00
export LANGUAGE="en_US"
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="de_DE.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_MONETARY="de_DE.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_PAPER="en_US.UTF-8"
export LC_NAME="en_US.UTF-8"
export LC_ADDRESS="en_US.UTF-8"
export LC_TELEPHONE="en_US.UTF-8"
export LC_MEASUREMENT="de_DE.UTF-8"
export LC_IDENTIFICATION="en_US.UTF-8"
export LC_ALL=
2023-04-11 10:30:27 +02:00
# Settings
export VIRTUAL_ENV_DISABLE_PROMPT=1
2024-01-31 10:53:35 +01:00
export FZF_DEFAULT_OPTS="\
2024-09-24 13:44:28 +02:00
--preview-window nowrap \
2024-06-10 23:04:52 +02:00
--layout=reverse --cycle \
2024-01-31 10:53:35 +01:00
--color=fg:#c0caf5,bg:,hl:#ff9e64 \
--color=fg+:#c0caf5,bg+:,hl+:#ff9e64 \
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff \
2024-06-10 23:04:52 +02:00
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a \
"
2023-05-29 21:49:55 +02:00
export LESS=-R
2024-06-10 23:05:02 +02:00
export LESSOPEN="| /usr/bin/bat -f %s 2>/dev/null"
2024-01-13 15:10:31 +01:00
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
2024-05-24 21:01:25 +02:00
# dotfiles management
export STOW_DIR="$XDG_DATA_HOME/stow"
2024-09-25 13:49:24 +02:00
export STOW_REPO="git@git.snaile.de:luca/dotfiles"
export STOW_BRANCH="main"
2023-05-29 21:49:55 +02:00
# Color palette for console dialogs in tools such as nmtui and whiptail
export NEWT_COLORS='
2023-05-29 21:49:55 +02:00
root=white,black
border=black,lightgray
window=lightgray,lightgray
shadow=black,gray
title=black,lightgray
button=black,blue
actbutton=white,blue
2023-05-29 21:49:55 +02:00
compactbutton=black,lightgray
checkbox=black,lightgray
actcheckbox=lightgray,blue
2023-05-29 21:49:55 +02:00
entry=black,lightgray
disentry=gray,lightgray
label=black,lightgray
listbox=black,lightgray
actlistbox=black,blue
2023-05-29 21:49:55 +02:00
sellistbox=lightgray,black
actsellistbox=lightgray,black
textbox=black,lightgray
acttextbox=black,blue
2023-05-29 21:49:55 +02:00
emptyscale=,gray
fullscale=,blue
2023-05-29 21:49:55 +02:00
helpline=white,black
roottext=lightgrey,black
'
2023-04-11 10:30:27 +02:00
# Home Dir Cleanup
2024-02-27 10:15:52 +01:00
2024-02-28 02:08:27 +01:00
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_STATE_HOME="$HOME/.local/state"
2024-02-27 10:15:52 +01:00
2023-05-24 16:53:44 +02:00
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
2024-02-26 10:19:04 +01:00
set -a
source $XDG_CONFIG_HOME/user-dirs.dirs
set +a
2023-05-24 16:53:44 +02:00
2023-03-29 16:15:06 +02:00
export ANDROID_HOME="$XDG_DATA_HOME/android"
2024-02-28 20:39:46 +01:00
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy"
export ANSIBLE_GALAXY_TOKEN_PATH="$XDG_DATA_HOME/ansible/galaxy_token"
2024-06-26 15:49:35 +02:00
export ANSIBLE_HOME="$XDG_DATA_HOME/ansible"
export ANSIBLE_LOCAL_TMP="$XDG_CACHE_HOME/ansible/tmp"
2024-02-28 20:39:46 +01:00
export ANSIBLE_PERSISTENT_CONTROL_PATH_DIR="$XDG_RUNTIME_DIR/ansible_pc.sock"
2024-06-26 15:49:35 +02:00
export CARGO_HOME="$XDG_DATA_HOME/cargo"
2023-04-11 10:30:27 +02:00
export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
2024-06-26 15:49:35 +02:00
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
export GOPATH="$XDG_DATA_HOME/go"
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
export PERL_CPANM_HOME="$XDG_CACHE_HOME/cpanm"
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/.config}/gtk-2.0/gtkrc-2.0"
export HISTFILE="$XDG_DATA_HOME/history"
export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
export LESSHISTFILE="-"
2023-04-11 10:30:27 +02:00
export MOZBUILD_STATE_PATH="$XDG_DATA_HOME/mozbuild"
2024-06-26 15:49:35 +02:00
export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history"
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
2023-06-30 10:01:40 +02:00
export PYTHONSTARTUP="/etc/python/pythonrc"
2024-06-26 15:49:35 +02:00
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export SVDIR="$HOME/.local/sv"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export UNISON="$XDG_DATA_HOME/unison"
export W3M_DIR="$XDG_DATA_HOME/w3m"
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
export WORKON_HOME="$XDG_DATA_HOME/virtualenv"
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # WARN: This line can break some display managers
2024-05-21 11:42:12 +02:00
export XBPS_DISTDIR="$XDG_DOCUMENTS_DIR/dev/server/void-packages"
2024-04-13 22:33:29 +02:00
export ZK_NOTEBOOK_DIR="$XDG_DOCUMENTS_DIR/notes"
2024-06-26 15:49:35 +02:00
export ZSH_COMPDUMP="$XDG_CACHE_HOME/zcompdump"
export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java"
export GIT_SIGN_FALLBACK_KEY_IDS="config"
2023-03-29 16:15:06 +02:00
2024-06-26 15:49:35 +02:00
localpath=""
2024-01-23 14:45:54 +01:00
export PATH="$PATH:$localpath"
2024-06-26 15:49:35 +02:00
for NEW_PATH in \
2024-06-26 18:52:57 +02:00
"${PNPM_HOME}" \
"${XDG_DATA_HOME}/cargo/bin" \
"${XDG_CONFIG_HOME}/composer/vendor/bin" \
2024-08-08 15:09:34 +02:00
"$(gem environment gempath)/bin" \
2024-07-31 11:21:00 +02:00
"$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" \
"${GOPATH}/bin"
2024-06-26 15:49:35 +02:00
do
2024-07-30 19:55:01 +02:00
case ":${PATH}:" in
*":${NEW_PATH}:"*) ;;
*) export PATH="${NEW_PATH}:${PATH}" ;;
2024-06-26 15:49:35 +02:00
esac
done
2023-06-01 12:38:34 +02:00
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
2024-02-04 11:39:44 +01:00
exec startx $XINITRC
fi