diff options
author | Aylur <[email protected]> | 2024-10-15 15:30:04 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-15 15:30:04 +0200 |
commit | cbe650afb31c24faea6da45b4aeeffc6e964969d (patch) | |
tree | d5c3788835ca7e50d68cd023026e7738f39f6f71 /examples/lua/simple-bar/widget | |
parent | bdb23e20f171da7c769cba9e393d7e406e563a78 (diff) | |
parent | bafd48d3df9b43a1d49ec015eff30619d595468b (diff) |
Merge pull request #46 from Aylur/small-refactor
Small refactor
Diffstat (limited to 'examples/lua/simple-bar/widget')
-rw-r--r-- | examples/lua/simple-bar/widget/Bar.lua | 12 |
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({ |