Updated .zshrc & added ohmyposh
This commit is contained in:
parent
706e47cbe4
commit
c7a159f28f
74
.config/ohmyposh/config.toml
Normal file
74
.config/ohmyposh/config.toml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||||
|
|
||||||
|
version = 2
|
||||||
|
inal_space = true
|
||||||
|
console_title_template = '{{ .Shell }} in {{ .Folder }}'
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'left'
|
||||||
|
newline = true
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
foreground = 'p:white'
|
||||||
|
template = "{{ .UserName }} in "
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'path'
|
||||||
|
style = 'plain'
|
||||||
|
background = 'transparent'
|
||||||
|
foreground = 'p:purple'
|
||||||
|
template = "{{ .Path }}"
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
style = 'full'
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'right'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'git'
|
||||||
|
style = 'plain'
|
||||||
|
background = 'transparent'
|
||||||
|
foreground = 'p:white'
|
||||||
|
template = "{{ .UpstreamIcon }} {{ .HEAD }}<p:green>{{ if .Working.Added }} {{ .Working.String }}{{ end }}</><p:red>{{ if .Working.Deleted }} {{ .Working.String }}{{ end }}</><p:orange>{{ if .Working.Modified }} {{ .Working.String }}{{end}}</><p:yellow>{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}</>"
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
branch_icon = ''
|
||||||
|
fetch_status = true
|
||||||
|
fetch_upstream_icon = true
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'left'
|
||||||
|
newline = true
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
background = 'transparent'
|
||||||
|
foreground_templates = [
|
||||||
|
"{{if gt .Code 0}}p:red{{end}}",
|
||||||
|
"{{if eq .Code 0}}p:magenta{{end}}",
|
||||||
|
]
|
||||||
|
template = ' '
|
||||||
|
|
||||||
|
[transient_prompt]
|
||||||
|
background = 'transparent'
|
||||||
|
foreground_templates = [
|
||||||
|
"{{if gt .Code 0}}p:red{{end}}",
|
||||||
|
"{{if eq .Code 0}}p:magenta{{end}}",
|
||||||
|
]
|
||||||
|
template = ' '
|
||||||
|
|
||||||
|
[palette]
|
||||||
|
purple = "#9580ff"
|
||||||
|
magenta = "#ff80bf"
|
||||||
|
white = "#eeeeee"
|
||||||
|
red = "#ff5555"
|
||||||
|
green = "#8aff80"
|
||||||
|
orange = "#ffca80"
|
||||||
|
yellow = "#f1fa8c"
|
12
.zshrc
12
.zshrc
@ -1,6 +1,3 @@
|
|||||||
# If you come from bash you might have to change your $PATH.
|
|
||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
@ -8,7 +5,6 @@ export ZSH="$HOME/.oh-my-zsh"
|
|||||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
||||||
# Set list of themes to pick from when loading at random
|
# Set list of themes to pick from when loading at random
|
||||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
# a theme from this variable instead of looking in $ZSH/themes/
|
# a theme from this variable instead of looking in $ZSH/themes/
|
||||||
@ -99,10 +95,6 @@ export DBUS_SESSION_BUS_ADRESS="unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET"
|
|||||||
# alias zshconfig="mate ~/.zshrc"
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
||||||
plugins=(zsh-autosuggestions sudo zsh-syntax-highlighting)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# on startup
|
# on startup
|
||||||
|
|
||||||
eval $(thefuck --alias)
|
eval $(thefuck --alias)
|
||||||
@ -267,8 +259,8 @@ function importimg {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# Initialize Oh My Posh
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
eval "$(oh-my-posh init zsh --config ~/.config/ohmyposh/config.toml)"
|
||||||
|
|
||||||
# Setup fzf key bindings and fuzzy completion
|
# Setup fzf key bindings and fuzzy completion
|
||||||
eval "$(fzf --zsh)"
|
eval "$(fzf --zsh)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user