Last active
December 5, 2023 12:50
-
-
Save JanDeDobbeleer/3f09d9be09f7af01cc39c3dab695c98f to your computer and use it in GitHub Desktop.
Configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: | |
- name: a | |
value: aliae | |
- name: g | |
value: git | |
- name: z | |
value: zoxide | |
- name: ls | |
value: exa -la --icons | |
if: hasCommand "exa" | |
- name: cat | |
value: bat | |
- name: code | |
value: code-insiders | |
if: hasCommand "code-insiders" | |
- name: bash | |
value: /Users/jan/homebrew/bin/bash | |
if: match .OS "darwin" | |
- name: sync | |
value: "!git fetch origin; git rebase origin/main" | |
type: git | |
- name: amend | |
value: commit -a --amend --no-edit | |
type: git | |
- name: s | |
value: status | |
type: git | |
- name: h | |
value: log --graph --pretty=format:'%C(white)%h%Creset - %C(blue)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' | |
type: git | |
- name: uc | |
value: reset --soft HEAD^ | |
type: git | |
- name: a | |
value: commit -a --amend --no-edit | |
type: git | |
- name: p | |
value: "!git push --set-upstream ${1-origin} HEAD" | |
type: git | |
- name: ap | |
value: "!git add .;git commit --amend --no-edit;git push ${1-origin} +${2-HEAD}" | |
type: git | |
- name: fp | |
value: "!git push ${1-origin} +HEAD" | |
type: git | |
env: | |
- name: POSH_THEME | |
value: https://gist.githubusercontent.com/JanDeDobbeleer/3f09d9be09f7af01cc39c3dab695c98f/raw/posh.omp.jsonc | |
- name: EDITOR | |
value: code-insiders --wait | |
- name: EDITOR | |
value: code --wait | |
if: match .OS "windows" | |
persist: true | |
- name: VOLTA_HOME | |
value: '{{ .Home }}/.volta' | |
path: | |
- value: | | |
{{ .Home }}/homebrew/bin | |
/usr/local/bin/ | |
/opt/local/bin/ | |
if: match .OS "darwin" | |
- value: | | |
{{ .Home }}/go/bin/ | |
{{ env "VOLTA_HOME" }}/bin | |
script: | |
- value: | | |
oh-my-posh init nu | |
source ~/.oh-my-posh.nu | |
if: match .Shell "nu" | |
- value: | | |
oh-my-posh init fish | source | |
if: match .Shell "fish" | |
- value: | | |
load(io.popen('oh-my-posh init cmd'):read("*a"))() | |
if: match .Shell "cmd" | |
- value: | | |
function prompt { | |
oh-my-posh init pwsh | Invoke-Expression | |
} | |
Set-PSReadLineOption -Colors @{ "Parameter"="`e[33m" } | |
Set-PSReadLineOption -Colors @{ "Operator"="`e[33m" } | |
if: match .Shell "pwsh" | |
- value: | | |
xontrib load autovox | |
xontrib load vox | |
xontrib load voxapi | |
xontrib load bashisms | |
execx($(oh-my-posh init xonsh)) | |
if: match .Shell "xonsh" | |
- value: | | |
eval `oh-my-posh init tcsh` | |
if: match .Shell "tcsh" | |
- value: | | |
[[ -f "$HOME/.fig/shell/{{ .Shell }}rc.pre.{{ .Shell }}" ]] && builtin source "$HOME/.fig/shell/{{ .Shell }}rc.pre.{{ .Shell }}" | |
eval "$(oh-my-posh init {{ .Shell }})" | |
[ -f ~/.fzf.{{ .Shell }} ] && source ~/.fzf.{{ .Shell }} | |
[[ -f "$HOME/.fig/shell/{{ .Shell }}rc.post.{{ .Shell }}" ]] && builtin source "$HOME/.fig/shell/{{ .Shell }}rc.post.{{ .Shell }}" | |
if: match .Shell "bash" "zsh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"type": "session", | |
"foreground": "#ffffff", | |
"template": "{{ if .SSHSession }}\uf489 {{ end }}" | |
}, | |
{ | |
"background": "p:yellow", | |
"foreground": "p:black", | |
"leading_diamond": "\ue0b6", | |
"style": "diamond", | |
"template": " {{ .UserName }} ", | |
"trailing_diamond": "\ue0b0", | |
"type": "text" | |
}, | |
{ | |
"background": "p:orange", | |
"foreground": "p:white", | |
"powerline_symbol": "\ue0b0", | |
"style": "powerline", | |
"properties": { | |
"style": "folder" | |
}, | |
"template": "{{ $segment := .Segments.Git }}{{ $icon := \"\uf1d2\" }}{{ if .Segments.Sapling.Dir }}{{ $segment = .Segments.Sapling }}{{ $icon = \"\ue22f\" }}{{ end }}{{ if $segment.Dir }} {{ $icon }} <i><b>{{ $segment.RepoName }}</b></i>{{if ne $segment.RepoName .Path}} \uf554 {{ trimPrefix $segment.Dir .PWD }}{{ end }}{{ else }} \uea83 {{ path .Path .Location }}{{ end }}{{ if not .Writable }} \uf023{{ end }} ", | |
"type": "path" | |
}, | |
{ | |
"background": "p:green", | |
"background_templates": [ | |
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}", | |
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}", | |
"{{ if gt .Ahead 0 }}#49416D{{ end }}", | |
"{{ if gt .Behind 0 }}#7A306C{{ end }}" | |
], | |
"foreground": "p:black", | |
"foreground_templates": [ | |
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}", | |
"{{ if or (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}" | |
], | |
"powerline_symbol": "\ue0b0", | |
"properties": { | |
"branch_max_length": 25, | |
"fetch_status": true, | |
"fetch_upstream_icon": true, | |
"github_icon": "\uf7a3", | |
"exclude_status": ["X:/go/*"], | |
"branch_icon": "<blue> </>" | |
}, | |
"style": "powerline", | |
"template": " {{ if .IsBare }}(BARE) {{ end }}{{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ url .HEAD .Kraken }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf0c7{{ .StashCount }}{{ end }} ", | |
"type": "git" | |
}, | |
{ | |
"foreground": "p:black", | |
"background": "p:green", | |
"background_templates": [ | |
"{{ if .Working.Changed }}p:yellow{{ end }}", | |
"{{ if .Bookmark }}#7287fd{{ end }}" | |
], | |
"foreground_templates": [ | |
"{{ if .Working.Changed }}p:black{{ end }}", | |
"{{ if .Bookmark }}p:white{{ end }}" | |
], | |
"powerline_symbol": "\ue0b0", | |
"style": "powerline", | |
"properties": { | |
"fetch_status": true | |
}, | |
"template": " {{ if .New }}\udb84\uded9{{ else if .Bookmark }}\uf097 {{ .Bookmark }}*{{ else }}\ue729 {{ .Description | abbrev 20 }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }} ", | |
"type": "sapling" | |
}, | |
{ | |
"type": "project", | |
"style": "powerline", | |
"powerline_symbol": "\uE0B0", | |
"foreground": "#193549", | |
"background": "#ffeb3b", | |
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} " | |
}, | |
{ | |
"background": "p:yellow", | |
"foreground": "p:white", | |
"powerline_symbol": "\ue0b0", | |
"properties": { | |
"root_icon": "\uf0ad" | |
}, | |
"style": "powerline", | |
"template": " \uf0e7 ", | |
"type": "root" | |
}, | |
{ | |
"background": "accent", | |
"background_templates": ["{{ if .Error }}p:red{{ end }}"], | |
"foreground": "p:white", | |
"leading_diamond": "<transparent,background>\ue0b0</>", | |
"properties": { | |
"always_enabled": true, | |
"status_template": "{{ if eq .Code 0 }}\uf00c{{ else }}\uf071{{ end }}", | |
"status_separator": " " | |
}, | |
"style": "diamond", | |
"template": " {{ .String }}{{ if lt .Code 0 }} {{ .Code | hresult }}{{ end }} ", | |
"trailing_diamond": "\ue0b4", | |
"type": "status" | |
} | |
], | |
"type": "prompt" | |
}, | |
{ | |
"min_width": 110, | |
"segments": [ | |
{ | |
"background": "transparent", | |
"foreground": "p:green", | |
"properties": { | |
"display_mode": "files", | |
"fetch_version": true, | |
"fetch_package_manager": false, | |
"home_enabled": false | |
}, | |
"style": "plain", | |
"template": "\uf898 {{ .Full }} ", | |
"type": "node" | |
}, | |
{ | |
"background": "transparent", | |
"foreground": "accent", | |
"properties": { | |
"fetch_version": false | |
}, | |
"style": "plain", | |
"template": "\ufcd1 ", | |
"type": "go" | |
}, | |
{ | |
"background": "transparent", | |
"foreground": "p:yellow", | |
"properties": { | |
"display_mode": "files", | |
"fetch_version": true, | |
"fetch_virtual_env": false | |
}, | |
"style": "plain", | |
"template": "\ue235 ", | |
"type": "python" | |
}, | |
{ | |
"foreground": "p:white", | |
"style": "plain", | |
"template": "in <accent><b>{{ .Name }} {{ .Version }}</b></> ", | |
"type": "shell" | |
}, | |
{ | |
"alias": "Time", | |
"background": "transparent", | |
"foreground": "p:white", | |
"style": "plain", | |
"template": "at <accent><b>{{ .CurrentDate | date \"15:04:05\" }}</b></>", | |
"type": "time" | |
}, | |
{ | |
"type": "battery", | |
"style": "plain", | |
"powerline_symbol": "\uE0B0", | |
"foreground": "accent", | |
"background": "transparent", | |
"foreground_templates": [ | |
"{{if eq \"Discharging\" .State.String}}p:orange{{end}}", | |
"{{if eq \"Full\" .State.String}}p:green{{end}}" | |
], | |
"template": "{{ if not .Error }} {{ .Icon }}{{ .Percentage }}%{{ end }}", | |
"properties": { | |
"discharging_icon": "\uE231 ", | |
"charging_icon": "\uE234 ", | |
"charged_icon": "\uE22F " | |
} | |
} | |
], | |
"type": "rprompt" | |
} | |
], | |
"console_title_template": "{{ .Shell }} in {{ .PWD }}", | |
// "console_title_template": "{{.UserName}}@{{.HostName}} 📂{{ .PWD }}", | |
// "console_title_template": "{{ .Segments.PathText }}", | |
"final_space": true, | |
"palette": { | |
"black": "#262B44", | |
"green": "#59C9A5", | |
"sapling": "#a6d189", | |
"orange": "#F07623", | |
"red": "#D81E5B", | |
"white": "#E0DEF4", | |
"yellow": "#F3AE35", | |
"blue": "#4B95E9" | |
}, | |
"secondary_prompt": { | |
"background": "transparent", | |
"foreground": "p:black", | |
"template": "<p:yellow,transparent>\ue0b6</><,p:yellow> > </><p:yellow,transparent>\ue0b0</> " | |
}, | |
"debug_prompt": { | |
"background": "transparent", | |
"foreground": "#ffffff", | |
"template": "<p:yellow,transparent>\ue0b6</><,p:yellow> \uf188 </><p:yellow,transparent>\ue0b0</> " | |
}, | |
"tooltips": [ | |
{ | |
"background": "p:orange", | |
"foreground": "p:white", | |
"leading_diamond": "\ue0b6", | |
"properties": { | |
"display_default": true | |
}, | |
"style": "diamond", | |
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ", | |
"tips": ["aws"], | |
"trailing_diamond": "\ue0b4", | |
"type": "aws" | |
}, | |
{ | |
"foreground": "p:white", | |
"background": "p:blue", | |
"leading_diamond": "\ue0b6", | |
"style": "diamond", | |
"template": " \ufd03 {{ .Name }} ", | |
"tips": ["az"], | |
"properties": { | |
"source": "cli" | |
}, | |
"trailing_diamond": "\ue0b4", | |
"type": "az" | |
}, | |
{ | |
"foreground": "p:white", | |
"background": "p:blue", | |
"leading_diamond": "\ue0b6", | |
"style": "diamond", | |
"template": " Hello ", | |
"tips": ["h", "hello"], | |
"trailing_diamond": "\ue0b4", | |
"type": "text" | |
} | |
], | |
"transient_prompt": { | |
"background": "p:yellow", | |
"background_templates": ["{{ if gt .Code 0 }}p:red{{ end }}"], | |
"foreground": "p:black", | |
"foreground_templates": ["{{ if gt .Code 0 }}p:white{{ end }}"], | |
"template": "<background,transparent>\ue0b6</><,background>{{ .Segments.Git.Ref }} {{ .UserName }} \uf554 {{ .Folder }} </><background,transparent>\ue0b0 </>" | |
}, | |
"accent_color": "32", | |
"pwd": "osc7", | |
"shell_integration": true, | |
"version": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment