ags: better separator properties, add more separators on widgets

This commit is contained in:
retrozinndev
2025-04-27 08:19:26 -03:00
parent 4a2733d884
commit a0cf72ae8a
10 changed files with 100 additions and 91 deletions
+10
View File
@@ -8,6 +8,9 @@ import { Apps } from "../widget/bar/Apps";
import { Clock } from "../widget/bar/Clock";
import { Status } from "../widget/bar/Status";
import { SpecialWorkspaces } from "../widget/bar/SpecialWorkspaces";
import { Separator, SeparatorProps } from "../widget/Separator";
import AstalHyprland from "gi://AstalHyprland?version=0.1";
import { bind } from "astal";
export const Bar = (mon: number) => {
const widgetSpacing = 4;
@@ -34,6 +37,13 @@ export const Bar = (mon: number) => {
children: [
Apps(),
SpecialWorkspaces(),
Separator({
alpha: .2,
orientation: Gtk.Orientation.HORIZONTAL,
margin: 14,
visible: bind(AstalHyprland.get_default(), "workspaces").as(wss =>
wss.filter(ws => ws.id < 0).length > 0)
} as SeparatorProps),
Workspaces(),
FocusedClient()
]
+6 -9
View File
@@ -14,13 +14,14 @@ export const CenterWindow = (mon: number) => PopupWindow({
monitor: mon,
child: new Widget.Box({
className: "center-window-container",
spacing: 6,
children: [
new Widget.Box({
className: "vertical left",
className: "left",
orientation: Gtk.Orientation.VERTICAL,
children: [
new Widget.Box({
className: "top",
className: "datetime",
orientation: Gtk.Orientation.VERTICAL,
valign: Gtk.Align.START,
children: [
@@ -52,16 +53,12 @@ export const CenterWindow = (mon: number) => PopupWindow({
} as Widget.BoxProps),
Separator({
orientation: Gtk.Orientation.HORIZONTAL,
alpha: .5,
cssColor: "gray",
margin: 5,
alpha: .3,
visible: bind(AstalMpris.get_default(), "players").as(players => players.length > 0),
size: 1
} as SeparatorProps),
new Widget.Box({
className: "vertical right",
orientation: Gtk.Orientation.VERTICAL,
child: BigMedia()
} as Widget.BoxProps)
BigMedia()
]
} as Widget.BoxProps)
} as PopupWindowProps);