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 = {} local P = {}
P.__index = P
function P:set_value(value) function P:set_value(value)
-- Set widget value. (0 - 100) -- Set widget value. (0 - 100)
@ -30,7 +31,6 @@ end
function P:new() function P:new()
local widget = {} local widget = {}
setmetatable(widget, self) setmetatable(widget, self)
self.__index = self
widget.icon = wibox.widget { widget.icon = wibox.widget {
id = "icon", id = "icon",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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