nixos-configs/devices/wim/config/ags/js/osd/brightness.js

24 lines
598 B
JavaScript
Raw Normal View History

2023-11-10 23:51:50 -05:00
import { Box, Icon, ProgressBar } from 'resource:///com/github/Aylur/ags/widget.js';
export default () => Box({
className: 'osd',
children: [
Icon({
hpack: 'start',
icon: 'display-brightness-symbolic',
}),
ProgressBar({
vpack: 'center',
connections: [[Brightness, self => {
self.value = Brightness.screen;
const stack = self.get_parent().get_parent();
stack.shown = 'brightness';
stack.resetTimer();
}, 'screen']],
}),
],
});