Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fish shell configuration with multiple prompts #36

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 178 additions & 0 deletions config/.config/bubbles.omp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "right",
"segments": [
{
"background": "#29315A",
"foreground": "#3EC669",
"leading_diamond": "\ue0b6",
"properties": {
"style": "folder"
},
"style": "diamond",
"template": "\ue5ff {{ .Path }}",
"trailing_diamond": "\ue0b4",
"type": "path"
},
{
"background": "#29315A",
"foreground": "#43CCEA",
"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 }}"
],
"leading_diamond": " \ue0b6",
"properties": {
"branch_max_length": 25,
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "diamond",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4",
"type": "git"
},
{
"background": "#29315A",
"foreground": "#E4F34A",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "python"
},
{
"background": "#29315A",
"foreground": "#7FD5EA",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue626{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "go"
},
{
"background": "#29315A",
"foreground": "#42E66C",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue718{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"trailing_diamond": "\ue0b4",
"type": "node"
},
{
"background": "#29315A",
"foreground": "#E64747",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue791{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "ruby"
},
{
"background": "#29315A",
"foreground": "#E64747",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue738{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "java"
},
{
"background": "#29315A",
"foreground": "#9B6BDF",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue624{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"trailing_diamond": "\ue0b4",
"type": "julia"
},
{
"type": "php",
"style": "diamond",
"foreground": "#ffffff",
"background": "#4063D8",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"template": "\ue73d {{ .Full }} ",
"trailing_diamond": "\ue0b4"
},
{
"background": "#29315A",
"foreground": "#9B6BDF",
"foreground_templates": [
"{{if eq \"Charging\" .State.String}}#40c4ff{{end}}",
"{{if eq \"Discharging\" .State.String}}#ff5722{{end}}",
"{{if eq \"Full\" .State.String}}#4caf50{{end}}"
],
"leading_diamond": " \ue0b6",
"properties": {
"charged_icon": "• ",
"charging_icon": "\u21e1 ",
"discharging_icon": "\u21e3 "
},
"style": "diamond",
"template": "{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}",
"trailing_diamond": "\ue0b4",
"type": "battery"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"background": "#29315A",
"foreground": "#AEA4BF",
"leading_diamond": "\ue0b6",
"properties": {
"style": "austin",
"threshold": 150
},
"style": "diamond",
"template": "{{ .FormattedMs }}",
"trailing_diamond": "\ue0b4 ",
"type": "executiontime"
},
{
"background": "#29315A",
"foreground": "#E64747",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": "{{ .UserName }} \u276f",
"trailing_diamond": "\ue0b4",
"type": "text"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}
124 changes: 124 additions & 0 deletions config/.config/default.omp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "cyan",
"properties": {
"style": "folder"
},
"style": "plain",
"template": "{{ .Path }} ",
"type": "path"
},
{
"foreground": "#F141A8",
"properties": {
"branch_icon": "\uf418 ",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_e_count": true
},
"style": "diamond",
"template": "{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#CF9152> {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"type": "git"
},
{
"foreground": "#FFA400",
"style": "plain",
"template": " {{.Profile}}{{if .Region}}@{{.Region}}{{end}}",
"type": "aws"
},
{
"foreground": "#ff7a14",
"style": "plain",
"template": "{{if .Version}} 󰏗 {{.Version}} {{end}}",
"type": "project"
},
{
"foreground": "green",
"properties": {
"fetch_version": true
},
"style": "plain",
"template": "󰎙 {{ .Full }} ",
"type": "node"
},
{
"foreground": "#CF043D",
"style": "plain",
"template": "󰴭 {{.Full}} ",
"type": "ruby"
},
{
"foreground": "#4063DB",
"style": "plain",
"template": " {{.Full}} ",
"type": "php"
},
{
"foreground": "#7FD5EA",
"style": "plain",
"template": " {{.Full}} ",
"type": "go"
},
{
"foreground": "#906cff",
"style": "plain",
"template": " {{.Full}} ",
"type": "python"
},
{
"foreground": "#99908A",
"style": "plain",
"template": " {{.Full}} ",
"type": "rust"
},
{
"foreground": "blue",
"style": "plain",
"template": " {{.Full}} ",
"type": "lua"
},
{
"foreground": "yellow",
"leading_diamond": "<yellow>󰔛</>",
"properties": {
"style": "roundrock",
"threshold": 0
},
"style": "diamond",
"template": " {{ .FormattedMs }} ",
"type": "executiontime"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "green",
"style": "plain",
"template": "\u276f ",
"type": "text"
}
],
"valid_line": {
"background": "transparent",
"foreground": "#ffffff",
"template": "<#e0def4,#286983>\uf42e </><#286983,transparent>\ue0b4</> "
},
"error_line": {
"background": "transparent",
"foreground": "#ffffff",
"template": "<#eb6f92,#286983>\ue009 </><#286983,transparent>\ue0b4</> "
},
"type": "prompt"
}
],
"version": 2
}
3 changes: 2 additions & 1 deletion fish/.config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ source ~/.config/fish/conf.d/exports.fish
source ~/.config/fish/conf.d/paths.fish
source ~/.config/fish/conf.d/abbr.fish

# Prompt - Starship
# Prompts - Starship & Oh My Posh
starship init fish | source
# oh-my-posh init fish --config ~/.config/default.omp.json | source
5 changes: 3 additions & 2 deletions packages/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ tap 'teamookla/speedtest' # Command line speed test utility
#############################################################
# 1. Command Line #
#############################################################
brew 'fish' # Shell
brew 'starship' # Cross-shell prompt - Rust
brew 'fish' # Shell
brew 'starship' # Cross-shell prompt - Rust
# brew 'jandedobbeleer/oh-my-posh/oh-my-posh' # Cross-shell prompt - Go

# CLI Essentials
brew 'git' # Version controll
Expand Down