nixos-configs/devices/wim/config/ags/ts/bar/hovers/brightness.ts
matt1432 7c0e1658da
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(ags wim): bundle all files through imports
2024-01-13 23:38:31 -05:00

17 lines
457 B
TypeScript

import { Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
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'),
});