perf(waybar): fix some bugs causing high cpu usage in waybar

This commit is contained in:
Price Hiller 2023-05-30 04:17:44 -05:00
parent 325466cb17
commit f677db7cb5
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
3 changed files with 7 additions and 6 deletions

View File

@ -23,12 +23,11 @@
"custom/lock" "custom/lock"
], ],
"custom/launcher": { "custom/launcher": {
"format": "{}", "format": "󰫢",
"tooltip": false, "tooltip": false,
"min-length": 5, "min-length": 5,
"interval": 1,
"on-click": "wofi", "on-click": "wofi",
"exec": "printf '󰫢'" "interval": "once"
}, },
"battery": { "battery": {
"min-length": 5, "min-length": 5,
@ -196,7 +195,6 @@
"return-type": "json", "return-type": "json",
"on-click": "playerctl play-pause", "on-click": "playerctl play-pause",
"exec": "~/.config/waybar/scripts/get-media.bash", "exec": "~/.config/waybar/scripts/get-media.bash",
"escape": true
} }
} }
] ]

View File

@ -21,7 +21,7 @@ get-album-info () {
fi fi
printf '{"class": "%s", "text": "%s"}\n' "${class}" "${text}" printf '{"class": "%s", "text": "%s"}\n' "${class}" "${text}"
sleep .08 sleep .5
done done
} }

View File

@ -83,7 +83,10 @@
rgba(149, 127, 184, 0.9) rgba(149, 127, 184, 0.9)
); );
background-size: 400% 400%; background-size: 400% 400%;
animation: gradient_scroll 10s ease infinite; /*
* NOTE: As much as I'd love to have this animation on, gtk enjoys being a massive pile of shit and causes the CPU to
* turn into a space heater. */
/* animation: gradient_scroll 10s ease infinite; */
} }
/* Launcher */ /* Launcher */