From 8236b016362aa36435e0fd4bb7f54333cbf6b157 Mon Sep 17 00:00:00 2001 From: gibbyb Date: Thu, 30 Jan 2025 13:21:06 -0600 Subject: [PATCH] Add oh my posh --- .../dotfiles/ohmyposh/EDM115-newline.omp.json | 192 ++++++++++++++++++ configs/dotfiles/ohmyposh/zen.toml | 74 +++++++ packages/espanso | 2 +- packages/grub-btrfs | 2 +- 4 files changed, 268 insertions(+), 2 deletions(-) create mode 100644 configs/dotfiles/ohmyposh/EDM115-newline.omp.json create mode 100644 configs/dotfiles/ohmyposh/zen.toml diff --git a/configs/dotfiles/ohmyposh/EDM115-newline.omp.json b/configs/dotfiles/ohmyposh/EDM115-newline.omp.json new file mode 100644 index 0000000..78a53f7 --- /dev/null +++ b/configs/dotfiles/ohmyposh/EDM115-newline.omp.json @@ -0,0 +1,192 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "transient_prompt": { + "template": " ❯❯ {{ .AbsolutePWD }} : ", + "foreground": "#f8f8f2", + "background": "transparent", + "newline": true + }, + "blocks": [ + { + "type": "prompt", + "alignment": "left", + "segments": [ + { + "properties": { + "cache_duration": "none" + }, + "template": "\n\u256d\u2500", + "foreground": "#f8f8f2", + "type": "text", + "style": "plain" + }, + { + "properties": { + "cache_duration": "none" + }, + "leading_diamond": "\ue0b6", + "template": "{{ .UserName }}@{{ .HostName }}", + "foreground": "#f8f8f2", + "background": "#282a36", + "type": "session", + "style": "diamond" + }, + { + "properties": { + "cache_duration": "none" + }, + "template": "\udb85\udc0b", + "foreground": "#ff5555", + "powerline_symbol": "\ue0b0", + "background": "#282a36", + "type": "root", + "style": "powerline" + }, + { + "properties": { + "cache_duration": "none" + }, + "template": "{{ .Icon }} ", + "foreground": "#f8f8f2", + "powerline_symbol": "\ue0b0", + "background": "#282a36", + "type": "os", + "style": "powerline" + }, + { + "properties": { + "cache_duration": "none", + "style": "full" + }, + "trailing_diamond": "\ue0b4", + "template": " \udb80\ude56 {{ path .Path .Location }}", + "foreground": "#282a36", + "background": "#cccccc", + "type": "path", + "style": "diamond" + } + ] + }, + { + "type": "prompt", + "alignment": "right", + "segments": [ + { + "properties": { + "branch_icon": "", + "cache_duration": "none", + "display_changing_color": true, + "fetch_status": true, + "fetch_upstream_icon": true, + "full_branch_path": true + }, + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\ue725 ({{ url .UpstreamIcon .UpstreamURL }} {{ url .HEAD .UpstreamURL }}){{ if gt .Ahead 0 }}<#50fa7b> +{{ .Ahead }}{{ end }}{{ if gt .Behind 0 }}<#ff5555> -{{ .Behind }}{{ end }}{{ if .Working.Changed }}<#f8f8f2> \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }}<#f8f8f2> \uf046 {{ .Staging.String }}{{ end }}", + "foreground": "#282a36", + "background": "#ffb86c", + "type": "git", + "style": "diamond" + }, + { + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\ue718 {{ .Full }}", + "foreground": "#282a36", + "background": "#50fa7b", + "type": "node", + "style": "diamond" + }, + { + "properties": { + "display_mode": "files", + "extensions": [ + "package-lock.json" + ] + }, + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\ue71e {{ .Full }}", + "foreground": "#282a36", + "background": "#ff5555", + "type": "npm", + "style": "diamond" + }, + { + "properties": { + "display_mode": "files", + "extensions": [ + "pnpm-lock.yaml" + ] + }, + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\udb80\udec1 {{ .Full }}", + "foreground": "#282a36", + "background": "#ffb86c", + "type": "pnpm", + "style": "diamond" + }, + { + "properties": { + "display_mode": "files" + }, + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\ue73c {{ .Full }}", + "foreground": "#282a36", + "background": "#50fa7b", + "type": "python", + "style": "diamond" + }, + { + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\ue738 {{ .Full }}", + "foreground": "#282a36", + "background": "#ff79c6", + "type": "java", + "style": "diamond" + }, + { + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\uf308 {{ .Context }}", + "foreground": "#282a36", + "background": "#8be9fd", + "type": "docker", + "style": "diamond" + }, + { + "leading_diamond": "\ue0b6", + "trailing_diamond": "\ue0b4", + "template": "\ue73d {{ .Full }}", + "foreground": "#f8f8f2", + "background": "#6272a4", + "type": "php", + "style": "diamond" + } + ] + }, + { + "type": "prompt", + "alignment": "left", + "segments": [ + { + "properties": { + "always_enabled": true, + "cache_duration": "none" + }, + "template": "\u2570\u2500 ❯❯", + "foreground": "#f8f8f2", + "type": "text", + "style": "diamond" + } + ], + "newline": true + } + ], + "version": 3, + "patch_pwsh_bleed": true, + "final_space": true +} diff --git a/configs/dotfiles/ohmyposh/zen.toml b/configs/dotfiles/ohmyposh/zen.toml new file mode 100644 index 0000000..832848d --- /dev/null +++ b/configs/dotfiles/ohmyposh/zen.toml @@ -0,0 +1,74 @@ +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +final_space = true +console_title_template = '{{ .Shell }} in {{ .Folder }}' + +[[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' + foreground = 'p:grey' + background = 'transparent' + template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' + + [blocks.segments.properties] + branch_icon = '' + commit_icon = '@' + fetch_status = true + +[[blocks]] + type = 'rprompt' + overflow = 'hidden' + + [[blocks.segments]] + type = 'executiontime' + style = 'plain' + foreground = 'yellow' + background = 'transparent' + template = '{{ .FormattedMs }}' + + [blocks.segments.properties] + threshold = 5000 + +[[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 = '❯ ' + +[secondary_prompt] + foreground = 'magenta' + background = 'transparent' + template = '❯❯ ' \ No newline at end of file diff --git a/packages/espanso b/packages/espanso index fd9a7dd..b9ac086 160000 --- a/packages/espanso +++ b/packages/espanso @@ -1 +1 @@ -Subproject commit fd9a7dd4f2afccaeb61623286b1230c0df0c7033 +Subproject commit b9ac086adf5c14d07f8b60a7009acd878f6cf7ca diff --git a/packages/grub-btrfs b/packages/grub-btrfs index b509fca..f682e17 160000 --- a/packages/grub-btrfs +++ b/packages/grub-btrfs @@ -1 +1 @@ -Subproject commit b509fcaf6119d5c4b07fe37692fc3d5c6cb94f56 +Subproject commit f682e17b30def8ebbf9b4b3f0a60df0443633e4c