diff --git a/cfg/main.cfg b/cfg/main.cfg index d27ada6..05b6983 100644 --- a/cfg/main.cfg +++ b/cfg/main.cfg @@ -4,7 +4,7 @@ #OVER_PROMPT_SYSLOAD_WARN=1.25 # Indicators of system load will turn red when system load (loadavg divided by nproc) exceeds this value. -#OVER_PROMPT_SYSLOAD_YELL=2.50 +#OVER_PROMPT_SYSLOAD_YELL=3.0 # Indicators of free space (storage, memory and swap) will turn yellow when there's at most this fraction of free space left. #OVER_PROMPT_FREESPACE_WARN=0.15 diff --git a/libexec/render.py b/libexec/render.py index c6862b4..8d440c9 100755 --- a/libexec/render.py +++ b/libexec/render.py @@ -22,6 +22,7 @@ COLOR_TERM_SCREEN = 27 COLOR_CLOCK = 27 COLOR_CLOCK_DELTA = 11 COLOR_MEMSWAP = 7 +COLOR_SPACE_BTRFS = 12 COLOR_SPACE_OK = 2 COLOR_SPACE_WARN = 3 COLOR_SPACE_ERROR = 1 @@ -617,7 +618,9 @@ class StatsPart(Part): self.fragments.append(" |") first_mountpoint = False + if type == "btrfs": self.fragments.append(style_color(COLOR_SPACE_BTRFS)) self.fragments.append(short_name) + if type == "btrfs": self.fragments.append(style_reset()) self.fragments.append(style_bold()) self.fragments.append(style_color(settings.get_space_color(stor_free, stor_total))) stor_free_si = si_number(stor_free) diff --git a/share/zsh-init b/share/zsh-init index deed9b8..6635761 100755 --- a/share/zsh-init +++ b/share/zsh-init @@ -21,7 +21,7 @@ function preexec { function precmd { set_title "${USER}: ${PWD}" - python3 /usr/libexec/over-prompt.py "${COLUMNS}" "${PWD}" "${OVER_PROMPT_LAST_REFRESH}" "${OVER_PROMPT_SYSLOAD_WARN:=1.25}" "${OVER_PROMPT_SYSLOAD_YELL:=2.5}" "${OVER_PROMPT_FREESPACE_WARN:=0.15}" "${OVER_PROMPT_FREESPACE_YELL:=0.05}" + python3 /usr/libexec/over-prompt.py "${COLUMNS}" "${PWD}" "${OVER_PROMPT_LAST_REFRESH}" "${OVER_PROMPT_SYSLOAD_WARN:=1.25}" "${OVER_PROMPT_SYSLOAD_YELL:=3.0}" "${OVER_PROMPT_FREESPACE_WARN:=0.15}" "${OVER_PROMPT_FREESPACE_YELL:=0.05}" PS1="$(print "%(?.%{\e[1;36m%}.%{\e[1;31m%}%?%{\e[0m%}:%{\e[1;31m%})%(\!.#.$)%{\e[0m%} ")" OVER_PROMPT_LAST_REFRESH=$(date +%s) }