nixos-configs/modules/ags/config/ts/setup.ts

67 lines
1.7 KiB
TypeScript
Raw Normal View History

const Hyprland = await Service.import('hyprland');
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 () => {
2023-11-10 23:51:50 -05:00
globalThis.Brightness = Brightness;
globalThis.Pointers = Pointers;
2023-11-10 23:51:50 -05:00
globalThis.Tablet = Tablet;
globalThis.closeAll = closeAll;
Persist({
name: 'bluetooth',
gobject: Bluetooth,
prop: 'enabled',
signal: 'notify::enabled',
});
2023-12-07 14:02:28 -05:00
TouchGestures.addGesture({
name: 'openAppLauncher',
gesture: 'UD',
edge: 'T',
command: () => App.openWindow('applauncher'),
});
2023-11-05 01:34:13 -05:00
TouchGestures.addGesture({
name: 'oskOn',
gesture: 'DU',
edge: 'B',
command: 'busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 ' +
'SetVisible b true',
2023-11-05 01:34:13 -05:00
});
TouchGestures.addGesture({
name: 'oskOff',
gesture: 'UD',
edge: 'B',
command: 'busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 ' +
'SetVisible b false',
2023-11-05 01:34:13 -05:00
});
TouchGestures.addGesture({
name: 'swipeSpotify1',
gesture: 'LR',
edge: 'L',
command: () => Hyprland.sendMessage(
'dispatch togglespecialworkspace spot',
),
2023-11-05 01:34:13 -05:00
});
TouchGestures.addGesture({
name: 'swipeSpotify2',
gesture: 'RL',
edge: 'L',
command: () => Hyprland.sendMessage(
'dispatch togglespecialworkspace spot',
),
2023-11-05 01:34:13 -05:00
});
};