small change to statmon

This commit is contained in:
2026-07-27 12:31:54 -07:00
parent 8d587dd4d5
commit 58d07d012f
2 changed files with 7 additions and 6 deletions

1
hypr/scripts/statmon/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/target

View File

@@ -398,11 +398,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
execute!(stdout, cursor::MoveTo(0, 0), Clear(ClearType::FromCursorDown))?;
execute!(stdout, SetForegroundColor(FG_MAIN))?;
println!("================================================================================================");
println!("===============================================================================================");
execute!(stdout, SetForegroundColor(ACCENT))?;
println!(" SYSTEM DASHBOARD ");
println!(" SYSTEM DASHBOARD ");
execute!(stdout, SetForegroundColor(FG_MAIN))?;
println!("================================================================================================");
println!("===============================================================================================");
print_line(&mut stdout, "Time", &time_str, ACCENT)?;
print_line(&mut stdout, "Laptop Bat", &bat_str, FG_MAIN)?;
@@ -435,11 +435,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Render Top 5 Table
execute!(stdout, SetForegroundColor(FG_MAIN))?;
println!("------------------------------------------------------------------------------------------------");
println!("-----------------------------------------------------------------------------------------------");
execute!(stdout, SetForegroundColor(ACCENT))?;
println!(" {:<8} {:<30} {:<12} {:<12}", "PID", "NAME", "CPU %", "MEM (MB)");
execute!(stdout, SetForegroundColor(FG_MAIN))?;
println!("------------------------------------------------------------------------------------------------");
println!("-----------------------------------------------------------------------------------------------");
for p in top_5 {
let raw_name = p.name();
@@ -461,7 +461,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
execute!(stdout, SetForegroundColor(FG_MAIN))?;
println!("================================================================================================");
println!("===============================================================================================");
if global_cpu > 85.0 || mem_pct > 90.0 || temp_val > 85.0 {
execute!(stdout, SetForegroundColor(ALERT))?;