2023-10-31 08:32:40 -04:00
|
|
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2023-10-31 08:32:40 -04:00
|
|
|
import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
2023-09-05 15:10:25 -04:00
|
|
|
|
2023-12-05 09:42:06 -05:00
|
|
|
import Audio from './audio.js';
|
2023-12-05 11:35:40 -05:00
|
|
|
import Bluetooth from './bluetooth.js';
|
2023-12-07 15:28:58 -05:00
|
|
|
import Brightness from './brightness.js';
|
2023-12-05 09:42:06 -05:00
|
|
|
import KeyboardLayout from './keyboard-layout.js';
|
|
|
|
import Network from './network.js';
|
|
|
|
|
2023-11-16 00:48:50 -05:00
|
|
|
import EventBox from '../../misc/cursorbox.js';
|
2023-12-05 09:42:06 -05:00
|
|
|
import Separator from '../../misc/separator.js';
|
|
|
|
|
|
|
|
const SPACING = 4;
|
2023-09-11 19:57:21 -04:00
|
|
|
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-10-17 13:47:02 -04:00
|
|
|
export default () => EventBox({
|
2023-10-20 23:11:21 -04:00
|
|
|
className: 'toggle-off',
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2023-12-05 09:42:06 -05:00
|
|
|
onHoverLost: () => { /**/ },
|
|
|
|
|
2023-12-12 11:21:27 -05:00
|
|
|
onPrimaryClickRelease: (self) => {
|
|
|
|
App.getWindow('notification-center')
|
|
|
|
.setXPos(self.get_allocation(), 'right');
|
|
|
|
|
|
|
|
App.toggleWindow('quick-settings');
|
|
|
|
},
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
connections: [[App, (self, windowName, visible) => {
|
2023-11-21 01:29:46 -05:00
|
|
|
if (windowName === 'quick-settings') {
|
2023-10-20 23:11:21 -04:00
|
|
|
self.toggleClassName('toggle-on', visible);
|
2023-11-21 01:29:46 -05:00
|
|
|
}
|
2023-10-20 23:11:21 -04:00
|
|
|
}]],
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
child: Box({
|
|
|
|
className: 'quick-settings-toggle',
|
|
|
|
vertical: false,
|
2023-12-05 09:42:06 -05:00
|
|
|
children: [
|
|
|
|
Separator(SPACING),
|
|
|
|
|
|
|
|
KeyboardLayout(),
|
|
|
|
|
2023-12-07 15:28:58 -05:00
|
|
|
Brightness(),
|
|
|
|
|
2023-12-05 09:42:06 -05:00
|
|
|
Audio(),
|
|
|
|
|
2023-12-05 11:35:40 -05:00
|
|
|
Bluetooth(),
|
2023-12-05 09:42:06 -05:00
|
|
|
|
|
|
|
Network(),
|
|
|
|
|
|
|
|
Label(' '),
|
|
|
|
|
|
|
|
Separator(SPACING),
|
|
|
|
],
|
2023-09-05 15:10:25 -04:00
|
|
|
}),
|
|
|
|
});
|