user config round 1 (#271)

This commit is contained in:
end-4
2024-03-01 23:18:56 +07:00
parent 7ecbf9b24b
commit e1bb1c9790
20 changed files with 170 additions and 224 deletions
+1 -4
View File
@@ -10,8 +10,6 @@ import { enableClickthrough } from "../.widgetutils/clickthrough.js";
import { RoundedCorner } from "../.commonwidgets/cairo_roundedcorner.js";
import { currentShellMode } from '../../variables.js';
const BATTERY_LOW = 20;
const NormalOptionalWorkspaces = async () => {
try {
return (await import('./normal/workspaces_hyprland.js')).default();
@@ -80,8 +78,7 @@ export const Bar = async (monitor = 0) => {
setup: (self) => {
self.hook(Battery, (self) => {
if(!Battery.available) return;
print(Battery.percent)
self.toggleClassName('bar-bg-focus-batterylow', Battery.percent <= BATTERY_LOW);
self.toggleClassName('bar-bg-focus-batterylow', Battery.percent <= userOptions.battery.low);
})
}
});