nixos-configs/nixosModules/ags/config/ts/setup.ts
matt1432 24aa4b9842
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: make modules independant and exposed in the flake for outside use
2024-08-02 22:32:29 -04:00

56 lines
1.3 KiB
TypeScript

const Bluetooth = await Service.import('bluetooth');
import Brightness from '../services/brightness.ts';
import Pointers from '../services/pointers.ts';
import Tablet from '../services/tablet.ts';
import TouchGestures from '../services/touch-gestures.ts';
import closeAll from './misc/closer.ts';
import Persist from './misc/persist.ts';
export default () => {
globalThis.Brightness = Brightness;
globalThis.Pointers = Pointers;
globalThis.Tablet = Tablet;
globalThis.closeAll = closeAll;
Persist({
name: 'bluetooth',
gobject: Bluetooth,
prop: 'enabled',
signal: 'notify::enabled',
});
TouchGestures.addGesture({
name: 'openAppLauncher',
gesture: 'UD',
edge: 'T',
command: () => App.openWindow('win-applauncher'),
});
TouchGestures.addGesture({
name: 'oskOn',
gesture: 'DU',
edge: 'B',
command: () => {
Tablet.oskState = true;
},
});
TouchGestures.addGesture({
name: 'oskOff',
gesture: 'UD',
edge: 'B',
command: () => {
Tablet.oskState = false;
},
});
TouchGestures.addGesture({
name: 'openOverview',
nFingers: '3',
gesture: 'UD',
command: 'hyprctl dispatch hyprexpo:expo on',
});
};