alsabar: added user settings function

This commit is contained in:
luke bonham 2013-09-20 03:01:04 +02:00
parent 622a3581dd
commit aacefc209e
3 changed files with 8 additions and 2 deletions

View File

@ -92,6 +92,7 @@ end
local function worker(args) local function worker(args)
local args = args or {} local args = args or {}
local timeout = args.timeout or 4 local timeout = args.timeout or 4
local settings = args.settings or function() end
local width = args.width or 63 local width = args.width or 63
local height = args.heigth or 1 local height = args.heigth or 1
local ticks = args.ticks or true local ticks = args.ticks or true
@ -142,6 +143,11 @@ local function worker(args)
alsabar.tooltip:set_text(string.format(" %s:%s ", alsabar.channel, volu)) alsabar.tooltip:set_text(string.format(" %s:%s ", alsabar.channel, volu))
alsabar.bar:set_color(alsabar.colors.unmute) alsabar.bar:set_color(alsabar.colors.unmute)
end end
volume_now = {}
volume_now.level = tonumber(volu)
volume_now.status = mute
settings()
end end
newtimer("alsabar", timeout, alsabar.update) newtimer("alsabar", timeout, alsabar.update)

View File

@ -11,7 +11,7 @@ local newtimer = require("lain.helpers").newtimer
local wibox = require("wibox") local wibox = require("wibox")
local io = io local io = { open = io.open }
local string = { format = string.format, local string = { format = string.format,
match = string.match } match = string.match }

2
wiki

@ -1 +1 @@
Subproject commit f92b3ac0c9dec3a6c8d046ce3d97add99a3a1e5e Subproject commit 36a0534651749f23bf9786ba47912b498938c103