mirror of
https://github.com/gyoder/dots.git
synced 2026-02-27 17:03:45 +00:00
add starship jj tools
This commit is contained in:
parent
2c14665f05
commit
ea8682571c
1 changed files with 8 additions and 4 deletions
|
|
@ -75,7 +75,7 @@ diverged = '⇕[\[](bg:overlay fg:iris)[⇡\(${ahead_count}\)](bg:overlay fg:foa
|
||||||
behind = '[⇣\(${count}\)](bg:overlay fg:rose)'
|
behind = '[⇣\(${count}\)](bg:overlay fg:rose)'
|
||||||
|
|
||||||
[custom.jj]
|
[custom.jj]
|
||||||
command = 'jj-starship --git-symbol ""| sed "s/\x1b\[0m//g"'
|
command = 'jj-starship --git-symbol "" --no-git-status | sed "s/\x1b\[0m//g"'
|
||||||
when = "jj-starship detect"
|
when = "jj-starship detect"
|
||||||
shell = ["sh"]
|
shell = ["sh"]
|
||||||
format = "[](fg:overlay)[[ $output ](bg:overlay)]($style)[](fg:overlay) "
|
format = "[](fg:overlay)[[ $output ](bg:overlay)]($style)[](fg:overlay) "
|
||||||
|
|
@ -88,9 +88,13 @@ git status --porcelain | awk '
|
||||||
/^\?\?/ { untracked++ }
|
/^\?\?/ { untracked++ }
|
||||||
/^[D ]D/ || /^D/ { deleted++ }
|
/^[D ]D/ || /^D/ { deleted++ }
|
||||||
END {
|
END {
|
||||||
if (modified) printf "\033[38;2;246;193;119m%d ", modified
|
if (modified + untracked + deleted == 0) {
|
||||||
if (untracked) printf "\033[38;2;246;193;119m%d ", untracked
|
printf "\033[38;2;196;167;231m✓"
|
||||||
if (deleted) printf "\033[38;2;235;111;146m%d ", deleted
|
} else {
|
||||||
|
if (modified) printf "\033[38;2;246;193;119m%d ", modified
|
||||||
|
if (untracked) printf "\033[38;2;246;193;119m%d ", untracked
|
||||||
|
if (deleted) printf "\033[38;2;235;111;146m%d ", deleted
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
'''
|
'''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue