From 34352552689bc7f255de5f1921d0bc2078599ec6 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 26 May 2021 03:58:23 -0400 Subject: [PATCH 01/22] initial trial of zinit --- init.sh | 11 +- prezto.zsh | 21 ---- update.zsh | 12 +-- zsh/.zshrc | 278 ++++++++++++++++++++++++++++++++++++++++++++++++ zsh/aliases.zsh | 37 +++++++ 5 files changed, 325 insertions(+), 34 deletions(-) delete mode 100755 prezto.zsh create mode 100644 zsh/.zshrc create mode 100644 zsh/aliases.zsh diff --git a/init.sh b/init.sh index d45e6fe..5f7e175 100755 --- a/init.sh +++ b/init.sh @@ -13,9 +13,12 @@ fi #setup prezto echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then - echo "Initializing Prezto" - zsh prezto.zsh - chsh -s /bin/zsh + echo "Initializing ZSH" + sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" +#This will install Zinit in ~/.zinit/bin. .zshrc will be updated with three lines of code that will be added to the bottom. The lines will be sourcing zinit.zsh and setting up completion for command zinit. After installing and reloading the shell compile Zinit with zinit self-update. + zinit self-update + zinit update + chsh -s /bin/zsh elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then echo "Installing Oh-My-Fish" bash fish.sh @@ -29,7 +32,7 @@ mkdir ~/.ssh echo "Stowing Configs" stow tmux stow vim -stow prezto +stow zsh stow config chmod 0700 ~/.ssh chmod -R 0600 ~/.ssh/* diff --git a/prezto.zsh b/prezto.zsh deleted file mode 100755 index 45c332f..0000000 --- a/prezto.zsh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/zsh -#Initializes Prezto -git clone --recursive -j 4 https://github.com/steveokard/prezto.git "$HOME/stevset/prezto/.zprezto" - -#Remove old stuff -echo "....Creating symlinks" -rm -rf ~/.zshrc ~/.zsh ~/.zprofile ~/.zlogin ~/.zlogout ~/.zpreztorc ~/.zshenv - -#Make Environment Links, per github readme -setopt EXTENDED_GLOB -for rcfile in "${ZDOTDIR:-$HOME}"/stevset/prezto/.zprezto/runcoms/^README.md(.N); do - ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" - done - -#setup theme -echo "remember to run p10k configure to configure the theme!" -ln -s $HOME/.zprezto/modules/prompt/external/powerlevel10k/prompt_powerlevel10k_setup $HOME/.zprezto/modules/prompt/functions/prompt_powerlevel10k_setup - -#finally, fix permissions to avoid compaudit flag -chmod -R go-w ~/.zprezto - diff --git a/update.zsh b/update.zsh index ea0915f..9059412 100755 --- a/update.zsh +++ b/update.zsh @@ -1,10 +1,4 @@ #!/bin/zsh -echo "Configuring Emoji Fonts" -git clone https://gitlab.com/es20490446e/emoji.conf.git -cd emoji.conf/ -./install-uninstall.sh -#regenerate font cache -fc-cache -f -v -#cleanup -cd .. -rm -r emoji.conf +echo "Remove Emacs" +sudo apt autoremove emacs emacs-nox ripgrep markdown shellcheck fd-find +rm -r --interactive=never $HOME/.emacs.d $HOME/.doom.d diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..271b8cd --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,278 @@ +#Original Concept located from https://github.com/crivotz/dot_files/blob/master/linux/zplugin/zshrc +##################### +# FIRST PROMPT LINE # +##################### +rosso='\e[1;34m' +NC='\e[0m' +echo -e "${rosso}Ubuntu${NC}" `lsb_release -sr` "| ${rosso}ZSH${NC} ${ZSH_VERSION}" +##################### +# ZINIT # +##################### +### Added by Zinit's installer +if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then + print -P "%F{33}▓▒░ %F{220}Installing DHARMA Initiative Plugin Manager (zdharma/zinit)…%f" + command mkdir -p $HOME/.zinit + command git clone https://github.com/zdharma/zinit $HOME/.zinit/bin && \ + print -P "%F{33}▓▒░ %F{34}Installation successful.%F" || \ + print -P "%F{160}▓▒░ The clone has failed.%F" +fi +source "$HOME/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit installer's chunk + +##################### +# THEME # +##################### +zinit ice depth=1; zinit light romkatv/powerlevel10k + +##################### +# PLUGINS # +##################### +# SSH-AGENT +zinit light bobsoppe/zsh-ssh-agent +# AUTOSUGGESTIONS, TRIGGER PRECMD HOOK UPON LOAD +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +zinit ice wait"0a" lucid atload"_zsh_autosuggest_start" +zinit light zsh-users/zsh-autosuggestions +# ENHANCD +zinit ice wait"0b" lucid +zinit light b4b4r07/enhancd +export ENHANCD_FILTER=fzf:fzy:peco +# HISTORY SUBSTRING SEARCHING +zinit ice wait"0b" lucid atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; bindkey "$terminfo[kcud1]" history-substring-search-down' +zinit light zsh-users/zsh-history-substring-search +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down +bindkey -M vicmd 'k' history-substring-search-up +bindkey -M vicmd 'j' history-substring-search-down +# TAB COMPLETIONS +zinit ice wait"0b" lucid blockf +zinit light zsh-users/zsh-completions +zstyle ':completion:*' completer _expand _complete _ignored _approximate +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' +zstyle ':completion:*' menu select=2 +zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' +zstyle ':completion:*:descriptions' format '-- %d --' +zstyle ':completion:*:processes' command 'ps -au$USER' +zstyle ':completion:complete:*:options' sort false +zstyle ':fzf-tab:complete:_zlua:*' query-string input +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm,cmd -w -w" +zstyle ':fzf-tab:complete:kill:argument-rest' extra-opts --preview=$extract'ps --pid=$in[(w)1] -o cmd --no-headers -w -w' --preview-window=down:3:wrap +zstyle ":completion:*:git-checkout:*" sort false +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +# FZF +zinit ice from"gh-r" as"command" +zinit light junegunn/fzf +# FZF BYNARY AND TMUX HELPER SCRIPT +zinit ice lucid wait'0c' as"command" id-as"junegunn/fzf-tmux" pick"bin/fzf-tmux" +zinit light junegunn/fzf +# BIND MULTIPLE WIDGETS USING FZF +zinit ice lucid wait'0c' multisrc"shell/{completion,key-bindings}.zsh" id-as"junegunn/fzf_completions" pick"/dev/null" +zinit light junegunn/fzf +# FZF-TAB +zinit ice wait"1" lucid +zinit light Aloxaf/fzf-tab +# SYNTAX HIGHLIGHTING +zinit ice wait"0c" lucid atinit"zpcompinit;zpcdreplay" +zinit light zdharma/fast-syntax-highlighting +# NVM +#export NVM_AUTO_USE=true +#zinit ice wait"1" lucid +#zinit light lukechilds/zsh-nvm +# EXA +zinit ice wait"2" lucid from"gh-r" as"program" mv"bin/exa* -> exa" +zinit light ogham/exa +zinit ice wait blockf atpull'zinit creinstall -q .' +# DELTA +zinit ice lucid wait"0" as"program" from"gh-r" pick"delta*/delta" +zinit light 'dandavison/delta' +# BAT +zinit ice from"gh-r" as"program" mv"bat* -> bat" pick"bat/bat" atload"alias cat=bat" +zinit light sharkdp/bat +# BAT-EXTRAS +zinit ice wait"1" as"program" pick"src/batgrep.sh" lucid +zinit ice wait"1" as"program" pick"src/batdiff.sh" lucid +zinit light eth-p/bat-extras +alias rg=batgrep.sh +alias bd=batdiff.sh +alias man=batman.sh +# RIPGREP +zinit ice from"gh-r" as"program" mv"ripgrep* -> ripgrep" pick"ripgrep/rg" +zinit light BurntSushi/ripgrep +# NEOVIM +#zinit ice from"gh-r" as"program" bpick"*appimage*" ver"nightly" mv"nvim* -> nvim" pick"nvim" +#zinit light neovim/neovim +# FORGIT +zinit ice wait lucid +zinit load 'wfxr/forgit' +# LAZYGIT +zinit ice lucid wait"0" as"program" from"gh-r" mv"lazygit* -> lazygit" atload"alias lg='lazygit'" +zinit light 'jesseduffield/lazygit' +# RANGER +zinit ice depth'1' as"program" pick"ranger.py" +zinit light ranger/ranger +# FD +zinit ice as"command" from"gh-r" mv"fd* -> fd" pick"fd/fd" +zinit light sharkdp/fd +# GH-CLI +zinit ice lucid wait"0" as"program" from"gh-r" pick"usr/bin/gh" +zinit light "cli/cli" +# TMUX +zinit ice from"gh-r" as"program" mv"tmux* -> tmux" pick"tmux" atload"alias tmux=tmux" +zinit light tmux/tmux +# TMUXINATOR +#zinit ice as"completion"; zinit snippet ~/.nubem_dot_files/extras/tmuxinator/tmuxinator.zsh +# ZSH MANYDOTS MAGIC +zinit autoload'#manydots-magic' for knu/zsh-manydots-magic +# TREE-SITTER +zinit ice as"program" from"gh-r" mv"tree* -> tree-sitter" pick"tree-sitter" +zinit light tree-sitter/tree-sitter +# XURLS +#zinit ice as"program" from"gh-r" mv"xurls* -> xurls" pick"xurls" +#zinit light mvdan/xurls +# PRETTYPING +zinit ice lucid wait'' as"program" pick"prettyping" atload'alias ping=prettyping' +zinit load "denilsonsa/prettyping" +# GLOW +#zinit ice lucid wait"0" as"program" from"gh-r" bpick='*linux_amd64.deb' pick"usr/bin/glow" +#zinit light charmbracelet/glow +# CODE-MINIMAP +#zinit ice lucid wait"0" as"program" from"gh-r" bpick='*amd64.deb' pick"usr/bin/code-minimap" +#zinit light wfxr/code-minimap +# ZSH DIFF SO FANCY +# zinit ice wait"2" lucid as"program" pick"bin/git-dsf" +# zinit light zdharma/zsh-diff-so-fancy +# GIT-FLOW +# zinit light petervanderdoes/git-flow-completion +# RCLONE +# zinit ice lucid wait"0" as"program" from"gh-r" bpick='*-linux-amd64.deb' pick"usr/bin/rclone" +# zinit light 'rclone/rclone' +# WHATSAPP CLI +# zinit ice lucid wait"0" as"program" from"gh-r" pick"whatscli" +# zinit light "normen/whatscli" +##################### +# HISTORY # +##################### +[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history" +HISTSIZE=290000 +SAVEHIST=$HISTSIZE + +##################### +# SETOPT # +##################### +setopt extended_history # record timestamp of command in HISTFILE +setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE +setopt hist_ignore_all_dups # ignore duplicated commands history list +setopt hist_ignore_space # ignore commands that start with space +setopt hist_verify # show command with history expansion to user before running it +setopt inc_append_history # add commands to HISTFILE in order of execution +setopt share_history # share command history data +setopt always_to_end # cursor moved to the end in full completion +setopt hash_list_all # hash everything before completion +# setopt completealiases # complete alisases +setopt always_to_end # when completing from the middle of a word, move the cursor to the end of the word +setopt complete_in_word # allow completion from within a word/phrase +setopt nocorrect # spelling correction for commands +setopt list_ambiguous # complete as much of a completion until it gets ambiguous. +setopt nolisttypes +setopt listpacked +setopt automenu +unsetopt BEEP +setopt vi + +#chpwd() exa --git --icons --classify --group-directories-first --time-style=long-iso --group --color-scale +##################### +# ENV VARIABLE # +##################### +#export EDITOR='nvim' +export EDITOR='vim' +export VISUAL=$EDITOR +export PAGER='less' +export SHELL='/bin/zsh' + +#if [[ ! $(tmux ls) ]] 2> /dev/null; then +# tmux new -s λ +#fi +##################### +# COLORING # +##################### +autoload colors && colors + +##################### +# ALIASES # +##################### +source $HOME/.zsh_aliases + +##################### +# FANCY-CTRL-Z # +##################### +function fg-fzf() { + job="$(jobs | fzf -0 -1 | sed -E 's/\[(.+)\].*/\1/')" && echo '' && fg %$job +} + +function fancy-ctrl-z () { + if [[ $#BUFFER -eq 0 ]]; then + BUFFER=" fg-fzf" + zle accept-line -w + else + zle push-input -w + zle clear-screen -w + fi +} +zle -N fancy-ctrl-z +bindkey '^Z' fancy-ctrl-z + +##################### +# FZF SETTINGS # +##################### +export FZF_DEFAULT_OPTS=" +--ansi +--layout=default +--info=inline +--height=50% +--multi +--preview-window=right:50% +--preview-window=sharp +--preview-window=cycle +--preview '([[ -f {} ]] && (bat --style=numbers --color=always --theme=gruvbox-dark --line-range :500 {} || cat {})) || ([[ -d {} ]] && (tree -C {} | less)) || echo {} 2> /dev/null | head -200' +--prompt='λ -> ' +--pointer='|>' +--marker='✓' +--bind 'ctrl-e:execute(vim {} < /dev/tty > /dev/tty 2>&1)' > selected +--bind 'ctrl-v:execute(code {+})'" +export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null' +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + +##################### +# FZF-GC-PROJECT # +##################### +# Thanks to sei40kr/zsh-fzf-gcloud + +#function fzf-gcloud-config-set-project() { +# local project="$(gcloud projects list | +# fzf --header-lines=1 --reverse | +# awk '{ print $1 }')" + +# if [[ -n "$project" ]]; then +# gcloud config set project "$project" +# fi +#} +#zle -N fzf-gcloud-config-set-project +#bindkey '^G' fzf-gcloud-config-set-project + +##################### +# PATH # +##################### +export PATH=$PATH:~/.local/bin:~/bin + +##################### +# P10K SETTINGS # +##################### +[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh + +##################### +# RVM VARIABLE # +##################### +#export PATH="$PATH:$HOME/.rvm/bin" +#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh new file mode 100644 index 0000000..55f6747 --- /dev/null +++ b/zsh/aliases.zsh @@ -0,0 +1,37 @@ +#Readability aliases +alias lss='ls -alh --color=auto' +alias mount='mount |column -t' +alias df='df -H -x squashfs -x tmpfs -x devtmpfs' + +#Shell Function aliases +alias dirs="dirs -v" +alias h='history' +alias j='jobs -l' + +#shortcuts aliases +alias please="sudo !!" +alias ping='ping -c 5' +alias ax="chmod a+x" +alias wmip="curl icanhazip.com" + +#git aliases +alias gitS='git status' +alias gitL='git log' +alias gitD='git diff' +alias gitC='git commit -a' + +#Apt aliases +alias aptup="sudo apt update && sudo apt upgrade" +alias aptrm="sudo apt autoremove && sudo apt autoclean" + +#Combo aliases +mcd() { mkdir -p "$1"; cd "$1";} #make a directory and cd into it +cls() { cd "$1"; ls;} #cd into directory and list contents +md5check() { md5sum "$1" | grep "$2";} #md5sum file, compare to md5sum as second parameter + +#ssh aliases +alias sagent="eval `ssh-agent`" + +#Command Replacement aliases +alias less='less -imJMW' + From 8fbfa42ed3704adfbbe7ed35e0994519aabb9a60 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 26 May 2021 20:04:26 -0400 Subject: [PATCH 02/22] added dependency tree --- udeps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udeps.sh b/udeps.sh index ff8f5be..873ecd4 100755 --- a/udeps.sh +++ b/udeps.sh @@ -13,7 +13,7 @@ sudo apt-get -my install git \ mc \ curl \ aptitude \ - nnn \ + tree \ ack read -n1 -p $'Does this system need ssh access?\n' REPLY From b290c3ba6c36cf528511a98d7574ba8de95498b4 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 27 May 2021 14:31:07 -0400 Subject: [PATCH 03/22] re-enabled tmux autostart --- zsh/.zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 271b8cd..357c201 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -191,9 +191,9 @@ export VISUAL=$EDITOR export PAGER='less' export SHELL='/bin/zsh' -#if [[ ! $(tmux ls) ]] 2> /dev/null; then -# tmux new -s λ -#fi +if [[ ! $(tmux ls) ]] 2> /dev/null; then + tmux new -s λ +fi ##################### # COLORING # ##################### From 50090677bc351abe6a972bb528ae744631c11f29 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 27 May 2021 15:09:12 -0400 Subject: [PATCH 04/22] use native tmux --- zsh/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 357c201..d3c5b23 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -119,8 +119,8 @@ zinit light sharkdp/fd zinit ice lucid wait"0" as"program" from"gh-r" pick"usr/bin/gh" zinit light "cli/cli" # TMUX -zinit ice from"gh-r" as"program" mv"tmux* -> tmux" pick"tmux" atload"alias tmux=tmux" -zinit light tmux/tmux +#zinit ice from"gh-r" as"program" mv"tmux* -> tmux" pick"tmux" atload"alias tmux=tmux" +#zinit light tmux/tmux # TMUXINATOR #zinit ice as"completion"; zinit snippet ~/.nubem_dot_files/extras/tmuxinator/tmuxinator.zsh # ZSH MANYDOTS MAGIC From cf65f84250205b1b3b016799bc5a18381ca42147 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 27 May 2021 16:19:34 -0400 Subject: [PATCH 05/22] forgot default_term because i'm a moron --- tmux/.tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 60c842c..ec721b4 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,3 +1,7 @@ +# -- general ------------------------------------------------------------------- +set -g default-terminal "screen-256color" # colors! +set -g xterm-keys on + # remap prefix to Control + a set -g prefix C-a unbind C-b @@ -8,7 +12,6 @@ set -sg escape-time 0 set -g history-limit 100000 #setw -g mode-keys vi set-option -g mouse on -set -g xterm-keys on set-window-option -g xterm-keys on #set-option -g pane-active-border-fg yellow From 7ab77bbf19e3b28ed0f92e1a421c330c7c00b782 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 27 May 2021 16:50:00 -0400 Subject: [PATCH 06/22] additional tweaks --- zsh/.zshrc | 16 +++++++++++++--- zsh/aliases.zsh | 3 +++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index d3c5b23..abd7fe4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,4 +1,6 @@ #Original Concept located from https://github.com/crivotz/dot_files/blob/master/linux/zplugin/zshrc +# Skip the not really helping Ubuntu global compinit +skip_global_compinit=1 ##################### # FIRST PROMPT LINE # ##################### @@ -110,8 +112,8 @@ zinit load 'wfxr/forgit' zinit ice lucid wait"0" as"program" from"gh-r" mv"lazygit* -> lazygit" atload"alias lg='lazygit'" zinit light 'jesseduffield/lazygit' # RANGER -zinit ice depth'1' as"program" pick"ranger.py" -zinit light ranger/ranger +# zinit ice depth'1' as"program" pick"ranger.py" +# zinit light ranger/ranger # FD zinit ice as"command" from"gh-r" mv"fd* -> fd" pick"fd/fd" zinit light sharkdp/fd @@ -180,8 +182,12 @@ setopt listpacked setopt automenu unsetopt BEEP setopt vi +# From Prezto/Environment +unsetopt BG_NICE # Don't run all background jobs at a lower priority. +unsetopt HUP # Don't kill jobs on shell exit. +unsetopt CHECK_JOBS # Don't report on jobs when shell exit. -#chpwd() exa --git --icons --classify --group-directories-first --time-style=long-iso --group --color-scale +# chpwd() exa --git --icons --classify --group-directories-first --time-style=long-iso --group --color-scale ##################### # ENV VARIABLE # ##################### @@ -203,6 +209,10 @@ autoload colors && colors # ALIASES # ##################### source $HOME/.zsh_aliases +zinit wait lucid for \ + OMZ::plugins/common-aliases \ + if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd + PZT::modules/directory/init.zsh ##################### # FANCY-CTRL-Z # diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 55f6747..e38abcf 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -35,3 +35,6 @@ alias sagent="eval `ssh-agent`" #Command Replacement aliases alias less='less -imJMW' +##History Aliases +alias h='history' +alias hs='history | grep -i' From 4073e999d3bc2d82cd070a2926b685fe110d72e9 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 27 May 2021 17:06:09 -0400 Subject: [PATCH 07/22] fixed typo --- zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index abd7fe4..eb3f314 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -211,7 +211,7 @@ autoload colors && colors source $HOME/.zsh_aliases zinit wait lucid for \ OMZ::plugins/common-aliases \ - if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd + if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ PZT::modules/directory/init.zsh ##################### From b9110576463c88ce7f83e2b5df6de1a7c8b93e74 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 27 May 2021 22:22:52 -0400 Subject: [PATCH 08/22] automate zinit installation (beta) --- update.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/update.zsh b/update.zsh index 9059412..be96e52 100755 --- a/update.zsh +++ b/update.zsh @@ -2,3 +2,11 @@ echo "Remove Emacs" sudo apt autoremove emacs emacs-nox ripgrep markdown shellcheck fd-find rm -r --interactive=never $HOME/.emacs.d $HOME/.doom.d + +echo "Install zinit" +rm ~/.zshrc +sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" +#This will install Zinit in ~/.zinit/bin. .zshrc will be updated with three lines of code that wi │ ll be added to the bottom. The lines will be sourcing zinit.zsh and setting up completion for com │ mand zinit. After installing and reloading the shell compile Zinit with zinit self-update. +ln ~/stevset/zsh/.zshrc ~/.zshrc +ln ~/stevset/zsh/aliases.zsh ~/.zsh_aliases +source ~/.zshrc From e2c084f5c67d2639d7702e465b725d48f4af418b Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 28 May 2021 22:15:41 -0400 Subject: [PATCH 09/22] added reload to source zshrc --- zsh/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index e38abcf..4ce33b1 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -7,6 +7,7 @@ alias df='df -H -x squashfs -x tmpfs -x devtmpfs' alias dirs="dirs -v" alias h='history' alias j='jobs -l' +alias reload=". ~/.zshrc" #shortcuts aliases alias please="sudo !!" From 52647420e3c926feda25b79e816bd5354bc07ca1 Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 28 May 2021 22:27:34 -0400 Subject: [PATCH 10/22] removed manydots and set emacs mode default --- zsh/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index eb3f314..021ceae 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -126,7 +126,7 @@ zinit light "cli/cli" # TMUXINATOR #zinit ice as"completion"; zinit snippet ~/.nubem_dot_files/extras/tmuxinator/tmuxinator.zsh # ZSH MANYDOTS MAGIC -zinit autoload'#manydots-magic' for knu/zsh-manydots-magic +#zinit autoload'#manydots-magic' for knu/zsh-manydots-magic # TREE-SITTER zinit ice as"program" from"gh-r" mv"tree* -> tree-sitter" pick"tree-sitter" zinit light tree-sitter/tree-sitter @@ -181,7 +181,7 @@ setopt nolisttypes setopt listpacked setopt automenu unsetopt BEEP -setopt vi +setopt emacs # From Prezto/Environment unsetopt BG_NICE # Don't run all background jobs at a lower priority. unsetopt HUP # Don't kill jobs on shell exit. From d4d7b47df755e12783307ee1885ea0fc5963315c Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 28 May 2021 23:37:38 -0400 Subject: [PATCH 11/22] changing back to spacemacs --- emacs_doom.zsh | 15 --------------- spacemacs.zsh | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) delete mode 100755 emacs_doom.zsh create mode 100755 spacemacs.zsh diff --git a/emacs_doom.zsh b/emacs_doom.zsh deleted file mode 100755 index 9318441..0000000 --- a/emacs_doom.zsh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/zsh -#This will install Doom for Emacs -#sudo add-apt-repository ppa:kelleyk/emacs -#cleanup old spacemacs -if [ -e ~/.emacs.d/spacemacs.mk ] - then - mv ~/.emacs.d ~/spacemacs.d -fi - -git clone https://github.com/hlissner/doom-emacs ~/.emacs.d - -#Install Dependencies -sudo apt install ripgrep markdown shellcheck fd-find - -~/.emacs.d/bin/doom install diff --git a/spacemacs.zsh b/spacemacs.zsh new file mode 100755 index 0000000..fe7f132 --- /dev/null +++ b/spacemacs.zsh @@ -0,0 +1,16 @@ +#!/bin/zsh +#This will install Spacemacs (again) +#cleanup +echo "Removing old emacs" +if [ -e ~/.emacs.d/] + then + mv ~/.emacs.d ~/doom.d +fi + +#Select Stable or Develop +read -p "Should we use the development version of emacs?" dist +if [[ $dist = y ]] then + git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d +else + git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d +fi From 1e8f8545b1658eb8ad70d2e6b06c0325f57a94e7 Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 28 May 2021 23:42:52 -0400 Subject: [PATCH 12/22] adjust for spacemacs --- update.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/update.zsh b/update.zsh index be96e52..9f0c556 100755 --- a/update.zsh +++ b/update.zsh @@ -1,6 +1,5 @@ #!/bin/zsh -echo "Remove Emacs" -sudo apt autoremove emacs emacs-nox ripgrep markdown shellcheck fd-find +echo "Remove Doom" rm -r --interactive=never $HOME/.emacs.d $HOME/.doom.d echo "Install zinit" From 6f15606b5940c2a596abed6b6456fb1e30360f4d Mon Sep 17 00:00:00 2001 From: steveokard Date: Sat, 29 May 2021 00:00:18 -0400 Subject: [PATCH 13/22] fully purge prezto config --- update.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.zsh b/update.zsh index 9f0c556..be07e82 100755 --- a/update.zsh +++ b/update.zsh @@ -3,7 +3,7 @@ echo "Remove Doom" rm -r --interactive=never $HOME/.emacs.d $HOME/.doom.d echo "Install zinit" -rm ~/.zshrc +rm ~/.zshrc ~/.zpreztorc ~/.zlogin ~/.zlogout ~/.zprofile ~/.zshenv sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" #This will install Zinit in ~/.zinit/bin. .zshrc will be updated with three lines of code that wi │ ll be added to the bottom. The lines will be sourcing zinit.zsh and setting up completion for com │ mand zinit. After installing and reloading the shell compile Zinit with zinit self-update. ln ~/stevset/zsh/.zshrc ~/.zshrc From 3dd59f2cde9a33d868da69542390b92baff3018d Mon Sep 17 00:00:00 2001 From: steveokard Date: Sat, 29 May 2021 21:25:00 -0400 Subject: [PATCH 14/22] Update .zshrc --- zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 021ceae..9ffec92 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -195,7 +195,7 @@ unsetopt CHECK_JOBS # Don't report on jobs when shell exit. export EDITOR='vim' export VISUAL=$EDITOR export PAGER='less' -export SHELL='/bin/zsh' +#export SHELL='/bin/zsh' if [[ ! $(tmux ls) ]] 2> /dev/null; then tmux new -s λ From 6456fe980ef4bea5abbb3136a1a04a0ded63e464 Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 03:35:27 -0400 Subject: [PATCH 15/22] more additions from prezto --- zsh/.zshrc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 9ffec92..d8bc7bf 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -27,10 +27,27 @@ autoload -Uz _zinit # THEME # ##################### zinit ice depth=1; zinit light romkatv/powerlevel10k +# Uncomment following line if you want red dots to be displayed while waiting for completion +export COMPLETION_WAITING_DOTS="true" ##################### # PLUGINS # ##################### +# tmux {{ +zstyle ':prezto:module:tmux:session' name 'λ' +# [[ -n $DISPLAY ]] && zstyle ':prezto:module:tmux:auto-start' local 'yes' +zinit ice zinit snippet PZT::modules/tmux +# }}} +# prezto {{{ +zstyle ':prezto:*:*' case-sensitive 'no' +zstyle ':prezto:*:*' color 'yes' +zinit ice zinit snippet PZT::modules/helper +zinit ice zinit snippet PZT::modules/environment +zinit ice zinit snippet PZT::modules/terminal +zinit ice zinit snippet PZT::modules/editor +zinit ice silent; zinit snippet PZT::modules/gpg +zinit ice silent pick"init.zsh" lucid; zinit snippet PZT::modules/utility +# }}} # SSH-AGENT zinit light bobsoppe/zsh-ssh-agent # AUTOSUGGESTIONS, TRIGGER PRECMD HOOK UPON LOAD @@ -197,9 +214,9 @@ export VISUAL=$EDITOR export PAGER='less' #export SHELL='/bin/zsh' -if [[ ! $(tmux ls) ]] 2> /dev/null; then - tmux new -s λ -fi +# if [[ ! $(tmux ls) ]] 2> /dev/null; then + # tmux new -s λ +# fi ##################### # COLORING # ##################### @@ -213,7 +230,6 @@ zinit wait lucid for \ OMZ::plugins/common-aliases \ if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ PZT::modules/directory/init.zsh - ##################### # FANCY-CTRL-Z # ##################### From c69c510832e16205951813a747180364fe994c50 Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 13:41:21 -0400 Subject: [PATCH 16/22] vi movement keys --- zsh/.zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index d8bc7bf..35c594c 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -48,6 +48,15 @@ zinit ice zinit snippet PZT::modules/editor zinit ice silent; zinit snippet PZT::modules/gpg zinit ice silent pick"init.zsh" lucid; zinit snippet PZT::modules/utility # }}} +##Set VI MODE +bindkey -v +bindkey '^r' history-incremental-search-backward +bindkey '^a' beginning-of-line +bindkey '^e' end-of-line +# Also fix annoying vi backspace +bindkey '^?' backward-delete-char +bindkey '^[b' vi-backward-blank-word +bindkey '^[w' vi-forward-blank-word # SSH-AGENT zinit light bobsoppe/zsh-ssh-agent # AUTOSUGGESTIONS, TRIGGER PRECMD HOOK UPON LOAD @@ -198,7 +207,6 @@ setopt nolisttypes setopt listpacked setopt automenu unsetopt BEEP -setopt emacs # From Prezto/Environment unsetopt BG_NICE # Don't run all background jobs at a lower priority. unsetopt HUP # Don't kill jobs on shell exit. From c98ca95ddb75077ece5b6f454844a30fe242069a Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 19:06:06 -0400 Subject: [PATCH 17/22] zstyle tmux over ssh --- zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 35c594c..2eba32d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -35,6 +35,7 @@ export COMPLETION_WAITING_DOTS="true" ##################### # tmux {{ zstyle ':prezto:module:tmux:session' name 'λ' +zstyle ':prezto:module:tmux:auto-start' remote 'yes' # [[ -n $DISPLAY ]] && zstyle ':prezto:module:tmux:auto-start' local 'yes' zinit ice zinit snippet PZT::modules/tmux # }}} From 5018cf92021aac65931b3a31f28f6b936b0095e1 Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 19:16:26 -0400 Subject: [PATCH 18/22] fixed variable --- zsh/.zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 2eba32d..c2e0253 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -35,8 +35,7 @@ export COMPLETION_WAITING_DOTS="true" ##################### # tmux {{ zstyle ':prezto:module:tmux:session' name 'λ' -zstyle ':prezto:module:tmux:auto-start' remote 'yes' -# [[ -n $DISPLAY ]] && zstyle ':prezto:module:tmux:auto-start' local 'yes' +[[ -n $DISPLAY ]] && zstyle ':prezto:module:tmux:auto-start' local 'yes' zinit ice zinit snippet PZT::modules/tmux # }}} # prezto {{{ From 4a3917784024c70d0d8129c6e8d1afeed09fd653 Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 19:26:21 -0400 Subject: [PATCH 19/22] whoops --- zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index c2e0253..19cf480 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -36,6 +36,7 @@ export COMPLETION_WAITING_DOTS="true" # tmux {{ zstyle ':prezto:module:tmux:session' name 'λ' [[ -n $DISPLAY ]] && zstyle ':prezto:module:tmux:auto-start' local 'yes' +zstyle ':prezto:module:tmux:auto-start' remote 'yes' zinit ice zinit snippet PZT::modules/tmux # }}} # prezto {{{ From 8a6abf1cbd8f35fa394c3c83f1b0d4c7752f4437 Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 19:32:06 -0400 Subject: [PATCH 20/22] idk what im doing --- zsh/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 19cf480..b794349 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -238,7 +238,8 @@ source $HOME/.zsh_aliases zinit wait lucid for \ OMZ::plugins/common-aliases \ if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ - PZT::modules/directory/init.zsh + PZT::modules/directory/init.zsh \ + PZT::modules/tmux ##################### # FANCY-CTRL-Z # ##################### From 40ce5fe7011caf849f98f45717d0118fbdf61e4f Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 19:51:56 -0400 Subject: [PATCH 21/22] reconfigure ssh-agent --- zsh/.zshrc | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index b794349..4a5e180 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -48,6 +48,7 @@ zinit ice zinit snippet PZT::modules/terminal zinit ice zinit snippet PZT::modules/editor zinit ice silent; zinit snippet PZT::modules/gpg zinit ice silent pick"init.zsh" lucid; zinit snippet PZT::modules/utility +zstyle :omz:plugins:ssh-agent identities id_rsa github_rsa pete_rsa stevserver_rsa ymca_rsa # }}} ##Set VI MODE bindkey -v @@ -163,23 +164,6 @@ zinit light tree-sitter/tree-sitter # PRETTYPING zinit ice lucid wait'' as"program" pick"prettyping" atload'alias ping=prettyping' zinit load "denilsonsa/prettyping" -# GLOW -#zinit ice lucid wait"0" as"program" from"gh-r" bpick='*linux_amd64.deb' pick"usr/bin/glow" -#zinit light charmbracelet/glow -# CODE-MINIMAP -#zinit ice lucid wait"0" as"program" from"gh-r" bpick='*amd64.deb' pick"usr/bin/code-minimap" -#zinit light wfxr/code-minimap -# ZSH DIFF SO FANCY -# zinit ice wait"2" lucid as"program" pick"bin/git-dsf" -# zinit light zdharma/zsh-diff-so-fancy -# GIT-FLOW -# zinit light petervanderdoes/git-flow-completion -# RCLONE -# zinit ice lucid wait"0" as"program" from"gh-r" bpick='*-linux-amd64.deb' pick"usr/bin/rclone" -# zinit light 'rclone/rclone' -# WHATSAPP CLI -# zinit ice lucid wait"0" as"program" from"gh-r" pick"whatscli" -# zinit light "normen/whatscli" ##################### # HISTORY # ##################### @@ -239,7 +223,8 @@ zinit wait lucid for \ OMZ::plugins/common-aliases \ if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ PZT::modules/directory/init.zsh \ - PZT::modules/tmux + PZT::modules/tmux \ + hkupty/ssh-agent ##################### # FANCY-CTRL-Z # ##################### From 9949238daa05baf9a92456d64136e6f34570ae87 Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 30 May 2021 20:13:01 -0400 Subject: [PATCH 22/22] add more prezto --- zsh/.zshrc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 4a5e180..eec9eec 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -42,10 +42,8 @@ zinit ice zinit snippet PZT::modules/tmux # prezto {{{ zstyle ':prezto:*:*' case-sensitive 'no' zstyle ':prezto:*:*' color 'yes' -zinit ice zinit snippet PZT::modules/helper -zinit ice zinit snippet PZT::modules/environment -zinit ice zinit snippet PZT::modules/terminal zinit ice zinit snippet PZT::modules/editor + zinit ice silent; zinit snippet PZT::modules/gpg zinit ice silent pick"init.zsh" lucid; zinit snippet PZT::modules/utility zstyle :omz:plugins:ssh-agent identities id_rsa github_rsa pete_rsa stevserver_rsa ymca_rsa @@ -174,13 +172,9 @@ SAVEHIST=$HISTSIZE ##################### # SETOPT # ##################### -setopt extended_history # record timestamp of command in HISTFILE -setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE -setopt hist_ignore_all_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it setopt inc_append_history # add commands to HISTFILE in order of execution -setopt share_history # share command history data setopt always_to_end # cursor moved to the end in full completion setopt hash_list_all # hash everything before completion # setopt completealiases # complete alisases @@ -224,7 +218,13 @@ zinit wait lucid for \ if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ PZT::modules/directory/init.zsh \ PZT::modules/tmux \ - hkupty/ssh-agent + hkupty/ssh-agent \ + PZT::modules/helper \ + PZT::modules/environment \ + PZT::modules/terminal \ + PZT::modules/spectrum \ + PZT::modules/history \ + PZT::modules/directory \ ##################### # FANCY-CTRL-Z # #####################