+ No longer use oh-my-zsh
This commit is contained in:
parent
44e654c1e3
commit
19260309b2
5 changed files with 242 additions and 39 deletions
|
@ -10,6 +10,9 @@ rateUSD
|
|||
#python ~/Currency/USD2IDR/rate.py #PYTHON IS JUST TOO SLOW FOR TERMINAL
|
||||
#sh ~/.scripts/motd.sh
|
||||
|
||||
# Theme
|
||||
[ -f ~/.config/zsh/theme ] && source ~/.config/zsh/theme
|
||||
|
||||
# History in cache directory
|
||||
HISTFILE=~/.cache/zsh/zsh_history
|
||||
HISTSIZE=1000
|
||||
|
@ -17,42 +20,42 @@ SAVEHIST=1000
|
|||
|
||||
# Theme
|
||||
#ZSH_THEME="zi"
|
||||
ZSH_THEME="spaceship"
|
||||
# ZSH_THEME="spaceship"
|
||||
# configuration
|
||||
SPACESHIP_CHAR_SYMBOL="$> "
|
||||
SPACESHIP_GIT_BRANCH_COLOR="magenta"
|
||||
SPACESHIP_GIT_PREFIX=""
|
||||
SPACESHIP_GIT_SUFFIX=""
|
||||
SPACESHIP_GIT_BRANCH_SUFFIX=""
|
||||
SPACESHIP_GIT_STATUS_PREFIX=' '
|
||||
SPACESHIP_GIT_STATUS_SUFFIX=''
|
||||
SPACESHIP_EXEC_TIME_SHOW=false
|
||||
SPACESHIP_DIR_COLOR="blue"
|
||||
SPACESHIP_DIR_TRUNC_PREFIX="~/"
|
||||
SPACESHIP_PYENV_SYMBOL=""
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#60C0FF,bold,underline"
|
||||
ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *"
|
||||
# SPACESHIP_CHAR_SYMBOL="$> "
|
||||
# SPACESHIP_GIT_BRANCH_COLOR="magenta"
|
||||
# SPACESHIP_GIT_PREFIX=""
|
||||
# SPACESHIP_GIT_SUFFIX=""
|
||||
# SPACESHIP_GIT_BRANCH_SUFFIX=""
|
||||
# SPACESHIP_GIT_STATUS_PREFIX=' '
|
||||
# SPACESHIP_GIT_STATUS_SUFFIX=''
|
||||
# SPACESHIP_EXEC_TIME_SHOW=false
|
||||
# SPACESHIP_DIR_COLOR="blue"
|
||||
# SPACESHIP_DIR_TRUNC_PREFIX="~/"
|
||||
# SPACESHIP_PYENV_SYMBOL=""
|
||||
|
||||
# vimrc
|
||||
export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
|
||||
|
||||
# vi mode
|
||||
#bindkey -v
|
||||
#export KEYTIMEOUT=1
|
||||
|
||||
# Plugins
|
||||
plugins=(
|
||||
git
|
||||
fast-syntax-highlighting
|
||||
#zsh-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
)
|
||||
ZSH_PLUGIN="$XDG_DATA_HOME/zsh/plugins"
|
||||
#plugins=(
|
||||
#git
|
||||
#fast-syntax-highlighting
|
||||
##zsh-syntax-highlighting
|
||||
#zsh-autosuggestions
|
||||
#)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
# source $ZSH/oh-my-zsh.sh
|
||||
# Binds/Alias (Preventing from reverted to the original one)
|
||||
[ -f ~/.config/zsh/aliases ] && source ~/.config/zsh/aliases
|
||||
[ -f ~/.config/zsh/keybinds ] && source ~/.config/zsh/keybinds
|
||||
#emulate -R zsh -c 'source $ZSH_PLUGINS/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'
|
||||
# emulate -R zsh -c 'source $ZSH_PLUGINS/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'
|
||||
source $ZSH_CUSTOM/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
||||
source $ZSH_CUSTOM/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh 2>/dev/null
|
||||
#source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
||||
#source $ZSH_CUSTOM/plugins/fsh/fast-syntax-highlighting.plugin.zsh
|
||||
|
||||
|
|
|
@ -22,21 +22,14 @@ alias weather='curl wttr.in'
|
|||
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
|
||||
|
||||
#install
|
||||
alias pac='sudo pacman'
|
||||
alias pacS='sudo pacman -S'
|
||||
alias pacSy='sudo pacman -Sy'
|
||||
alias pacSyu='sudo pacman -Syu'
|
||||
alias pacR='sudo pacman -R'
|
||||
alias aur='yay'
|
||||
alias aurS='yay -S'
|
||||
alias aurSy='yay -Sy'
|
||||
alias aurSyu='yay -Syu'
|
||||
alias aurR='yay -R'
|
||||
alias p='sudo pacman'
|
||||
alias a='yay'
|
||||
|
||||
#ripper
|
||||
alias spotifyrip='spotify-ripper -u palembani@gmail.com'
|
||||
alias yt='youtube-dl'
|
||||
alias yta='youtube-dl -x --audio-format'
|
||||
alias yt='youtube-dl --add-metadata'
|
||||
alias yta='youtube-dl --add-metadata -x --audio-format'
|
||||
alias crunchyroll-dl='youtube-dl --write-sub --sub-lang enUS --cookies="/home/ziro/Downloads/cookies.txt"'
|
||||
alias xreload='xrdb $HOME/.config/Xresources'
|
||||
|
||||
#clean up
|
||||
|
@ -55,6 +48,7 @@ alias storagelist='lsblk -f'
|
|||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias q='exit'
|
||||
alias l='exa --color=always --group-directories-first' # my preferred listing
|
||||
alias ls='exa --color=always --group-directories-first' # my preferred listing
|
||||
alias la='exa -a --color=always --group-directories-first' # all files and dirs
|
||||
alias ll='exa -l --color=always --group-directories-first' # long format
|
||||
|
@ -98,6 +92,7 @@ alias cdclg='cd "$HOME/my Files/Kuliah/"'
|
|||
alias cdwine='cd "$HOME/.local/share/wineprefixes/"'
|
||||
|
||||
#Git Aliases
|
||||
alias gca='git commit --all'
|
||||
alias gR='git restore'
|
||||
alias gs='git status'
|
||||
alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
|
||||
|
|
32
.config/zsh/theme
Normal file
32
.config/zsh/theme
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/env zsh
|
||||
autoload -Uz vcs_info
|
||||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
zstyle ':vcs_info:*' stagedstr 'M'
|
||||
zstyle ':vcs_info:*' unstagedstr '!'
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' formats '%F{5} %b %F{1}%c%u %f'
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
|
||||
zstyle ':vcs_info:*' enable git
|
||||
+vi-git-untracked() {
|
||||
|
||||
# git status ahead
|
||||
if [[ $(git status --porcelain -b | grep '^## [^ ]\+ .*ahead') ]]; then
|
||||
hook_com[unstaged]+='%F{1}⇡%f'
|
||||
fi
|
||||
|
||||
# git untracked
|
||||
if [ $(git rev-parse --is-inside-work-tree 2> /dev/null) = 'true' ] && \
|
||||
[ $(git ls-files --other --directory --exclude-standard | sed q | wc -l | tr -d ' ') = 1 ] ; then
|
||||
hook_com[unstaged]+='%F{1}?%f'
|
||||
fi
|
||||
}
|
||||
|
||||
precmd () { vcs_info }
|
||||
#RPROMPT=\$vcs_info_msg_0_
|
||||
PS1="
|
||||
%B%F{blue}%~ \$vcs_info_msg_0_
|
||||
%F{green}$>%f%b "
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#60C0FF,bold,underline"
|
||||
ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *"
|
Loading…
Add table
Add a link
Reference in a new issue