nixos-configs/nixosModules/ags/config/ts/bar/hovers/brightness.ts
matt1432 24aa4b9842
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: make modules independant and exposed in the flake for outside use
2024-08-02 22:32:29 -04:00

17 lines
415 B
TypeScript

const { Icon, Label } = Widget;
import Brightness from '../../../services/brightness.ts';
import HoverRevealer from './hover-revealer.ts';
export default () => HoverRevealer({
class_name: 'brightness',
icon: Icon({
icon: Brightness.bind('screenIcon'),
}),
label: Label().hook(Brightness, (self) => {
self.label = `${Math.round(Brightness.screen * 100)}%`;
}, 'screen'),
});