initial commit
This commit is contained in:
31
zsh.config
31
zsh.config
@@ -3,12 +3,10 @@
|
||||
|
||||
if [ $debug = 1 ]; then echo reading config from $0
|
||||
fi
|
||||
## set up oh-my-posh shell
|
||||
export POSH_SESSION_ID="9b903a91-4978-487d-967e-6aed529e69ca"
|
||||
|
||||
# source global shell alias & variables files
|
||||
[ -f "$XDG_CONFIG_HOME/shell/alias" ] && source "$XDG_CONFIG_HOME/shell/alias"
|
||||
[ -f "$XDG_CONFIG_HOME/shell/vars" ] && source "$XDG_CONFIG_HOME/shell/vars"
|
||||
[ -f "$XDG_CONFIG_HOME/alias" ] && source "$XDG_CONFIG_HOME/alias"
|
||||
[ -f "$XDG_CONFIG_HOME/vars" ] && source "$XDG_CONFIG_HOME/vars"
|
||||
|
||||
# load modules
|
||||
zmodload zsh/complist
|
||||
@@ -51,14 +49,15 @@ source <(fzf --zsh) # allow for fzf history widget
|
||||
# binds
|
||||
bindkey "^a" beginning-of-line
|
||||
bindkey "^e" end-of-line
|
||||
bindkey "^k" kill-line
|
||||
bindkey "^j" backward-word
|
||||
bindkey "^k" forward-word
|
||||
bindkey "^k" kill-line # broken
|
||||
bindkey "^j" backward-word # broken
|
||||
bindkey "^k" forward-word # broken
|
||||
bindkey "^H" backward-kill-word
|
||||
# ctrl J & K for going up and down in prev commands
|
||||
bindkey "^J" history-search-forward
|
||||
bindkey "^K" history-search-backward
|
||||
bindkey '^R' fzf-history-widget
|
||||
bindkey -s '^[[1;5A' "!!^M"
|
||||
|
||||
|
||||
# open fff file manager with ctrl f
|
||||
@@ -71,24 +70,16 @@ bindkey '^R' fzf-history-widget
|
||||
|
||||
|
||||
# set up prompt
|
||||
NEWLINE=$'\n'
|
||||
# PROMPT="${NEWLINE}%K{#2E3440}%F{#E5E9F0}$(date +%_I:%M%P) %K{#3b4252}%F{#ECEFF4} %n %K{#4c566a} %~ %f%k ❯ " # nord theme
|
||||
# PROMPT="${NEWLINE}%K{#32302f}%F{#d5c4a1} $0 %K{#3c3836}%F{#d5c4a1} %n %K{#504945} %~ %f%k ❯ " # warmer theme
|
||||
# PROMPT="${NEWLINE}%K{$COL0}%F{$COL1}$(date +%_I:%M%P) %K{$COL0}%F{$COL2} %n %K{$COL3} %~ %f%k ❯ " # pywal colors, from postrun script
|
||||
|
||||
# echo -e "${NEWLINE}\033[48;2;46;52;64;38;2;216;222;233m $0 \033[0m\033[48;2;59;66;82;38;2;216;222;233m $(uptime -p | cut -c 4-) \033[0m\033[48;2;76;86;106;38;2;216;222;233m $(uname -r) \033[0m" # nord theme
|
||||
# echo -e "${NEWLINE}\x1b[38;5;137m\x1b[48;5;0m it's$(date +%_I:%M%P) \x1b[38;5;180m\x1b[48;5;0m $(uptime -p | cut -c 4-) \x1b[38;5;223m\x1b[48;5;0m $(uname -r) \033[0m" # warmer theme
|
||||
# echo -e "${NEWLINE}\x1b[38;5;137m\x1b[48;5;0m it's$(print -P '%D{%_I:%M%P}\n') \x1b[38;5;180m\x1b[48;5;0m $(uptime -p | cut -c 4-) \x1b[38;5;223m\x1b[48;5;0m $(uname -r) \033[0m" # current
|
||||
|
||||
# autosuggestions
|
||||
# requires zsh-autosuggestions
|
||||
# source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
# syntax highlighting
|
||||
# requires zsh-syntax-highlighting package
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
#import oh-my-posh shell
|
||||
export POSH_SESSION_ID="b5bf3508-938e-40c1-8126-f73becb49bca";
|
||||
source $'/home/venus/.cache/oh-my-posh/init.14695981039346656037.zsh'
|
||||
|
||||
#setup oh-my-posh shell
|
||||
if [ $TERM = "xterm-kitty" ] || [ $NVIM ]; then
|
||||
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/oh-my-posh/1_shell.omp.json)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user