This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-dotfiles/user/configs/wayland/ags/ags-config/js/panel/panel.js

46 lines
971 B
JavaScript
Raw Normal View History

2023-10-15 00:16:19 +01:00
import { Box, CenterBox, Window } from 'resource:///com/github/Aylur/ags/widget.js';
2023-10-12 20:52:06 +01:00
import Workspaces from './widgets/workspaces.js';
import WindowTitle from './widgets/windowTitle.js';
//
import Volume from './widgets/volume.js';
import Mpris from './widgets/mpris.js'
//
import SysTray from './widgets/sysTray.js';
import Clock from './widgets/clock.js';
2023-10-15 00:16:19 +01:00
const Left = monitor => Box({
2023-10-12 20:52:06 +01:00
children: [
2023-10-26 01:39:36 +01:00
Workspaces(monitor),
WindowTitle(),
2023-10-12 20:52:06 +01:00
],
});
2023-10-15 00:16:19 +01:00
const Center = () => Box({
2023-10-12 20:52:06 +01:00
children: [
2023-10-18 17:33:03 +01:00
Volume(),
Mpris('mpd'),
2023-10-12 20:52:06 +01:00
],
});
2023-10-15 00:16:19 +01:00
const Right = () => Box({
2023-12-01 12:55:49 +00:00
hpack: 'end',
2023-10-12 20:52:06 +01:00
children: [
2023-10-18 17:33:03 +01:00
SysTray(),
Clock(),
2023-10-12 20:52:06 +01:00
],
});
2023-10-15 00:16:19 +01:00
export default monitor => Window({
name: `bar-${monitor}`,
2023-12-01 12:55:49 +00:00
exclusivity: "exclusive",
2023-10-12 20:52:06 +01:00
className: 'bar',
monitor,
anchor: ['top', 'left', 'right'],
2023-10-15 00:16:19 +01:00
child: CenterBox({
startWidget: Left(monitor),
2023-10-12 20:52:06 +01:00
centerWidget: Center(),
endWidget: Right(),
}),
})