import { execAsync, idle } from 'astal'; import { Astal } from 'astal/gtk3'; import Tablet from '../../services/tablet'; import OskWindow from './osk-window'; import Gesture from './gesture'; import Keyboard from './keyboard'; export default () => { // Start ydotool daemon execAsync('ydotoold').catch(print); const tablet = Tablet.get_default(); const window = ( ) as OskWindow; window.hook(tablet, 'notify::osk-state', (self, state) => { self.setVisible(state); }); idle(() => { window.setVisible(false); }); return Gesture(window); };