This commit is contained in:
end-4
2024-02-17 07:02:42 +07:00
committed by GitHub
+3 -3
View File
@@ -145,7 +145,7 @@ export default () => {
const systemResources = BarGroup({ const systemResources = BarGroup({
child: Box({ child: Box({
children: [ children: [
BarResource('RAM Usage', 'memory', `free | awk '/^Mem/ {printf("%.2f\\n", ($3/$2) * 100)}'`), BarResource('RAM Usage', 'memory', `LANG=C free | awk '/^Mem/ {printf("%.2f\\n", ($3/$2) * 100)}'`),
Revealer({ Revealer({
revealChild: true, revealChild: true,
transition: 'slide_left', transition: 'slide_left',
@@ -153,8 +153,8 @@ export default () => {
child: Box({ child: Box({
className: 'spacing-h-10 margin-left-10', className: 'spacing-h-10 margin-left-10',
children: [ children: [
BarResource('Swap Usage', 'swap_horiz', `free | awk '/^Swap/ {if ($2 > 0) printf("%.2f\\n", ($3/$2) * 100); else print "0";}'`), BarResource('Swap Usage', 'swap_horiz', `LANG=C 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 | sed 's/\\,/\\./g' | awk '{print $2}'`), BarResource('CPU Usage', 'settings_motion_mode', `LANG=C top -bn1 | grep Cpu | sed 's/\\,/\\./g' | awk '{print $2}'`),
] ]
}), }),
setup: (self) => self.hook(Mpris, label => { setup: (self) => self.hook(Mpris, label => {