Refactor lua modules for object ownership
This commit is contained in:
+5
-3
@@ -1,3 +1,5 @@
|
|||||||
hl.on("hyprland.start", function()
|
return {
|
||||||
hl.exec_cmd("swaybg -m stretch -i ./wallpaper/XP.jpg")
|
start = function()
|
||||||
end)
|
hl.exec_cmd("swaybg -m stretch -i ./wallpaper/XP.jpg")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
+10
-2
@@ -1,2 +1,10 @@
|
|||||||
require("monitor")
|
local monitor = require("monitor")
|
||||||
require("background")
|
local background = require("background")
|
||||||
|
local status_bar = require("status_bar")
|
||||||
|
|
||||||
|
-- on event
|
||||||
|
hl.on("hyprland.start", function()
|
||||||
|
monitor.start()
|
||||||
|
background.start()
|
||||||
|
status_bar.start()
|
||||||
|
end)
|
||||||
|
|||||||
@@ -11,3 +11,7 @@ hl.monitor({
|
|||||||
position = "auto",
|
position = "auto",
|
||||||
scale = 1,
|
scale = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
start = function() end,
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
start = function()
|
||||||
|
hl.exec_cmd("waybar")
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user