feat: move stuff to .zprofile

* track .zprofile
This commit is contained in:
surtur 2020-11-02 19:38:16 +01:00
parent e68c95d276
commit d14a69bd28
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 42 additions and 1 deletions

36
.zprofile Normal file

@ -0,0 +1,36 @@
export PATH="$HOME/.local/bin:$HOME/utils/bin:$HOME/.cargo/bin:$GOPATH/bin:$PATH"
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent` > /dev/null
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
if [ -n "$DESKTOP_SESSION" ];then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
fi
if [[ -z "$WAYLAND_DISPLAY" ]]; then
export QT_QPA_PLATFORMTHEME=wayland
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export MOZ_DBUS_REMOTE=1
export MOZ_USE_XINPUT2=1
export _JAVA_AWT_WM_NONREPARENTING=1
export KITTY_ENABLE_WAYLAND=1
export BEMENU_BACKEND=wayland
else
export QT_QPA_PLATFORMTHEME="qt5ct"
fi
export DOTNET_CLI_TELEMETRY_OPTOUT=1 # why do I always have to take care of this myself...
export ANDROID_HOME=$HOME/utils/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_SDK_PATH=$ANDROID_HOME
export ANDROID_NDK_PATH=$ANDROID_HOME/ndk-bundle
export AndroidSdkPath=$ANDROID_HOME
export AndroidNdkPath=$ANDROID_NDK_PATH

7
zshrc

@ -132,13 +132,13 @@
# initialise completions with ZSH's compinit # initialise completions with ZSH's compinit
autoload -Uz compinit autoload -Uz compinit
compinit compinit
source ~/.zprofile
source ~/.dotenv source ~/.dotenv
export PATH="$HOME/.local/bin:$HOME/utils/bin:$HOME/.cargo/bin:$GOPATH/bin:$PATH" export PATH="$HOME/.local/bin:$HOME/utils/bin:$HOME/.cargo/bin:$GOPATH/bin:$PATH"
# You may need to manually set your language environment # You may need to manually set your language environment
export LANG=en_GB.UTF-8 export LANG=en_GB.UTF-8
export http_proxy="http://localhost:8118" export http_proxy="http://localhost:8118"
export QT_QPA_PLATFORMTHEME="qt5ct"
if [ ! -S ~/.ssh/ssh_auth_sock ]; then if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent` > /dev/null eval `ssh-agent` > /dev/null
@ -198,6 +198,10 @@
export ANDROID_SDK_ROOT=$ANDROID_HOME export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_SDK_PATH=$ANDROID_HOME export ANDROID_SDK_PATH=$ANDROID_HOME
export ANDROID_NDK_PATH=$ANDROID_HOME/ndk-bundle export ANDROID_NDK_PATH=$ANDROID_HOME/ndk-bundle
export AndroidSdkPath=$ANDROID_HOME
export AndroidNdkPath=$ANDROID_NDK_PATH
export WORKON_HOME=~/utils/venv export WORKON_HOME=~/utils/venv
#source utils/venv/bin/activate #source utils/venv/bin/activate
export PIP_VIRTUALENV_BASE=~/utils/venv export PIP_VIRTUALENV_BASE=~/utils/venv
@ -209,3 +213,4 @@
#bindkey -v # enabled ohmyzsh vi-mode - more customizable than the original #bindkey -v # enabled ohmyzsh vi-mode - more customizable than the original
transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi;tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi;tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }