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

103 lines
2.4 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 CurrentWindow from './current-window.js';
import Workspaces from './workspaces.js';
import OskToggle from './osk-toggle.js';
import TabletToggle from './tablet-toggle.js';
import QsToggle from './quick-settings.js';
import NotifButton from './notif-button.js';
import Clock from './clock.js';
import SysTray from './systray.js';
import Battery from './battery.js';
import Brightness from './brightness.js';
import Audio from './audio.js';
import Revealer from './fullscreen.js';
//import KeyboardLayout from './keyboard-layout.js';
2023-09-04 22:27:34 -04:00
2023-10-22 13:39:13 -04:00
export const BgGradient = () => Window({
name: 'bg-gradient',
layer: 'background',
anchor: ['top', 'bottom', 'left', 'right'],
style: `
background-image: -gtk-gradient (linear,
left top, left bottom,
from(rgba(0, 0, 0, 0.5)),
to(rgba(0, 0, 0, 0)));
`,
2023-10-22 13:39:13 -04:00
});
export const Bar = () => Window({
name: 'bar',
layer: 'overlay',
anchor: ['top', 'left', 'right'],
exclusive: true,
child: Revealer({
child: CenterBox({
className: 'bar',
vertical: false,
2023-09-04 22:27:34 -04:00
startWidget: Box({
halign: '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({
halign: '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
});