✨ ags: better separator properties, add more separators on widgets
This commit is contained in:
@@ -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()
|
||||
]
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user