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

22 lines
514 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 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',
vertical: false,
children: [Label({
label: ' 󰌌 ',
})],
}),
2023-09-04 22:27:34 -04:00
});