test out omp
This commit is contained in:
parent
5053ae0ab2
commit
da8259fc9e
4 changed files with 99 additions and 14 deletions
82
home/private_dot_config/omp/config.yml
Normal file
82
home/private_dot_config/omp/config.yml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||||
|
# TODO: add segments I care about.... go python node.... so on?
|
||||||
|
version: 2
|
||||||
|
transient_prompt:
|
||||||
|
foreground: cyan
|
||||||
|
background: transparent
|
||||||
|
template: "❯ "
|
||||||
|
final_space: true
|
||||||
|
blocks:
|
||||||
|
- type: prompt
|
||||||
|
alignment: left
|
||||||
|
segments:
|
||||||
|
- type: python
|
||||||
|
style: plain
|
||||||
|
foreground: "yellow"
|
||||||
|
template: " {{ .Full }}"
|
||||||
|
- type: git
|
||||||
|
foreground: '#F3C267'
|
||||||
|
foreground_templates:
|
||||||
|
- '{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}'
|
||||||
|
- '{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}'
|
||||||
|
- '{{ if gt .Ahead 0 }}#B388FF{{ end }}'
|
||||||
|
- '{{ if gt .Behind 0 }}#B388FF{{ end }}'
|
||||||
|
properties:
|
||||||
|
branch_max_length: 25
|
||||||
|
fetch_stash_count: true
|
||||||
|
fetch_status: true
|
||||||
|
fetch_upstream_icon: true
|
||||||
|
style: plain
|
||||||
|
template: >
|
||||||
|
{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}
|
||||||
|
{{ if .Working.Changed }} {{ .Working.String }}{{ end }}
|
||||||
|
{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}
|
||||||
|
{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}
|
||||||
|
{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }}
|
||||||
|
- type: prompt
|
||||||
|
alignment: left
|
||||||
|
newline: true
|
||||||
|
segments:
|
||||||
|
- type: session
|
||||||
|
background: transparent
|
||||||
|
foreground: "#ffffff"
|
||||||
|
style: diamond
|
||||||
|
template: >
|
||||||
|
{{ if .SSHSession }} {{ .UserName}}@{{ .HostName }}{{ end }}
|
||||||
|
- type: path
|
||||||
|
foreground: 'cyan'
|
||||||
|
properties:
|
||||||
|
style: full
|
||||||
|
style: plain
|
||||||
|
template: {{ .Path }}
|
||||||
|
- type: prompt
|
||||||
|
alignment: right
|
||||||
|
segments:
|
||||||
|
- type: status
|
||||||
|
style: plain
|
||||||
|
foreground: 'green'
|
||||||
|
foreground_templates:
|
||||||
|
- '{{ if gt .Code 0 }}red{{ end }}'
|
||||||
|
template: ' x{{ reason .Code }}'
|
||||||
|
- foreground: 'green'
|
||||||
|
foreground_templates:
|
||||||
|
- '{{ if gt .Code 0 }}red{{ end }}'
|
||||||
|
properties:
|
||||||
|
style: roundrock
|
||||||
|
always_enabled: true
|
||||||
|
style: diamond
|
||||||
|
template: ' {{ .FormattedMs }} '
|
||||||
|
type: executiontime
|
||||||
|
- type: prompt
|
||||||
|
alignment: left
|
||||||
|
newline: true
|
||||||
|
segments:
|
||||||
|
- foreground: 'red'
|
||||||
|
style: plain
|
||||||
|
template: '!'
|
||||||
|
type: root
|
||||||
|
- foreground: 'green'
|
||||||
|
style: plain
|
||||||
|
template: ❯
|
||||||
|
type: text
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
# this probably shouldn't be necessary but I'll leave it here anyways
|
# this probably shouldn't be necessary but I'll leave it here anyways
|
||||||
# since instant prompt hides the cost
|
# since instant prompt hides the cost
|
||||||
|
|
||||||
autoload -Uz compinit
|
# autoload -Uz compinit
|
||||||
if [[ -n $HOME/.cache/zsh/zcompdump-$ZSH_VERSION(#qN.mh+24) ]]; then
|
# if [[ -n $HOME/.cache/zsh/zcompdump-$ZSH_VERSION(#qN.mh+24) ]]; then
|
||||||
compinit -d "$HOME/.cache/zsh/zcompdump-$ZSH_VERSION"
|
# compinit -d "$HOME/.cache/zsh/zcompdump-$ZSH_VERSION"
|
||||||
else
|
# else
|
||||||
compinit -C;
|
# compinit -C;
|
||||||
fi;
|
# fi;
|
||||||
|
|
|
@ -3,13 +3,15 @@
|
||||||
|
|
||||||
0=${(%):-%N}
|
0=${(%):-%N}
|
||||||
# fpath+="${0:A:h}/functions"
|
# fpath+="${0:A:h}/functions"
|
||||||
autoload -Uz promptinit && promptinit
|
# autoload -Uz promptinit && promptinit
|
||||||
|
#
|
||||||
|
# if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then
|
||||||
|
# [[ ! -f $ZDOTDIR/themes/.p10k.zsh ]] || source $ZDOTDIR/themes/.p10k.zsh
|
||||||
|
# else
|
||||||
|
# [[ ! -f $ZDOTDIR/themes/.p10k-ascii.zsh ]] || source $ZDOTDIR/themes/.p10k-ascii.zsh
|
||||||
|
# fi
|
||||||
|
# prompt powerlevel10k
|
||||||
|
|
||||||
if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then
|
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/omp/config.yml)"
|
||||||
[[ ! -f $ZDOTDIR/themes/.p10k.zsh ]] || source $ZDOTDIR/themes/.p10k.zsh
|
|
||||||
else
|
|
||||||
[[ ! -f $ZDOTDIR/themes/.p10k-ascii.zsh ]] || source $ZDOTDIR/themes/.p10k-ascii.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
prompt powerlevel10k
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ export EZA_MIN_LUMINANCE=50
|
||||||
|
|
||||||
is-tty || alias eza="eza --icons"
|
is-tty || alias eza="eza --icons"
|
||||||
alias ls='eza'
|
alias ls='eza'
|
||||||
|
alias la='eza -la'
|
||||||
alias l='eza -lb --git'
|
alias l='eza -lb --git'
|
||||||
alias llm='eza -lbGd --git --sort=modified'
|
alias llm='eza -lbGd --git --sort=modified'
|
||||||
alias lx='eza -lbhHigUmuSa --time-style=long-iso --git --color-scale'
|
alias lx='eza -lbhHigUmuSa --time-style=long-iso --git --color-scale'
|
||||||
|
|
Loading…
Reference in a new issue