nixos-configs/devices/wim/config/ags/js/bar/main.js

92 lines
2.2 KiB
JavaScript
Raw Normal View History

import { Window, CenterBox, Box } from 'resource:///com/github/Aylur/ags/widget.js';
2023-09-04 22:27:34 -04:00
import Separator from '../misc/separator.js';
2023-11-16 00:48:50 -05:00
import CurrentWindow from './buttons/current-window.js';
import Workspaces from './buttons/workspaces.js';
import OskToggle from './buttons/osk-toggle.js';
import TabletToggle from './buttons/tablet-toggle.js';
import QsToggle from './buttons/quick-settings.js';
import NotifButton from './buttons/notif-button.js';
import Clock from './buttons/clock.js';
import SysTray from './buttons/systray.js';
import Battery from './buttons/battery.js';
import Brightness from './buttons/brightness.js';
import Audio from './buttons/audio.js';
import KeyboardLayout from './buttons/keyboard-layout.js';
2023-09-04 22:27:34 -04:00
2023-11-16 00:48:50 -05:00
import BarReveal from './fullscreen.js';
2023-10-22 13:39:13 -04:00
export default () => Window({
name: 'bar',
layer: 'overlay',
anchor: ['top', 'left', 'right'],
2023-11-15 15:11:55 -05:00
exclusivity: 'exclusive',
2023-11-16 00:48:50 -05:00
child: BarReveal({
child: CenterBox({
className: 'bar',
vertical: false,
2023-09-04 22:27:34 -04:00
startWidget: Box({
2023-11-06 18:37:23 -05:00
hpack: 'start',
children: [
2023-09-04 22:27:34 -04:00
OskToggle(),
2023-09-04 22:27:34 -04:00
Separator(12),
TabletToggle(),
2023-09-04 22:27:34 -04:00
Separator(12),
2023-09-08 15:23:52 -04:00
SysTray(),
2023-09-08 15:23:52 -04:00
Audio(),
2023-09-08 15:15:04 -04:00
Separator(12),
2023-09-04 22:27:34 -04:00
Brightness(),
Separator(12),
Workspaces(),
],
}),
centerWidget: Box({
children: [
Separator(12),
CurrentWindow(),
Separator(12),
],
}),
endWidget: Box({
2023-11-06 18:37:23 -05:00
hpack: 'end',
children: [
Battery(),
2023-09-04 22:27:34 -04:00
Separator(12),
KeyboardLayout(),
Separator(12),
Clock(),
2023-09-05 19:22:54 -04:00
Separator(12),
2023-09-05 19:22:54 -04:00
NotifButton(),
2023-09-05 15:10:25 -04:00
Separator(12),
2023-09-05 15:10:25 -04:00
QsToggle(),
],
}),
}),
}),
2023-09-04 22:27:34 -04:00
});