aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/i3blocks/.local
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-06-22 10:03:19 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-06-22 10:03:19 -0500
commiteab2ec101217a194efc801594856b86d24c7eb6f (patch)
tree0636c33b4ede8d94072553508972f9fbad0e1bde /i3blocks/.local
parent3f0533862fecf79f005f67d185e431f5bfcc1e7d (diff)
fix(i3blocks): fix cpu and mem colors
Diffstat (limited to 'i3blocks/.local')
-rwxr-xr-xi3blocks/.local/lib/i3blocks/i3blocks-cpu6
-rwxr-xr-xi3blocks/.local/lib/i3blocks/i3blocks-memory4
2 files changed, 5 insertions, 5 deletions
diff --git a/i3blocks/.local/lib/i3blocks/i3blocks-cpu b/i3blocks/.local/lib/i3blocks/i3blocks-cpu
index 8fecb2c..ddb1d68 100755
--- a/i3blocks/.local/lib/i3blocks/i3blocks-cpu
+++ b/i3blocks/.local/lib/i3blocks/i3blocks-cpu
@@ -25,13 +25,13 @@ def main():
"full_text": " {} {:.0%} ".format(ICON, usage),
"values": [-x for x in val],
}
- if usage > 90:
+ if usage > 0.9:
output["color"] = BLACK
output["background"] = RED
- elif usage > 60:
+ elif usage > 0.6:
output["color"] = BLACK
output["background"] = YELLOW
- elif usage > 30:
+ elif usage > 0.3:
output["color"] = BLACK
output["background"] = AQUA
diff --git a/i3blocks/.local/lib/i3blocks/i3blocks-memory b/i3blocks/.local/lib/i3blocks/i3blocks-memory
index b0dad06..f62d5c7 100755
--- a/i3blocks/.local/lib/i3blocks/i3blocks-memory
+++ b/i3blocks/.local/lib/i3blocks/i3blocks-memory
@@ -18,10 +18,10 @@ def main():
used = 100 - round(100 * meminfo["MemAvailable"] / meminfo["MemTotal"])
print(f" {ICON} {used}% \n")
- if used > 95:
+ if used > 90:
print(f"#{os.environ.get("BASE16_COLOR_00_HEX")}")
print(f"#{os.environ.get("BASE16_COLOR_08_HEX")}")
- elif used > 80:
+ elif used > 75:
print(f"#{os.environ.get("BASE16_COLOR_00_HEX")}")
print(f"#{os.environ.get("BASE16_COLOR_0A_HEX")}")