nixos-configs/devices/wim/config/ags/js/bar/buttons/osk-toggle.js

21 lines
513 B
JavaScript
Raw Normal View History

import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
2023-09-04 22:27:34 -04:00
import Tablet from '../../../services/tablet.js';
2023-11-16 00:48:50 -05:00
import EventBox from '../../misc/cursorbox.js';
2023-09-04 22:47:12 -04:00
export default () => EventBox({
className: 'toggle-off',
onPrimaryClickRelease: () => Tablet.toggleOsk(),
connections: [[Tablet, (self) => {
self.toggleClassName('toggle-on', Tablet.oskState);
}, 'osk-toggled']],
child: Box({
className: 'osk-toggle',
children: [Label(' 󰌌 ')],
}),
2023-09-04 22:27:34 -04:00
});