From 65b7bbf7a88de6777b3b3daa48ce9e5bf84a1003 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:12:00 +0700 Subject: [PATCH] fix broken cpu usage due to localized number format (#242) --- .config/ags/widgets/bar/music.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/ags/widgets/bar/music.js b/.config/ags/widgets/bar/music.js index ae986086a..03f104400 100644 --- a/.config/ags/widgets/bar/music.js +++ b/.config/ags/widgets/bar/music.js @@ -154,7 +154,7 @@ export default () => { className: 'spacing-h-10 margin-left-10', children: [ BarResource('Swap Usage', 'swap_horiz', `free | awk '/^Swap/ {if ($2 > 0) printf("%.2f\\n", ($3/$2) * 100); else print "0";}'`), - BarResource('CPU Usage', 'settings_motion_mode', `top -bn1 | grep Cpu | awk '{print $2}'`), + BarResource('CPU Usage', 'settings_motion_mode', `top -bn1 | grep Cpu | sed 's/\\,/\\./g' | awk '{print $2}'`), ] }), setup: (self) => self.hook(Mpris, label => {