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

25 lines
642 B
JavaScript
Raw Normal View History

import { ProgressBar, Overlay, Box } from 'resource:///com/github/Aylur/ags/widget.js';
import Separator from '../misc/separator.js';
import Heart from './heart.js';
2023-09-08 15:15:04 -04:00
export default () => Overlay({
tooltipText: 'Brightness',
child: ProgressBar({
className: 'toggle-off brightness',
2023-11-10 23:51:50 -05:00
connections: [[Brightness, self => {
self.value = Brightness.screen > 0.33 ? Brightness.screen : 0.33;
}, 'screen']],
}),
overlays: [
Box({
2023-11-06 18:37:23 -05:00
css: 'color: #CBA6F7;',
children: [
Separator(25),
Heart(),
],
}),
],
2023-09-08 15:15:04 -04:00
});