2023-12-28 00:19:57 -05:00
|
|
|
import { Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
|
|
|
|
2024-01-13 23:38:31 -05:00
|
|
|
import Brightness from '../../../services/brightness.ts';
|
|
|
|
import HoverRevealer from './hover-revealer.ts';
|
2023-12-28 00:19:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
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'),
|
|
|
|
});
|