From 60d908aa93a7893f67c154770c63627c70ad4242 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sun, 17 Mar 2024 00:02:42 +0100 Subject: [PATCH] Add zsh config files; remove sd and asd commands from bashrc --- .bashrc | 4 +- .stow-local-ignore | 4 +- .zshrc | 111 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 .zshrc diff --git a/.bashrc b/.bashrc index 5ad4416..3bcaed5 100644 --- a/.bashrc +++ b/.bashrc @@ -9,8 +9,6 @@ alias ls='ls --color=auto' alias grep='grep --color=auto' PS1='[\u@\h \W]\$ ' alias ll='ls -alF' -alias sd="cd \$(find . -type d -not -path '*/.*' 2>/dev/null | sed 's/^..//' | fzf)" -alias asd="cd \$(find . -type d 2>/dev/null | sed 's/^..//' | fzf)" alias cls="printf '\033[2J\033[3J\033[1;1H'" export PATH=$PATH:/home/andreas/ext_sw/flutter/bin @@ -94,3 +92,5 @@ EOF complete -F _pym_complete -o nospace -o bashdefault -o default pym complete -F _pym_complete -o nospace -o bashdefault -o default python + +source /usr/share/fzf/key-bindings.bash diff --git a/.stow-local-ignore b/.stow-local-ignore index 2eb3639..9332f3e 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -1,3 +1,5 @@ README.md -.git/ .gitignore +.git +.gitmodules + diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..9728d98 --- /dev/null +++ b/.zshrc @@ -0,0 +1,111 @@ +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +setopt extendedglob +unsetopt beep +bindkey -v +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +zstyle :compinstall filename '/home/andreas/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall + +bindkey -v '^?' backward-delete-char + +autoload -Uz vcs_info +precmd() { vcs_info } +zstyle ':vcs_info:git:*' formats '%b ' +setopt PROMPT_SUBST +PROMPT='%F{blue}%~%f %F{red}${vcs_info_msg_0_}%f$ ' + +source /usr/share/fzf/key-bindings.zsh + +alias ssh='kitty +kitten ssh' + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +alias ll='ls -alF' + +export PATH=$PATH:/home/andreas/.local/bin + +alias get-idf='. $HOME/git/esp-idf/export.sh' + +alias ic='cd ~/.config/i3' +alias nc='cd ~/.config/nvim' +alias ezc='nvim ~/.zshrc' + +alias ait='cd ~/Documents/kit/AIT' +alias kit='cd ~/Documents/kit' +alias eml='cd ~/Documents/kit/EMLLAB/emllab-challenge && . venv/bin/activate' +alias let='cd ~/git/ba-letter' + +alias hyp='cd ~/git/HyperLink_SW' + +#source /usr/share/git/completion/git-completion.zsh +# +#eval "$(thefuck --alias)" +# +#export VISUAL=nvim +#export EDITOR="$VISUAL" +# +#function pym { +# python -m $@ +#} +# +#function _pym_complete { +# +# local executable current previous options +# executable=${COMP_WORDS[0]} +# current="${COMP_WORDS[COMP_CWORD]}" +# previous="${COMP_WORDS[COMP_CWORD-1]}" +# +# COMPREPLY=() +# if [[ ( "$executable" == python* && "$previous" == "-m" ) || +# ( "$executable" == pym && ! "$current" == -* ) ]]; then +# +# options="`python <