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

86 lines
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';
import Battery from './buttons/battery.js';
import Clock from './buttons/clock.js';
import CurrentWindow from './buttons/current-window.js';
import Heart from './buttons/heart.js';
import NotifButton from './buttons/notif-button.js';
import OskToggle from './buttons/osk-toggle.js';
import QsToggle from './buttons/quick-settings.js';
import SysTray from './buttons/systray.js';
import TabletToggle from './buttons/tablet-toggle.js';
import Workspaces from './buttons/workspaces.js';
2023-09-04 22:27:34 -04:00
2023-11-16 00:48:50 -05:00
import BarReveal from './fullscreen.js';
const SPACING = 12;
2023-10-22 13:39:13 -04:00
export default () => Window({
name: 'bar',
layer: 'overlay',
anchor: ['top', 'left', 'right'],
margins: [-1, 0, 0, 0],
2023-11-15 15:11:55 -05:00
exclusivity: 'exclusive',
2023-11-16 00:48:50 -05:00
child: BarReveal({
child: CenterBox({
css: 'margin: 6px 5px 5px 5px',
2023-12-18 18:00:30 -05:00
class_name: 'bar',
2023-09-04 22:27:34 -04:00
2023-12-18 18:00:30 -05:00
start_widget: 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(SPACING),
TabletToggle(),
2023-09-04 22:27:34 -04:00
Separator(SPACING),
2023-09-08 15:23:52 -04:00
SysTray(),
2023-09-08 15:23:52 -04:00
Workspaces(),
Separator(SPACING),
CurrentWindow(),
],
}),
2023-12-18 18:00:30 -05:00
center_widget: Box({
children: [
Separator(SPACING),
Clock(),
Separator(SPACING),
],
}),
2023-12-18 18:00:30 -05:00
end_widget: Box({
2023-11-06 18:37:23 -05:00
hpack: 'end',
children: [
Heart(),
Separator(SPACING),
Battery(),
2023-09-05 19:22:54 -04:00
Separator(SPACING),
2023-09-05 19:22:54 -04:00
NotifButton(),
2023-09-05 15:10:25 -04:00
Separator(SPACING),
2023-09-05 15:10:25 -04:00
QsToggle(),
],
}),
}),
}),
2023-09-04 22:27:34 -04:00
});