From 93a8056104a89d4b8ab5b7e29160df5f1826adb3 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 11 Jun 2020 23:02:44 +0200 Subject: [PATCH] feat: added aliases + SSH_AUTH_SOCK + set lazy plugin loading --- zshrc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/zshrc b/zshrc index eaab8d4..4825273 100644 --- a/zshrc +++ b/zshrc @@ -5,10 +5,10 @@ #zplug "zsh-users/zsh-syntax-highlighting" zplug "zdharma/fast-syntax-highlighting" zplug "zsh-users/zsh-history-substring-search" - zplug "plugins/git", from:oh-my-zsh - zplug "plugins/gitignore", from:oh-my-zsh - zplug "plugins/systemd", from:oh-my-zsh - zplug "plugins/dnf", from:oh-my-zsh + zplug "plugins/git", from:oh-my-zsh, defer:2 + zplug "plugins/gitignore", from:oh-my-zsh, defer:2 + zplug "plugins/systemd", from:oh-my-zsh, defer:2 + zplug "plugins/dnf", from:oh-my-zsh, defer:2 # Install plugins if there are plugins that have not been installed if ! zplug check --verbose; then @@ -126,12 +126,20 @@ export http_proxy="http://localhost:8118" export QT_QPA_PLATFORMTHEME="qt5ct" + 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 + ssh-add -l > /dev/null || ssh-add > /dev/null if [ -n "$DESKTOP_SESSION" ];then eval $(gnome-keyring-daemon --start) export SSH_AUTH_SOCK fi + export EDITOR='vim' export TERM='xterm-256color' # export ARCHFLAGS="-arch x86_64" @@ -170,6 +178,9 @@ alias tmpdir='nutmp=$(mktemp -d);cd "$nutmp";unset nutmp' alias wolm='wol d4:3d:7e:53:c2:b1' alias ta='tmux a -t0' + alias dc='docker-compose' + alias urlencode='python2 -c "import urllib, sys; print urllib.quote_plus( sys.argv[1] if len(sys.argv) > 1 else sys.stdin.read()[0:-1], \"\")"' + alias urldecode='python2 -c "import urllib, sys; print urllib.unquote_plus(sys.argv[1] if len(sys.argv) > 1 else sys.stdin.read()[0:-1])"' export ANDROID_HOME=$HOME/utils/Android/Sdk export PATH=$PATH:$ANDROID_HOME/tools