diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-17 15:14:45 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-17 15:14:45 -0400 |
commit | 1173df26fd78fdd59679645004847237ed7a0a54 (patch) | |
tree | b75e6bd3ee1a878b1a3e74d94fb9ea0bb94c14a7 /pkgs/astal/src/widget/bar/init.lua | |
parent | add upowerd (diff) | |
download | dotfiles-nix-1173df26fd78fdd59679645004847237ed7a0a54.tar.gz dotfiles-nix-1173df26fd78fdd59679645004847237ed7a0a54.tar.bz2 dotfiles-nix-1173df26fd78fdd59679645004847237ed7a0a54.zip |
add astal package, update flake to support packages
Diffstat (limited to 'pkgs/astal/src/widget/bar/init.lua')
-rw-r--r-- | pkgs/astal/src/widget/bar/init.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/astal/src/widget/bar/init.lua b/pkgs/astal/src/widget/bar/init.lua new file mode 100644 index 0000000..038ac90 --- /dev/null +++ b/pkgs/astal/src/widget/bar/init.lua @@ -0,0 +1,44 @@ +local astal = require("astal") +local Widget = require("astal.gtk3.widget") + +local Workspaces = require("widget.bar.workspaces") +local FocusedClient = require("widget.bar.focusedClient") +local Date = require("widget.bar.date") +local WiFi = require("widget.bar.wifi") +local Audio = require("widget.bar.audio") +local Battery = require("widget.bar.battery") +local Tray = require("widget.bar.tray") + +return function(gdkmonitor) + local Anchor = astal.require('Astal').WindowAnchor + + return Widget.Window({ + class_name = "bar", + gdkmonitor = gdkmonitor, + anchor = Anchor.TOP + Anchor.LEFT + Anchor.RIGHT, + exclusivity = "EXCLUSIVE", + Widget.CenterBox({ + Widget.Box({ + class_name = "left", + halign = "START", + hexpand = true, + Workspaces(), + FocusedClient(), + }), + Widget.Box({ + class_name = "center", + hexpand = true, + Date(), + }), + Widget.Box({ + class_name = "right", + halign = "END", + hexpand = true, + WiFi(), + Audio(), + Battery(), + Tray(), + }), + }) + }) +end |