Compare commits

...

5 commits

Author SHA1 Message Date
3bf1da9427
update nvim 2024-03-08 18:37:39 +01:00
e7ab5fd04f
ssh-agent shenanigans 2024-03-08 18:37:39 +01:00
8e1ed5b9f4
pyenv 2024-03-08 18:37:39 +01:00
3ed8025e04
pyenv 2024-03-08 18:37:10 +01:00
9e56e7ba85
update nvim 2024-03-08 18:37:09 +01:00
4 changed files with 25 additions and 23 deletions

@ -1 +1 @@
Subproject commit 7de28493eb8103c71336144c4a9350002bfdbbb9 Subproject commit cd91bf774d4c964953160cf04c7e6b3bbd820baf

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
# except: # except:
!.zshrc !.zshrc
!.zprofile
!.vimrc !.vimrc
!.ideavimrc !.ideavimrc
!.config !.config

14
.zprofile Normal file
View file

@ -0,0 +1,14 @@
export SSH_AUTH_SOCK=~/.ssh/ssh-agent.$USER.sock
function ssh-agent-start ()
{
# if that socket does not exist, start the ssh-agent on it
if [[ -z $SSH_AGENT_PID ]]
then
rm $SSH_AUTH_SOCK
eval $(ssh-agent -a "$SSH_AUTH_SOCK") > /dev/null
# using ssh-add might ask for a password, we don't want that here.
# If only using ssh keys without passphrases, you can do this here
# ssh-add
fi
}
ssh-agent-start

31
.zshrc
View file

@ -42,9 +42,9 @@ alias open=xdg-open
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" } function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" }
function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" } function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
function cachekeys () { exec 2>/dev/null; function cachekeys () { exec 2>/dev/null;
eval $(ssh-agent) ssh-agent-start # see ~/.zprofile
ssh-add ~/.ssh/id_rsa ssh-add
} }
function newpass() { function newpass() {
LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-40} LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-40}
@ -83,7 +83,7 @@ setopt hist_verify # show command with history expansion to user befo
### --- Inputs Config ------------------------------------ ### --- Inputs Config ------------------------------------
# vim keys, then override stuff. # vim keys, then override stuff.
bindkey -v bindkey -v
bindkey "^[[1;5C" forward-word bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word bindkey "^[[1;5D" backward-word
bindkey -s "^X" 'n^M' bindkey -s "^X" 'n^M'
@ -198,24 +198,6 @@ else
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
fi fi
### --- conda Config -------------------------------------
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/plex/.local/share/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/plex/.local/share/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# we don't want to see (base) constantly, so we do this:
PS1=$(echo $PS1 | sed 's/(base) //') # remove base
### load unversioned zsh code ### load unversioned zsh code
if [ -f ~/.zsh.local ]; then if [ -f ~/.zsh.local ]; then
source ~/.zsh.local source ~/.zsh.local
@ -223,3 +205,8 @@ else
touch ~/.zsh.local touch ~/.zsh.local
fi fi
### --- pyenv Config -------------------------------------
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init - zsh)"