From 8503db94e126df13765ba624baa3a94883bac514 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Tue, 27 Aug 2024 11:37:33 +0200 Subject: [PATCH] [polybar] Use btop instead of top --- .config/polybar/modules.ini | 8 ++++---- .config/polybar/scripts/cpu_usage.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index 2628faf..558faa0 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -20,14 +20,14 @@ label-song-ellipsis = true [module/cpu_bar] type = custom/script exec = ~/.config/polybar/scripts/cpu_usage.py -format-prefix = "%{A1:$TERMINAL_CMD top -o %CPU &:}CPU %{A}" +format-prefix = "%{A1:$TERMINAL_CMD btop &:}CPU %{A}" format-prefix-foreground = ${colors.foreground-alt} interval = 5 [module/memory_bar] type = internal/memory format = -format-prefix = "%{A1:$TERMINAL_CMD top -o RES &:}%{T2} %{T-}%{A}" +format-prefix = "%{A1:$TERMINAL_CMD btop &:}%{T2} %{T-}%{A}" format-prefix-foreground = ${colors.foreground-alt} bar-used-width = 10 @@ -35,7 +35,7 @@ bar-used-gradient = false bar-used-indicator = bar-used-indicator-foreground = ${colors.foreground} bar-used-indicator-font = 0 -bar-used-fill = "%{A1:$TERMINAL_CMD top -o RES &:}%{T5}_%{T-}%{A}" +bar-used-fill = "%{A1:$TERMINAL_CMD btop &:}%{T5}_%{T-}%{A}" bar-used-foreground-0 = ${colors.bn} bar-used-foreground-1 = ${colors.bn} bar-used-foreground-2 = ${colors.bn} @@ -45,7 +45,7 @@ bar-used-foreground-5 = ${colors.bm} bar-used-foreground-6 = ${colors.bd} bar-used-foreground-7 = ${colors.bd} bar-used-foreground-8 = ${colors.bd} -bar-used-empty = "%{A1:$TERMINAL_CMD top -o RES &:}%{T5}_%{T-}%{A}" +bar-used-empty = "%{A1:$TERMINAL_CMD btop &:}%{T5}_%{T-}%{A}" bar-used-empty-foreground = ${colors.foreground-alt} [module/wireless] diff --git a/.config/polybar/scripts/cpu_usage.py b/.config/polybar/scripts/cpu_usage.py index e4526a4..10b46a2 100755 --- a/.config/polybar/scripts/cpu_usage.py +++ b/.config/polybar/scripts/cpu_usage.py @@ -36,7 +36,7 @@ def show_cpu_usage(): if global_count < 10: padding = '%{F' + colors['id'] + '}' + '_' * (10 - global_count) + '%{F-}' - print("%{A1:$TERMINAL_CMD top -o %CPU &:}%{T5}" + bar + padding + "%{T-}%{A}") + print("%{A1:$TERMINAL_CMD btop &:}%{T5}" + bar + padding + "%{T-}%{A}") if __name__ == "__main__":