Add forgottend square brackets

Fixed broken code that was missing square brackets and would break on machines
with no battery.
This commit is contained in:
Stefano Mazzucco 2017-11-05 15:41:07 +00:00
parent 8ed443ed88
commit 584fb4b3f6
2 changed files with 28 additions and 1 deletions

View File

@ -125,7 +125,7 @@ function widget:init()
end end
self.device = get_data( self.device = get_data(
devices[DeviceType.Battery] devices[DeviceType.Battery]
or devices[DeviceType"Line Power"]) or devices[DeviceType["Line Power"]])
self.tooltip = awful.tooltip({ objects = { widget },}) self.tooltip = awful.tooltip({ objects = { widget },})
self.gui_client = "" self.gui_client = ""

View File

@ -0,0 +1,27 @@
package = "power_widget"
version = "0.3.1-1"
source = {
url = "git://github.com/stefano-m/awesome-power_widget",
tag = "v0.3.1"
}
description = {
summary = "A Power widget for the Awesome Window Manager",
detailed = [[
Monitor your power devices in Awesome with UPower and DBus.
]],
homepage = "https://github.com/stefano-m/awesome-power_widget",
license = "GPL v3"
}
supported_platforms = {
"linux"
}
dependencies = {
"lua >= 5.1",
"upower_dbus >= 0.3.0, < 0.4"
}
build = {
type = "builtin",
modules = {
power_widget = "power_widget.lua"
}
}