├── .zshrc ├── README.md ├── install.sh ├── plugin-install.sh └── screenshots ├── git_branch_name.png ├── ll.png ├── ls.png └── preview.png /.zshrc: -------------------------------------------------------------------------------- 1 | # ~/.zshrc file for zsh non-login shells. 2 | # see /usr/share/doc/zsh/examples/zshrc for examples 3 | source /etc/zsh_command_not_found # command-not-found suggestions for zsh 4 | 5 | setopt autocd # change directory just by typing its name 6 | setopt correct # auto correct mistakes 7 | setopt interactivecomments # allow comments in interactive mode 8 | # setopt ksharrays # arrays start at 0 9 | setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’ 10 | setopt nonomatch # hide error message if there is no match for the pattern 11 | setopt notify # report the status of background jobs immediately 12 | setopt numericglobsort # sort filenames numerically when it makes sense 13 | setopt promptsubst # enable command substitution in prompt 14 | 15 | WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word 16 | 17 | # hide EOL sign ('%') 18 | export PROMPT_EOL_MARK="" 19 | 20 | # configure key keybindings 21 | bindkey -e # emacs key bindings 22 | bindkey ' ' magic-space # do history expansion on space 23 | bindkey '^[[3;5~' kill-word # ctrl + Supr 24 | bindkey '^[[1;5C' forward-word # ctrl + -> 25 | bindkey '^[[C' forward-word # ctrl + -> 26 | bindkey '^[[1;5D' backward-word # ctrl + <- 27 | bindkey '^[[D' backward-word # ctrl + <- 28 | bindkey '^[[5~' beginning-of-buffer-or-history # page up 29 | bindkey '^[[6~' end-of-buffer-or-history # page down 30 | bindkey '^[[Z' undo # shift + tab undo last action 31 | 32 | # enable completion features 33 | # autoload -Uz compinit 34 | # compinit -d ~/.cache/zcompdump 35 | zstyle ':completion:*:*:*:*:*' menu select 36 | zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # case insensitive tab completion 37 | 38 | # History configurations 39 | HISTFILE=~/.zsh_history 40 | HISTSIZE=1000 41 | SAVEHIST=2000 42 | setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE 43 | setopt hist_ignore_dups # ignore duplicated commands history list 44 | setopt hist_ignore_space # ignore commands that start with space 45 | setopt hist_verify # show command with history expansion to user before running it 46 | #setopt share_history # share command history data 47 | 48 | # force zsh to show the complete history 49 | alias history="history 0" 50 | # setopt prompt_subst 51 | 52 | # Enabling and setting git info var to be used in prompt config. 53 | autoload -Uz vcs_info 54 | zstyle ':vcs_info:*' enable git svn 55 | # This line obtains information from the vcs. 56 | zstyle ':vcs_info:git*' formats "(%b) " 57 | precmd() { 58 | vcs_info 59 | } 60 | 61 | # Prompt 62 | prompt="%B%F{red}┌%f"'${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}'"%F{red}[%f%F{green}%n%f%F{yellow}㉿%f%F{cyan}%m%f%F{red}]─[%F{magenta}%(6~.%-1~/…/%4~.%5~)%f%F{red}]%f%F{201}"'${vcs_info_msg_0_}'"%f"$'\n'"%F{red}└╼%f%F{yellow}$%f%b" 63 | 64 | # Export PATH$ 65 | export PATH=~/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:$PATH 66 | 67 | case "$TERM" in 68 | xterm-color|*-256color) color_prompt=yes;; 69 | esac 70 | 71 | # uncomment for a colored prompt, if the terminal has the capability; turned 72 | # off by default to not distract the user: the focus in a terminal window 73 | # should be on the output of commands, not on the prompt 74 | force_color_prompt=yes 75 | 76 | if [ -n "$force_color_prompt" ]; then 77 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 78 | # We have color support; assume it's compliant with Ecma-48 79 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 80 | # a case would tend to support setf rather than setaf.) 81 | color_prompt=yes 82 | else 83 | color_prompt= 84 | fi 85 | fi 86 | 87 | 88 | if [ "$color_prompt" = yes ]; then 89 | # override default virtualenv indicator in prompt 90 | VIRTUAL_ENV_DISABLE_PROMPT=1 91 | 92 | # enable syntax-highlighting 93 | if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] && [ "$color_prompt" = yes ]; then 94 | # ksharrays breaks the plugin. This is fixed now but let's disable it in the 95 | # meantime. 96 | # https://github.com/zsh-users/zsh-syntax-highlighting/pull/689 97 | # unsetopt ksharrays 98 | 99 | . /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 100 | ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) 101 | ZSH_HIGHLIGHT_STYLES[default]=none 102 | ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=red,bold 103 | ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold 104 | ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline 105 | ZSH_HIGHLIGHT_STYLES[global-alias]=fg=magenta 106 | ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline 107 | ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold 108 | ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline 109 | ZSH_HIGHLIGHT_STYLES[path]=underline 110 | ZSH_HIGHLIGHT_STYLES[path_pathseparator]= 111 | ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]= 112 | ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold 113 | ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold 114 | ZSH_HIGHLIGHT_STYLES[command-substitution]=none 115 | ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta 116 | ZSH_HIGHLIGHT_STYLES[process-substitution]=none 117 | ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta 118 | ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=magenta 119 | ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=magenta 120 | ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none 121 | ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold 122 | ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow 123 | ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow 124 | ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow 125 | ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta 126 | ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta 127 | ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta 128 | ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta 129 | ZSH_HIGHLIGHT_STYLES[assign]=none 130 | ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold 131 | ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold 132 | ZSH_HIGHLIGHT_STYLES[named-fd]=none 133 | ZSH_HIGHLIGHT_STYLES[numeric-fd]=none 134 | ZSH_HIGHLIGHT_STYLES[arg0]=fg=green 135 | ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold 136 | ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold 137 | ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold 138 | ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold 139 | ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold 140 | ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold 141 | ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout 142 | fi 143 | else 144 | PROMPT='${debian_chroot:+($debian_chroot)}%n@%m:%~%# ' 145 | fi 146 | unset color_prompt force_color_prompt 147 | 148 | # enable color support of ls, less and man, and also add handy aliases 149 | if [ -x /usr/bin/dircolors ]; then 150 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 151 | #alias dir='dir --color=auto' 152 | #alias vdir='vdir --color=auto' 153 | 154 | alias grep='grep --color=auto' 155 | alias fgrep='fgrep --color=auto' 156 | alias egrep='egrep --color=auto' 157 | alias diff='diff --color=auto' 158 | alias ip='ip --color=auto' 159 | 160 | export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink 161 | export LESS_TERMCAP_md=$'\E[1;36m' # begin bold 162 | export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink 163 | export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video 164 | export LESS_TERMCAP_se=$'\E[0m' # reset reverse video 165 | export LESS_TERMCAP_us=$'\E[1;32m' # begin underline 166 | export LESS_TERMCAP_ue=$'\E[0m' # reset underline 167 | 168 | # Take advantage of $LS_COLORS for completion as well 169 | zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" 170 | fi 171 | 172 | # alias 173 | # alias ls='ls -lh --color=auto' 174 | alias dir='dir --color=auto' 175 | alias vdir='vdir --color=auto' 176 | alias grep='grep --color=auto' 177 | # alias fgrep='fgrep --color=auto' 178 | # alias egrep='egrep --color=auto' 179 | alias bat='batcat' 180 | 181 | # some more ls aliases 182 | # alias l='ls -CF' 183 | alias em='emacs -nw' 184 | alias dd='dd status=progress' 185 | alias _='sudo' 186 | alias _i='sudo -i' 187 | alias please='sudo' 188 | alias fucking='sudo' 189 | 190 | ### LS & TREE 191 | alias ls='ls --color=auto' 192 | alias ll='ls -l' 193 | alias lla='ls -la' 194 | alias la='ls -A' 195 | # alias l='ls -F' 196 | command -v lsd > /dev/null && alias ls='lsd --group-dirs first' && \ 197 | alias tree='lsd --tree' 198 | command -v colorls > /dev/null && alias ls='colorls --sd --gs' && \ 199 | alias tree='colorls --tree' 200 | 201 | source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh 202 | # source /usr/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh 203 | 204 | # Select all suggestion instead of top on result only 205 | zstyle ':autocomplete:tab:*' insert-unambiguous yes 206 | zstyle ':autocomplete:tab:*' widget-style menu-select 207 | zstyle ':autocomplete:*' min-input 2 208 | bindkey $key[Up] up-line-or-history 209 | bindkey $key[Down] down-line-or-history 210 | 211 | 212 | ################################################## 213 | # Fish like syntax highlighting 214 | # Requires "zsh-syntax-highlighting" from apt 215 | source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 216 | 217 | # Useful alias for benchmarking programs 218 | # require install package "time" sudo apt install time 219 | # alias time="/usr/bin/time -f '\t%E real,\t%U user,\t%S sys,\t%K amem,\t%M mmem'" 220 | 221 | # Display last command in terminal 222 | echo -en "\e]2;Kali Terminal\a" 223 | preexec () { print -Pn "\e]0;$1 - Kali Terminal\a" } 224 | 225 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Myzsh 2 | 3 | Best vanilla theme for yuor zsh terminal (using without ohmyzsh). 4 | 5 | ## Here is for turmux [Termux-dotfiles](https://github.com/jakbin/termux-dotfiles) 6 | 7 | ## Features 8 | 9 | * Dynamic git branch name 10 | * Colourful outputs 11 | * file icons 12 | * command auto-suggestion 13 | * command auto-complete 14 | 15 | ## Prerequisite 16 | 17 | * [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) 18 | * [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) (install from repo or github) 19 | * [zsh-autocomplete](https://github.com/marlonrichert/zsh-autocomplete) (install from repo or github) 20 | * [nerd-fonts](https://github.com/ryanoasis/nerd-fonts) 21 | * [lsd](https://github.com/Peltoche/lsd) or [colorls](https://github.com/athityakumar/colorls) ( i prefer colorls because its also support git changes) 22 | 23 | ## install 24 | 25 | ```sh 26 | curl 'https://raw.githubusercontent.com/jakbin/myzsh/main/install.sh' | sh 27 | ``` 28 | 29 | ## install plugins 30 | 31 | ```sh 32 | wget 'https://raw.githubusercontent.com/jakbin/myzsh/main/plugin-install.sh' && bash plugin-install.sh 33 | ``` 34 | 35 | ## Tutorial 36 | [Watch Here](https://youtu.be/8q1NDEKkSf4) 37 | 38 | 39 | ### Screenshts 40 | 41 |