diff --git a/bootstrap.sh b/bootstrap.sh index f1fe2e1..2f01de1 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -16,6 +16,7 @@ test -d $HOME/.ncmpcpp || mkdir $HOME/.ncmpcpp test -L $HOME/.ncmpcpp/config || ln -f -s $BASEDIR/ncmpcpp $HOME/.ncmpcpp/config test -L $HOME/.tmux.conf || ln -f -s $BASEDIR/tmux $HOME/.tmux.conf test -L $HOME/.config/starship.toml || ln -f -s $BASEDIR/starship.toml $HOME/.config/starship.toml +test -L $HOME/.config/jmb.omp.toml || ln -f -s $BASEDIR/jmb.omp.toml $HOME/.config/jmb.omp.toml test -d $HOME/.sheldon || mkdir $HOME/.sheldon test -L $HOME/.sheldon/plugins.toml || ln -f -s $BASEDIR/sheldon.toml $HOME/.sheldon/plugins.toml test -L $HOME/.zsh || ln -f -s $BASEDIR/zsh $HOME/.zsh diff --git a/jmb.omp.toml b/jmb.omp.toml new file mode 100644 index 0000000..ecd0e73 --- /dev/null +++ b/jmb.omp.toml @@ -0,0 +1,88 @@ +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +console_title_template = '{{ .Folder }}' + +[[blocks]] + type = 'prompt' + alignment = 'left' + + [[blocks.segments]] + type = 'os' + style = 'diamond' + powerline_symbol = '' + foreground = '#ffffff' + background = '#546e7a' + leading_diamond = '' + template = '{{.Icon}} ' + + [[blocks.segments]] + type = 'path' + style = 'powerline' + powerline_symbol = '' + foreground = '#ffffff' + background = '#0080ff' + template = '  {{ .Path }} ' + + [blocks.segments.properties] + style = 'full' + + [[blocks.segments]] + type = 'git' + style = 'powerline' + powerline_symbol = '' + foreground = '#000000' + background = '#c19c00' + background_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFA300{{ end }}', '{{ if gt .Ahead 0 }}#FF7070{{ end }}', '{{ if gt .Behind 0 }}#90F090{{ end }}'] + template = ' {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }} ' + + [blocks.segments.properties] + fetch_stash_count = true + fetch_status = true + fetch_upstream_icon = true + + [[blocks.segments]] + type = 'status' + style = 'diamond' + foreground = '#ffffff' + background = '#2e9599' + background_templates = ['{{ if gt .Code 0 }}#f1184c{{ end }}'] + trailing_diamond = '' + template = ' ' + + [blocks.segments.properties] + always_enabled = true + +[[blocks]] + type = 'prompt' + alignment = 'right' + + [[blocks.segments]] + type = "executiontime" + style = "diamond" + leading_diamond = '' + trailing_diamond = '' + foreground = "red" + background = "black" + template = "󱦟 {{ .FormattedMs }} " + + [blocks.segments.properties] + threshold = 2000 + style = "austin" + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'root' + style = 'plain' + foreground = 'yellow' + template = ' ' + + [[blocks.segments]] + type = 'text' + style = 'plain' + foreground = 'default' + template = ' ' diff --git a/starship.toml b/starship.toml index 32960ec..03a8d17 100644 --- a/starship.toml +++ b/starship.toml @@ -31,8 +31,7 @@ $scala\ """ right_format = """ -[\uE0B2](fg:bar_three)\ -$time\ +$cmd_duration\ """ palette = 'theme' @@ -93,7 +92,7 @@ Windows = '󰍲' [directory] truncation_length = 0 -truncation_symbol = '.../' +truncation_symbol = '…/' truncate_to_repo = false fish_style_pwd_dir_length = 1 style = 'bold fg:text_two bg:bar_two' @@ -209,8 +208,5 @@ symbol = ' ' style = 'fg:text_three bg:bar_four' format = '[ $symbol ($version) ]($style)' -[time] -disabled = false -time_format = '%R' # Hour:Minute Format -style = 'fg:text_three bg:bar_three' -format = '[  $time ]($style)' \ No newline at end of file +[cmd_duration] +style = 'bold red' diff --git a/zshrc.zsh b/zshrc.zsh index 410a4af..4c11fa9 100644 --- a/zshrc.zsh +++ b/zshrc.zsh @@ -207,7 +207,10 @@ if command -v zoxide &>/dev/null; then fi # Init starship prompt -- https://starship.rs -eval "$(starship init zsh)" +#eval "$(starship init zsh)" + +# Oh My Posh +eval "$(oh-my-posh init zsh --config $HOME/.config/jmb.omp.toml)" # Finally we can have zsh auto source this rc file on command # attribution: https://www.reddit.com/r/commandline/comments/12g76v/