nixos-configs/devices/wim/config/ags/ts/bar/items/osk-toggle.ts
matt1432 7c0e1658da
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(ags wim): bundle all files through imports
2024-01-13 23:38:31 -05:00

23 lines
557 B
TypeScript

import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
import Tablet from '../../../services/tablet.ts';
import CursorBox from '../../misc/cursorbox.ts';
export default () => CursorBox({
class_name: 'toggle-off',
on_primary_click_release: () => Tablet.toggleOsk(),
setup: (self) => {
self.hook(Tablet, () => {
self.toggleClassName('toggle-on', Tablet.oskState);
}, 'osk-toggled');
},
child: Label({
class_name: 'osk-toggle',
xalign: 0.6,
label: '󰌌 ',
}),
});