From 3cb592932b547406298b74c654d344a865b3561a Mon Sep 17 00:00:00 2001 From: Devin Haska <2636402+wonderfulfrog@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:46:08 -0700 Subject: [PATCH] feat: add oh my posh, remove roundy --- .config/ohmyposh/config.toml | 55 ++++++++++++++++++++++++++++++++++++ .config/taplo/taplo.toml | 3 ++ .zshrc | 5 ++-- 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .config/ohmyposh/config.toml create mode 100644 .config/taplo/taplo.toml diff --git a/.config/ohmyposh/config.toml b/.config/ohmyposh/config.toml new file mode 100644 index 0000000..5551df3 --- /dev/null +++ b/.config/ohmyposh/config.toml @@ -0,0 +1,55 @@ +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +final_space = true +console_title_template = '{{ .PWD }}' + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'path' + style = 'plain' + background = 'transparent' + foreground = 'blue' + template = '{{ .Path }}' + + [blocks.segments.properties] + style = 'full' + + [[blocks.segments]] + type = 'git' + style = 'plain' + background = 'transparent' + foreground = '#2ac3de' + template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ .Behind }}{{ end }}{{ if gt .Ahead 0 }}⇡{{ .Ahead }}{{ end }}' + + [blocks.segments.properties] + branch_icon = '' + commit_icon = '@' + fetch_status = true + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'text' + style = 'plain' + foreground_templates = [ + '{{if gt .Code 0}}red{{end}}', + '{{ if eq .Code 0}}magenta{{end}}', + ] + background = 'transparent' + template = '❱' + +[transient_prompt] + foreground_templates = [ + '{{if gt .Code 0}}red{{end}}', + '{{ if eq .Code 0}}magenta{{end}}', + ] + background = 'transparent' + template = '❱ ' diff --git a/.config/taplo/taplo.toml b/.config/taplo/taplo.toml new file mode 100644 index 0000000..78f5e61 --- /dev/null +++ b/.config/taplo/taplo.toml @@ -0,0 +1,3 @@ +[formatting] +indent_tables = true +indent_entries = true diff --git a/.zshrc b/.zshrc index 3f50c89..4531894 100644 --- a/.zshrc +++ b/.zshrc @@ -3,9 +3,10 @@ ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" [ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" source "${ZINIT_HOME}/zinit.zsh" -zinit light nullxception/roundy zinit light zsh-users/zsh-syntax-highlighting zinit light zsh-users/zsh-autosuggestions zinit light Aloxaf/fzf-tab -ROUNDY_DIR_MODE="full" +if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then + eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/config.toml)" +fi