added oh-my-posh. Removed p10k
This commit is contained in:
parent
21769684b1
commit
e4d2947f66
141
.config/oh-my-posh/config.toml
Normal file
141
.config/oh-my-posh/config.toml
Normal file
@ -0,0 +1,141 @@
|
||||
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||
|
||||
version = 2
|
||||
final_space = true
|
||||
disable_notice = true
|
||||
|
||||
[palette]
|
||||
status_success = "#43f716"
|
||||
status_failure = "#f72916"
|
||||
white = "#FFFFFF"
|
||||
path = "green"
|
||||
git_tooltip = "red"
|
||||
go_tooltip = "green"
|
||||
node_tooltip = "green"
|
||||
docker = "blue"
|
||||
kube = "yellow"
|
||||
|
||||
[[blocks]]
|
||||
alignment = "left"
|
||||
type = "prompt"
|
||||
|
||||
# SSH
|
||||
[[blocks.segments]]
|
||||
type = "session"
|
||||
template = "{{ if .SSHSession}} {{ end }}"
|
||||
|
||||
# Path
|
||||
[[blocks.segments]]
|
||||
type = "path"
|
||||
background = "p:path"
|
||||
foreground = "p:white"
|
||||
style = "diamond"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = " {{ .Path }} "
|
||||
[blocks.segments.properties]
|
||||
style = "full"
|
||||
home_icon = "~"
|
||||
|
||||
|
||||
[[blocks]]
|
||||
alignment = "right"
|
||||
type = "prompt"
|
||||
|
||||
# Docker context
|
||||
[[blocks.segments]]
|
||||
type = "docker"
|
||||
style = "diamond"
|
||||
foreground = "p:white"
|
||||
background = "p:docker"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = " {{ .Context }}"
|
||||
|
||||
# kubectl context
|
||||
[[blocks.segments]]
|
||||
type = "kubectl"
|
||||
style = "diamond"
|
||||
foreground = "p:white"
|
||||
background = "p:kube"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = " {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} "
|
||||
|
||||
# Newline prompt
|
||||
[[blocks.segments]]
|
||||
type = "status"
|
||||
style = "plain"
|
||||
foreground = "p:status_success"
|
||||
foreground_templates = [
|
||||
"{{ if .Error }}p:status_failure{{ end }}",
|
||||
"{{ if not .Error}}p:status_success{{ end }}"
|
||||
]
|
||||
template = "\n❯"
|
||||
[blocks.segments.properties]
|
||||
always_enabled = true
|
||||
|
||||
[transient_prompt]
|
||||
foreground = "p:status_success"
|
||||
template = "❯ "
|
||||
|
||||
# Git
|
||||
[[tooltips]]
|
||||
type = "git"
|
||||
tips = [ "git", "g" ]
|
||||
style = "diamond"
|
||||
foreground = "p:white"
|
||||
background = "p:git_tooltip"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = "{{ url .HEAD .UpstreamURL }}{{ if .UpstreamIcon }} {{.UpstreamIcon}} {{ end }}{{ if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}"
|
||||
[tooltips.properties]
|
||||
fetch_status = true
|
||||
fetch_upstream_icon = true
|
||||
branch_icon = " "
|
||||
branch_identical_icon = " "
|
||||
branch_ahead_icon = " "
|
||||
branch_behind_icon = " "
|
||||
branch_gone_icon = " "
|
||||
[tooltips.properties.upstream_icons]
|
||||
"git.kapelle.org" = " "
|
||||
|
||||
# Go
|
||||
[[tooltips]]
|
||||
type = "go"
|
||||
tips = [ "go" ]
|
||||
style = "diamond"
|
||||
foreground = "p:white"
|
||||
background = "p:go_tooltip"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = " {{ .Major }}.{{ .Minor }}"
|
||||
[tooltips.properties]
|
||||
cache_version = true
|
||||
|
||||
# Rust
|
||||
[[tooltips]]
|
||||
type = "rust"
|
||||
tips = [ "rustc", "cargo", "rustup" ]
|
||||
style = "diamond"
|
||||
foreground = "p:white"
|
||||
background = "p:go_tooltip"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = " {{ .Full }}"
|
||||
[tooltips.properties]
|
||||
cache_version = true
|
||||
|
||||
# Node
|
||||
[[tooltips]]
|
||||
type = "node"
|
||||
tips = [ "node", "npm" ]
|
||||
style = "diamond"
|
||||
foreground = "p:white"
|
||||
background = "p:node_tooltip"
|
||||
leading_diamond = ""
|
||||
trailing_diamond = ""
|
||||
template = " {{ .Full }}"
|
||||
[tooltips.properties]
|
||||
cache_version = true
|
||||
|
9
.zshrc
9
.zshrc
@ -17,17 +17,14 @@ export PATH=$HOME/.local/bin:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/
|
||||
# NIXOS specific stuff
|
||||
source /etc/zshrc
|
||||
|
||||
# P10K stuff
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
[[ ! -f ~/.cache/p10k.zsh ]] || source ~/.cache/p10k.zsh
|
||||
|
||||
# wal subshell for terminal colors
|
||||
if test -f $XDG_CACHE_HOME/wal/sequences; then
|
||||
(cat $XDG_CACHE_HOME/wal/sequences &)
|
||||
fi
|
||||
|
||||
# Start oh-my-posh
|
||||
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/oh-my-posh/config.toml)"
|
||||
|
||||
# Variables
|
||||
export MANPAGER="bat -l man -p"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user