summaryrefslogtreecommitdiff
path: root/examples/lua/simple-bar/widget
diff options
context:
space:
mode:
authorKevin <[email protected]>2024-10-16 00:49:16 -0300
committerKevin <[email protected]>2024-10-16 00:49:16 -0300
commit2b1e8501b46056b79d97e90c6ec94e3ad36d0ab2 (patch)
tree6486e98bd1ba523b1aeb4bd2566d1ff6e5c41798 /examples/lua/simple-bar/widget
parent03f2c4706faba7dac5aee71b10255eac218cbeec (diff)
parent236487001ab2a6c9c8e87e5db0ced9e5ab3ed791 (diff)
Merge branch 'adapt-upstream-changes'
Diffstat (limited to 'examples/lua/simple-bar/widget')
-rw-r--r--examples/lua/simple-bar/widget/Bar.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/lua/simple-bar/widget/Bar.lua b/examples/lua/simple-bar/widget/Bar.lua
index d340cba..bf230bb 100644
--- a/examples/lua/simple-bar/widget/Bar.lua
+++ b/examples/lua/simple-bar/widget/Bar.lua
@@ -1,9 +1,9 @@
local astal = require("astal")
-local App = astal.App
-local Widget = astal.Widget
+local App = require("astal.gtk3.app")
+local Widget = require("astal.gtk3.widget")
local Variable = astal.Variable
-local Gdk = astal.Gdk
-local GLib = astal.GLib
+local Gdk = astal.require("Gdk", "3.0")
+local GLib = astal.require("GLib")
local bind = astal.bind
local Mpris = astal.require("AstalMpris")
local Battery = astal.require("AstalBattery")
@@ -170,10 +170,12 @@ local function Time(format)
end
return function(gdkmonitor)
+ local WindowAnchor = astal.require("Astal", "3.0").WindowAnchor
+
return Widget.Window({
class_name = "Bar",
gdkmonitor = gdkmonitor,
- anchor = astal.Astal.WindowAnchor.TOP + astal.Astal.WindowAnchor.LEFT + astal.Astal.WindowAnchor.RIGHT,
+ anchor = WindowAnchor.TOP + WindowAnchor.LEFT + WindowAnchor.RIGHT,
exclusivity = "EXCLUSIVE",
Widget.CenterBox({