prompt: reduce horizontal line's contrast
This commit is contained in:
parent
c143a5a850
commit
f79beba826
1 changed files with 7 additions and 8 deletions
|
@ -44,6 +44,7 @@ COLOR_PROMPT_ERROR = 1
|
|||
|
||||
COLOR_OK = 10
|
||||
COLOR_ERROR = 196
|
||||
COLOR_GREY = 240
|
||||
|
||||
MOUNT_IGNORE_FS = ["iso9660", "tmpfs", "rootfs"]
|
||||
MOUNT_IGNORE_DIR = ["/dev", "/proc", "/sys"]
|
||||
|
@ -466,7 +467,7 @@ class TimeBudget:
|
|||
|
||||
class GitPart(Part):
|
||||
"""
|
||||
branchname ↘2 ↗4 ⚠M master ?11 *6 10
|
||||
branchname ↘2 ↗4 !M master ?11 *6 s10
|
||||
|
||||
- 2 commits are available for pulling (remote is ahead)
|
||||
- 4 commits are available for pushing (local is ahead)
|
||||
|
@ -487,8 +488,6 @@ class GitPart(Part):
|
|||
branch_name = command("git name-rev --name-only --no-undefined --always HEAD", tb.trem).strip()
|
||||
|
||||
if branch_name:
|
||||
self.fragments.append("")
|
||||
|
||||
count_to_pull = command("git log --oneline ..@{u}", tb.trem).count("\n")
|
||||
count_to_push = command("git log --oneline @{u}..", tb.trem).count("\n")
|
||||
git_dir = command("git rev-parse --git-dir", tb.trem).strip()
|
||||
|
@ -506,7 +505,7 @@ class GitPart(Part):
|
|||
if merging:
|
||||
self.fragments.append(style_color(COLOR_GIT_MERGE))
|
||||
self.fragments.append(style_bold())
|
||||
self.fragments.append("⚠M ")
|
||||
self.fragments.append("M ")
|
||||
elif modified or staged:
|
||||
self.fragments.append(style_color(COLOR_GIT_DIRTY))
|
||||
else:
|
||||
|
@ -525,14 +524,14 @@ class GitPart(Part):
|
|||
|
||||
if staged:
|
||||
self.fragments.append(style_color(COLOR_GIT_STAGED))
|
||||
self.fragments.append(" %d" %(staged))
|
||||
self.fragments.append(" s%d" %(staged))
|
||||
|
||||
self.fragments.append(style_reset())
|
||||
|
||||
except subprocess.TimeoutExpired:
|
||||
self.fragments = []
|
||||
self.fragments.append(style_color(COLOR_GIT_DIRTY))
|
||||
self.fragments.append("⚠ git timeout ⚠")
|
||||
self.fragments.append("!! git timeout !!")
|
||||
self.fragments.append(style_reset())
|
||||
|
||||
class Padding(Part):
|
||||
|
@ -593,7 +592,7 @@ class StatsPart(Part):
|
|||
self.fragments.append(" | ")
|
||||
self.fragments.append(style_color(COLOR_ERROR))
|
||||
self.fragments.append(style_bold())
|
||||
self.fragments.append("⚠ OVERLOAD ⚠ ")
|
||||
self.fragments.append("!! OVERLOAD !! ")
|
||||
self.fragments.append(style_reset())
|
||||
|
||||
else:
|
||||
|
@ -715,7 +714,7 @@ class StatsPart(Part):
|
|||
|
||||
def make_horizontal_line(settings):
|
||||
if settings.horizontal_sep:
|
||||
return "─" * settings.term_width + "\n"
|
||||
return style_color(COLOR_GREY) + "─" * settings.term_width + "\n"
|
||||
|
||||
if __name__ == "__main__":
|
||||
settings = Settings(sys.argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue