2023-11-06 20:38:16 -05:00
|
|
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
2023-11-13 13:19:14 -05:00
|
|
|
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
2023-12-07 14:02:28 -05:00
|
|
|
import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';
|
2023-12-07 15:28:58 -05:00
|
|
|
|
2023-11-21 01:29:46 -05:00
|
|
|
import Brightness from '../services/brightness.js';
|
|
|
|
import Pointers from '../services/pointers.js';
|
|
|
|
import Tablet from '../services/tablet.js';
|
2023-11-05 01:34:13 -05:00
|
|
|
import TouchGestures from '../services/touch-gestures.js';
|
2023-12-07 16:48:34 -05:00
|
|
|
|
2023-11-04 22:10:23 -04:00
|
|
|
import closeAll from './misc/closer.js';
|
2023-12-07 16:48:34 -05:00
|
|
|
import Persist from './misc/persist.js';
|
2023-11-04 22:10:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
export default () => {
|
2023-11-10 23:51:50 -05:00
|
|
|
globalThis.Brightness = Brightness;
|
2023-11-04 22:10:23 -04:00
|
|
|
globalThis.Pointers = Pointers;
|
2023-11-10 23:51:50 -05:00
|
|
|
globalThis.Tablet = Tablet;
|
2023-11-04 22:10:23 -04:00
|
|
|
globalThis.closeAll = closeAll;
|
|
|
|
|
2023-12-07 16:48:34 -05:00
|
|
|
Persist({
|
|
|
|
name: 'bluetooth',
|
|
|
|
gobject: Bluetooth,
|
|
|
|
prop: 'enabled',
|
|
|
|
signal: 'notify::enabled',
|
2023-12-07 15:28:58 -05:00
|
|
|
});
|
2023-12-07 14:02:28 -05:00
|
|
|
|
2023-11-06 20:38:16 -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',
|
2023-11-21 01:29:46 -05:00
|
|
|
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',
|
2023-11-21 01:29:46 -05:00
|
|
|
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',
|
2023-11-21 01:29:46 -05:00
|
|
|
command: () => Hyprland.sendMessage(
|
|
|
|
'dispatch togglespecialworkspace spot',
|
|
|
|
),
|
2023-11-05 01:34:13 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
TouchGestures.addGesture({
|
|
|
|
name: 'swipeSpotify2',
|
|
|
|
gesture: 'RL',
|
|
|
|
edge: 'L',
|
2023-11-21 01:29:46 -05:00
|
|
|
command: () => Hyprland.sendMessage(
|
|
|
|
'dispatch togglespecialworkspace spot',
|
|
|
|
),
|
2023-11-05 01:34:13 -05:00
|
|
|
});
|
2023-11-04 22:10:23 -04:00
|
|
|
};
|