finished out zsh configuration
This commit is contained in:
parent
ac33931e98
commit
cff057083b
6 changed files with 78 additions and 17 deletions
12
bashrc.txt
12
bashrc.txt
|
|
@ -1,12 +1,9 @@
|
|||
# Changing over to ZSH for now, bashrc is kept here as emergency shell/posterity
|
||||
|
||||
# to change default shell, use chsh -s $(which bash)
|
||||
# ~/.bashrc
|
||||
#
|
||||
history -c && history -w && hash -r
|
||||
if [ $TERM == "xterm-256color" ] ; then
|
||||
http_proxy=http://127.0.0.1:8118/
|
||||
HTTP_PROXY=$http_proxy
|
||||
export http_proxy HTTP_PROXY
|
||||
fi
|
||||
# create custom env variables:
|
||||
export cproj="/home/brian/Documents/Code/forks/"
|
||||
# custom BROWSER env for ddgr:
|
||||
|
|
@ -323,6 +320,11 @@ alias npm_list="npm list -g --depth=0"
|
|||
alias pip_upgrade="python -m pip install --upgrade pip"
|
||||
# pip list and pip freeze command list pip packages
|
||||
|
||||
# get top process eating memory
|
||||
alias psmem="ps auxf | sort -nr -k 4 | head -5"
|
||||
# get top process eating cpu
|
||||
alias pscpu="ps auxf | sort -nr -k 3 | head -5"
|
||||
|
||||
# game shortcuts
|
||||
alias {cbpunk,cyberpunk}="steam steam://rungameid/1091500 &"
|
||||
alias {twd,thewalkingdead}="steam steam://rungameid/1449690 &"
|
||||
|
|
|
|||
14
updates.txt
14
updates.txt
|
|
@ -13,16 +13,12 @@ find $dir -maxdepth 1 -type f
|
|||
|
||||
Install zsh-completions-git
|
||||
|
||||
in the aur_packages directory:
|
||||
in your home directory:
|
||||
|
||||
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
|
||||
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git ~/.zsh/zsh-autocomplete
|
||||
|
||||
source ~/aur_packages/zsh-autocomplete/zsh-autocomplete.plugin.zsh-completions-git
|
||||
Inside your .zsh file, you should already have called this plugin:
|
||||
|
||||
Make sure to comment out any references to compinit (but keep it around in case this fails)
|
||||
source ~/.zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh-completions-git
|
||||
|
||||
Then in your .zshrc file, place:
|
||||
|
||||
|
||||
at 9:06
|
||||
https://www.youtube.com/watch?v=bTLYiNvRIVI
|
||||
The rest can be sourced from your files here in zsh directory, just cp it into your ~/.zsh directory
|
||||
|
|
|
|||
1
zsh/zsh-autocomplete
Submodule
1
zsh/zsh-autocomplete
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d6a0ff574679280af52258ee6d2dcd3857283270
|
||||
1
zsh/zsh-autosuggestions
Submodule
1
zsh/zsh-autosuggestions
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
||||
1
zsh/zsh-syntax-highlighting
Submodule
1
zsh/zsh-syntax-highlighting
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c5ce0014677a0f69a10b676b6038ad127f40c6b1
|
||||
66
zshrc.txt
66
zshrc.txt
|
|
@ -1,8 +1,29 @@
|
|||
# ~/.zshrc
|
||||
#
|
||||
# to change default shell, use chsh -s $(which zsh)
|
||||
#
|
||||
# create custom env variables:
|
||||
export cproj="/home/brian/Documents/Code/forks/"
|
||||
# custom BROWSER env for ddgr:
|
||||
export BROWSER=links
|
||||
export TUIR_BROWSER=librewolf
|
||||
export EDITOR=nvim
|
||||
|
||||
# Enable fuzzy file finder
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
# PROMPT='%B%F{blue}[%n@%M %B%F{white}'%1~'%B%F{blue}]$ %B%F{white}%B%F{blue}
|
||||
# └─▶%B%F{white} '
|
||||
# Don't show completion until at least 1 character has been typed
|
||||
zstyle ':autocomplete:*' min-input 1
|
||||
|
||||
# autoload -U compinit; compinit
|
||||
#
|
||||
# Plugins
|
||||
source ~/.zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh
|
||||
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
# Colors
|
||||
autoload -Uz colors && colors
|
||||
|
||||
# Load version control information
|
||||
autoload -Uz vcs_info
|
||||
precmd() { vcs_info }
|
||||
|
|
@ -13,10 +34,25 @@ zstyle ':vcs_info:git:*' formats '%b'
|
|||
# Set up the prompt (with git branch name)
|
||||
setopt PROMPT_SUBST
|
||||
|
||||
# some useful options (man zshoptions)
|
||||
setopt autocd extendedglob nomatch menucomplete
|
||||
setopt interactive_comments
|
||||
stty stop undef # Disable ctrl-s to freeze terminal
|
||||
zle_highlight=('paste:none') # pasting text using ctrl+shift+v doesn't highlight
|
||||
|
||||
# beeping is annoying
|
||||
unsetopt BEEP
|
||||
|
||||
# PROMPT='[%n@%m %1~]%F{green}(${vcs_info_msg_0_})%F{white}$ '
|
||||
PROMPT='%B%F{blue}[%n@%M %B%F{white}'%1~'%B%F{blue}]$ %B%F{white}${vcs_info_msg_0_}%B%F{blue}
|
||||
└─▶%B%F{white} '
|
||||
|
||||
function erase_history { local HISTSIZE=0; }
|
||||
erase_history && hash -r
|
||||
|
||||
# Set up vim mode
|
||||
bindkey -v
|
||||
|
||||
#Custom Aliases
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --colour=auto'
|
||||
|
|
@ -28,7 +64,7 @@ alias free='free -m'
|
|||
alias dmesg="doas dmesg -H"
|
||||
alias kernel="uname -r"
|
||||
alias .="cd"
|
||||
alias home="xclear && cd /home/brian && clear && history -c && history -w && hash -r"
|
||||
alias home="xclear && cd /home/brian && clear && erase_history && hash -r"
|
||||
alias docs="cd ~/Documents"
|
||||
alias down="cd ~/Downloads"
|
||||
alias pics="cd ~/Pictures"
|
||||
|
|
@ -179,6 +215,11 @@ alias npm_list="npm list -g --depth=0"
|
|||
alias pip_upgrade="python -m pip install --upgrade pip"
|
||||
# pip list and pip freeze command list pip packages
|
||||
|
||||
# get top process eating memory
|
||||
alias psmem="ps auxf | sort -nr -k 4 | head -5"
|
||||
# get top process eating cpu
|
||||
alias pscpu="ps auxf | sort -nr -k 3 | head -5"
|
||||
|
||||
# game shortcuts
|
||||
alias {cbpunk,cyberpunk}="steam steam://rungameid/1091500 &"
|
||||
alias {twd,thewalkingdead}="steam steam://rungameid/1449690 &"
|
||||
|
|
@ -227,3 +268,22 @@ alias yt='ddgr --gb \!yt "${1}"'
|
|||
alias {grub_update,update_grub}="doas grub-mkconfig -o /boot/grub/grub.cfg"
|
||||
alias regen_initramfs="doas mkinitcpio -P"
|
||||
|
||||
# DEPRECATED aliases (noted here for posterity):
|
||||
|
||||
# pjson is now easily replaced by package jq
|
||||
# alias pjson="json_pp | pygmentize -l json" # pipe expected json output through pjson to prettify it
|
||||
# alias {bmux,mymux,memux,mmux}="tmux new-session \; send-keys 'nvim' C-m\; split-window -v -p 3\; split-window -h -p 50\; select-pane -t 0\;"
|
||||
# alias tls="tmux ls"
|
||||
# alias ta="tmux a -t"
|
||||
# alias tkill="tmux kill-ses -t"
|
||||
|
||||
# Kitty Shell Integration
|
||||
# if test -n "$KITTY_INSTALLATION_DIR"; then
|
||||
# export KITTY_SHELL_INTEGRATION="enabled"
|
||||
# autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
|
||||
# kitty-integration
|
||||
# unfunction kitty-integration
|
||||
# fi
|
||||
|
||||
# Plugins (that need to be at the end of the zshrc script)
|
||||
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue