fix broken cpu usage due to localized number format (#242)

This commit is contained in:
end-4
2024-02-07 21:12:00 +07:00
parent 3bc99f1c44
commit 65b7bbf7a8
+1 -1
View File
@@ -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 => {