updated readme and moved omp
This commit is contained in:
@@ -2,3 +2,10 @@
|
|||||||
add this line to "/etc/zsh/zshenv" `export ZDOTDIR="$HOME/.config/zsh"`
|
add this line to "/etc/zsh/zshenv" `export ZDOTDIR="$HOME/.config/zsh"`
|
||||||
make sure this directory is named `zsh`
|
make sure this directory is named `zsh`
|
||||||
|
|
||||||
|
# Prerequisits
|
||||||
|
- oh-my-zsh
|
||||||
|
- fzf
|
||||||
|
- bat
|
||||||
|
- ...
|
||||||
|
|
||||||
|
## oh-my-posh
|
||||||
|
|||||||
112
shell.omp.json
Normal file
112
shell.omp.json
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
||||||
|
"blocks": [
|
||||||
|
{
|
||||||
|
"alignment": "left",
|
||||||
|
"newline": true,
|
||||||
|
"segments": [
|
||||||
|
{
|
||||||
|
"foreground": "#ffbebc",
|
||||||
|
"leading_diamond": "<#ff70a6> \ue200 </>",
|
||||||
|
"style": "diamond",
|
||||||
|
"template": "{{ .UserName }} <#ffffff>on</>",
|
||||||
|
"type": "session"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"foreground": "#bc93ff",
|
||||||
|
"options": {
|
||||||
|
"time_format": "Monday <#ffffff>at</> 3:04 PM"
|
||||||
|
},
|
||||||
|
"style": "diamond",
|
||||||
|
"template": " {{ .CurrentDate | date .Format }} ",
|
||||||
|
"type": "time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"foreground": "#ee79d1",
|
||||||
|
"options": {
|
||||||
|
"branch_icon": "\ue725 ",
|
||||||
|
"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 }} ",
|
||||||
|
"type": "git"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "prompt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alignment": "right",
|
||||||
|
"segments": [
|
||||||
|
{
|
||||||
|
"foreground": "#a9ffb4",
|
||||||
|
"style": "plain",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"foreground": "#a9ffb4",
|
||||||
|
"options": {
|
||||||
|
"style": "dallas",
|
||||||
|
"threshold": 0
|
||||||
|
},
|
||||||
|
"style": "diamond",
|
||||||
|
"template": " {{ .FormattedMs }}s <#ffffff>\ue601</>",
|
||||||
|
"type": "executiontime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"root_icon": "\uf292 "
|
||||||
|
},
|
||||||
|
"style": "diamond",
|
||||||
|
"template": " \uf0e7 ",
|
||||||
|
"type": "root"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"foreground": "#94ffa2",
|
||||||
|
"style": "diamond",
|
||||||
|
"template": " <#ffffff>MEM:</> {{ round .PhysicalPercentUsed .Precision }}% ({{ (div ((sub .PhysicalTotalMemory .PhysicalAvailableMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB)",
|
||||||
|
"type": "sysinfo"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "prompt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alignment": "left",
|
||||||
|
"newline": true,
|
||||||
|
"segments": [
|
||||||
|
{
|
||||||
|
"foreground": "#ffafd2",
|
||||||
|
"leading_diamond": "<#00c7fc> \ue285 </><#ffafd2>{</>",
|
||||||
|
"options": {
|
||||||
|
"folder_icon": "\uf07b",
|
||||||
|
"folder_separator_icon": " \uebcb ",
|
||||||
|
"home_icon": "home",
|
||||||
|
"style": "agnoster_full"
|
||||||
|
},
|
||||||
|
"style": "diamond",
|
||||||
|
"template": " \ue5ff {{ .Path }} ",
|
||||||
|
"trailing_diamond": "<#ffafd2>}</>",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"foreground": "#A9FFB4",
|
||||||
|
"foreground_templates": ["{{ if gt .Code 0 }}#ef5350{{ end }}"],
|
||||||
|
"options": {
|
||||||
|
"always_enabled": true
|
||||||
|
},
|
||||||
|
"style": "plain",
|
||||||
|
"template": " \ue286 ",
|
||||||
|
"type": "status"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "prompt"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"console_title_template": "{{ .Folder }}",
|
||||||
|
"transient_prompt": {
|
||||||
|
"background": "transparent",
|
||||||
|
"foreground": "#FEF5ED",
|
||||||
|
"template": "\ue285 "
|
||||||
|
},
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
@@ -81,5 +81,5 @@ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zs
|
|||||||
|
|
||||||
#setup oh-my-posh shell
|
#setup oh-my-posh shell
|
||||||
if [ $TERM = "xterm-kitty" ] || [ $NVIM ]; then
|
if [ $TERM = "xterm-kitty" ] || [ $NVIM ]; then
|
||||||
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/oh-my-posh/1_shell.omp.json)"
|
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/shell.omp.json)"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user