[BREAKING] Initialize the widget when `require`d
This commit is contained in:
parent
bdb814d67c
commit
18f379f323
|
@ -95,10 +95,9 @@ Require the module:
|
|||
-- require *after* `beautiful.init` or the theme will be inconsistent!
|
||||
local power = require("power_widget")
|
||||
-- override the GUI client.
|
||||
power.gui_client = "xfce4-power-manager"
|
||||
power.gui_client = "xfce4-power-manager-settings"
|
||||
-- override the critical battery percentage
|
||||
power.critical_percentage = 18
|
||||
power:init()
|
||||
```
|
||||
|
||||
Add the widget to your layout:
|
||||
|
|
|
@ -136,6 +136,7 @@ function widget:init()
|
|||
end
|
||||
end
|
||||
)))
|
||||
return self
|
||||
end
|
||||
|
||||
return widget
|
||||
return widget:init()
|
||||
|
|
Loading…
Reference in New Issue