Compare commits
No commits in common. "e236b4723e8cb143f8af9aea7ee674f4ad9d97d1" and "e28a4b6abed0155e2d4a3daf680c6144f5aff0e6" have entirely different histories.
e236b4723e
...
e28a4b6abe
10
hyprscript
10
hyprscript
@ -247,17 +247,13 @@ def monitor_stats():
|
||||
else:
|
||||
battery_class = None
|
||||
|
||||
battery_text = "% 4.0f" % battery.percent if battery_percent <= 99.95 else " 100"
|
||||
battery_json = f', "class": "{battery_class}"' if battery_class else ''
|
||||
battery_json = '{"text": "' + battery_icon + ' ' + battery_text + '%"' + battery_json + '}'
|
||||
|
||||
cpu_percent_text = "% 5.1f" % cpu_percent if cpu_percent <= 99.95 else " 100"
|
||||
mem_percent_text = "% 5.1f" % mem_percent if mem_percent <= 99.95 else " 100"
|
||||
battery_json = '{"text": "' + battery_icon + ' ' + "% 4.0f" % battery.percent + '%"' + battery_json + '}'
|
||||
|
||||
with open('.stat.txt', 'w') as f:
|
||||
f.write(
|
||||
' ' + ''.join([to_bar(x) for x in cpu_values]) + ' ' + cpu_percent_text + '%\n' +
|
||||
' ' + ''.join([to_bar(x) for x in mem_values]) + ' ' + mem_percent_text + '%\n' +
|
||||
' ' + ''.join([to_bar(x) for x in cpu_values]) + ' ' + "% 5.1f" % cpu_percent + '%\n' +
|
||||
' ' + ''.join([to_bar(x) for x in mem_values]) + ' ' + "% 5.1f" % mem_percent + '%\n' +
|
||||
' ' + ''.join([to_bar(x) for x in temp_values]) + ' ' + "% 5.1f" % temp + '°\n' +
|
||||
battery_json
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user