Minor cleanup

master
Mark 2022-04-24 12:27:54 -07:00
parent 9f72bdb16b
commit 161576e2cd
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
10 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,5 @@
local P = {}
P.__index = P
function P:set_value(value)
-- Set widget value. (0 - 100)
@ -30,7 +31,6 @@ end
function P:new()
local widget = {}
setmetatable(widget, self)
self.__index = self
widget.icon = wibox.widget {
id = "icon",

View File

@ -5,7 +5,7 @@ local widget_types = {
local P = {
name = "backlight"
}
P.__index = P
---
-- Internal methods
@ -101,7 +101,6 @@ function P:new(args)
-- do nothing. Updated in _get_status()
}
setmetatable(b, self)
self.__index = self
b.widget = widget_types[b.widget_type]:new()

View File

@ -1,4 +1,5 @@
local P = {}
P.__index = P
function P:set_value(value)
-- Set widget value. (0 - 100)
@ -68,7 +69,6 @@ function P:new()
state = "error"
}
setmetatable(widget, self)
self.__index = self
widget.icon = wibox.widget {
image = beautiful.icons.battery.missing,

View File

@ -6,7 +6,7 @@ local widget_types = {
local P = {
name = "battery"
}
P.__index = P
---
-- Internal methods

View File

@ -1,4 +1,5 @@
local P = {}
P.__index = P
function P:set_value(value)
-- Set widget value. (0 - 100)
@ -50,7 +51,6 @@ function P:new()
state = "error"
}
setmetatable(widget, self)
self.__index = self
widget.progressbar = wibox.widget {
max_value = 100,

View File

@ -5,6 +5,7 @@ local widget_types = {
local P = {
name = "mpc"
}
P.__index = P
---
-- Internal methods
@ -102,7 +103,6 @@ function P:new(args)
mpd_host = args.mpd_host or "localhost",
}
setmetatable(m, self)
self.__index = self
-- Create widget for this volume interface
m.widget = widget_types[m.widget_type]:new()

View File

@ -1,4 +1,5 @@
local P = {}
P.__index = P
function P:update(args)
if (args.error ~= nil) then
@ -28,7 +29,6 @@ end
function P:new()
local widget = {}
setmetatable(widget, self)
self.__index = self
widget.title = wibox.widget.textbox("MPD is not")
widget.title.valign = "center"

View File

@ -1,4 +1,5 @@
local P = {}
P.__index = P
function P:set_value(value)
-- Set widget value. (0 - 100)
@ -34,7 +35,6 @@ end
function P:new()
local widget = {}
setmetatable(widget, self)
self.__index = self
widget.icon = wibox.widget {
resize = true,

View File

@ -1,4 +1,5 @@
local P = {}
P.__index = P
function P:set_value(value)
-- Set widget value. (0 - 100)
@ -24,7 +25,6 @@ end
function P:new()
local widget = {}
setmetatable(widget, self)
self.__index = self
widget.bar = wibox.widget {
max_value = 100,

View File

@ -6,6 +6,7 @@ local widget_types = {
local P = {
name = "volume"
}
P.__index = P
---
-- Internal methods
@ -198,7 +199,6 @@ function P:new(args)
)
setmetatable(v, self)
self.__index = self
-- This timer keeps mute and volume status up-to-date.
v.timer = gears.timer {