From 07c5ee399fa8de8294268db8be3d8c66ea7a345d Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 17 Sep 2026 14:04:32 +0200 Subject: [PATCH] nicer zsh omp prompt --- dot_zsh/atomic-one-line.omp.json | 86 ++++++++++++++++++++++++++++++++ dot_zshrc | 2 +- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 dot_zsh/atomic-one-line.omp.json diff --git a/dot_zsh/atomic-one-line.omp.json b/dot_zsh/atomic-one-line.omp.json new file mode 100644 index 0000000..189f576 --- /dev/null +++ b/dot_zsh/atomic-one-line.omp.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "blocks": [ + { + "alignment": "left", + "segments": [ + { + "background": "#0077c2", + "foreground": "#ffffff", + "leading_diamond": "\ue0b6", + "style": "diamond", + "template": "\uf120 {{ .Name }} ", + "type": "shell" + }, + { + "background": "#ef5350", + "foreground": "#FFFB38", + "style": "diamond", + "template": "\ue0b0 \uf292 ", + "type": "root" + }, + { + "background": "#FF9248", + "foreground": "#2d3436", + "powerline_symbol": "\ue0b0", + "style": "powerline", + "template": " \uf07b {{ .Path }} ", + "type": "path", + "properties": { + "home_icon": "~", + "folder_separator_icon": " \ue0b1 ", + "style": "agnoster_short", + "max_depth": 3 + } + }, + { + "background": "#FFFB38", + "background_templates": [ + "{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}", + "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}", + "{{ if gt .Ahead 0 }}#C792EA{{ end }}", + "{{ if gt .Behind 0 }}#C792EA{{ end }}" + ], + "foreground": "#011627", + "powerline_symbol": "\ue0b0", + "style": "powerline", + "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ", + "type": "git", + "properties": { + "branch_icon": "\ue725 ", + "branch_template": "{{ trunc 30 .Branch }}", + "fetch_status": true, + "fetch_upstream_icon": true, + "fetch_stash_count": true + } + }, + { + "background": "#83769c", + "foreground": "#ffffff", + "style": "diamond", + "template": " \ueba2\u200b{{ .FormattedMs }}\u2800", + "trailing_diamond": "\ue0b4", + "type": "executiontime", + "properties": { + "style": "roundrock", + "threshold": 0 + } + }, + { + "foreground": "#e0f8ff", + "foreground_templates": [ + "{{ if gt .Code 0 }}#ef5350{{ end }}" + ], + "style": "plain", + "template": " \ue285\ueab6 ", + "type": "status", + "properties": { + "always_enabled": true + } + } + ], + "type": "prompt" + } + ], + "version": 3 +} \ No newline at end of file diff --git a/dot_zshrc b/dot_zshrc index 10700cb..75b1950 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -90,7 +90,7 @@ setopt share_history # share history between running shells ZSH_CACHE_DIR=${XDG_CACHE_HOME:-$HOME/.cache}/zsh [[ -d $ZSH_CACHE_DIR ]] || mkdir -p $ZSH_CACHE_DIR -OMP_CONFIG=$HOME/.zsh/rudolfs-dark.omp.json +OMP_CONFIG=$HOME/.zsh/atomic-one-line.omp.json # -----------------------------------------------------------------------------