From 766e7b472b2891ca29e2d1325bb0fbc5790003f1 Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Thu, 11 Jul 2024 14:08:31 +0200 Subject: [PATCH] fix zsh/install script --- .zsh/functions.sh | 26 +++++++++++++++----------- .zshrc | 6 +----- scripts/install.sh | 22 ++++++---------------- scripts/zsh-functions.sh | 0 4 files changed, 22 insertions(+), 32 deletions(-) delete mode 100644 scripts/zsh-functions.sh diff --git a/.zsh/functions.sh b/.zsh/functions.sh index e866848..2eb912c 100644 --- a/.zsh/functions.sh +++ b/.zsh/functions.sh @@ -17,17 +17,6 @@ current_branch () { echo ${ref#refs/heads/} } -# fancy vim/shell switch with ctrl-z (see zshrc) -fancy-ctrl-z () { - if [[ $#BUFFER -eq 0 ]]; then - BUFFER="fg" - zle accept-line - else - zle push-input - zle clear-screen - fi -} - # terminal weather shortcut wttr () { if [[ -n "$1" ]] @@ -76,3 +65,18 @@ pdf () { rm temp.pdf rm *.jpg } + +# fancy vim/shell switch with ctrl-z (see zshrc) +fancy-ctrl-z () { + if [[ $#BUFFER -eq 0 ]]; then + BUFFER="fg" + zle accept-line + else + zle push-input + zle clear-screen + fi +} + +# easy vim/terminal switch after loading zsh-functions +zle -N fancy-ctrl-z +bindkey '^Z' fancy-ctrl-z diff --git a/.zshrc b/.zshrc index 6ff053e..93e1a4a 100644 --- a/.zshrc +++ b/.zshrc @@ -24,12 +24,8 @@ setopt NO_HUP # fixes topgrade # Source exports, aliases and functions source ~/.zsh/exports.sh -source ~/.zsh/aliases.sh source ~/.zsh/functions.sh - -# easy vim/terminal switch after loading zsh-functions -zle -N fancy-ctrl-z -bindkey '^Z' fancy-ctrl-z +source ~/.zsh/aliases.sh # other tools init, pyenv + rbenv are sandboxd [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh diff --git a/scripts/install.sh b/scripts/install.sh index 28d2ef9..3ed426b 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -26,7 +26,7 @@ export PATH=/usr/local/bin:/usr/local/sbin:$PATH brew tap homebrew/services brew doctor brew install fzf neovim lazygit ripgrep zoxide zsh -brew install curl fd git git-delta openssl pyenv rbenv stow +brew install curl fd git git-delta n openssl pyenv rbenv stow # stow everything, link dotfiles, set zsh as default and restart cd ~/dotfiles && stow . @@ -41,17 +41,12 @@ exit # ------------------------------------------------------------- # # ruby, node, python and all the essential tools they provide -curl -L https://git.io/n-install | bash n lts -npm install -g npm@latest && npm update -g -rbenv install 3.3.4 -rbenv global 3.3.4 -pyenv install 3.12.4 -pyenv global 3.12.4 -pip install --upgrade pip +pyenv install 3.12.4 && pyenv global 3.12.4 +rbenv install 3.3.4 && rbenv global 3.3.4 pip install setuptools tiptop neovim +npm install -g neovim fkill-cli npm-check trash-cli yarn gem install neovim -npm install -g neovim fkill-cli trash-cli # Custom node scripts and fzf installation cd ~/Dotfiles/scripts/out && npm i -g @@ -90,10 +85,5 @@ brew install --cask affinity-designer affinity-photo reaper tidal vlc # surfingkeys, dark reader, privacy badger, ublock origin, # react developer tools, df youtube, axe devtools, strongbox autofill -# Other software that can't be installed via brew, also install manually: -# bill: https://billtheapp.com/ - -# Apps from the app-store, log in, install: -# strongbox, xcode, unifi -# -# Spread love, stay curious. +# Apps from the app-store: strongbox, xcode, unifi +# Other software: https://billtheapp.com diff --git a/scripts/zsh-functions.sh b/scripts/zsh-functions.sh deleted file mode 100644 index e69de29..0000000