You are not logged in.
Hi folks,
this volume widget doesn't work anymore after upgrading awesome:
http://awesome.naquadah.org/wiki/Volume … nd_display
I get the error
volume.lua:1: attempts to call global 'widget' (a nil value)This is the file:
volume_widget = widget({ type = "textbox", name = "tb_volume", align = "right" })
function update_volume(widget)
local fd = io.popen("amixer sget Master")
local status = fd:read("*all")
fd:close()
local volume = tonumber(string.match(status, "(%d?%d?%d)%%")) / 100
-- volume = string.format("% 3d", volume)
status = string.match(status, "%[(o[^%]]*)%]")
-- starting colour
local sr, sg, sb = 0x3F, 0x3F, 0x3F
-- ending colour
local er, eg, eb = 0xDC, 0xDC, 0xCC
local ir = volume * (er - sr) + sr
local ig = volume * (eg - sg) + sg
local ib = volume * (eb - sb) + sb
interpol_colour = string.format("%.2x%.2x%.2x", ir, ig, ib)
if string.find(status, "on", 1, true) then
volume = " <span background='#" .. interpol_colour .. "'> </span>"
else
volume = " <span color='red' background='#" .. interpol_colour .. "'> M </span>"
end
widget.text = volume
end
update_volume(volume_widget)
awful.hooks.timer.register(1, function () update_volume(volume_widget) end)Any ideas?
Thanks in advance!
Steffo
Last edited by Steffo (2013-01-04 11:25:39)
Offline
While I don't use awesome, there have been a very large number of awesomewm problem threads recently. It seems a majority of them came from users updating awesome without replacing or merging the new configs. As the configuration has changed notably in the last update this has caused all sorts of problems.
Do you have the same problem if you move/rename all your current configs and replace them with the stock/default ones that were just installed with the update?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Well the problem is, that my config in my home directory don't get loaded because of the error I described here and then the default config in /etc gets loaded what is not what I want, because essential features like increasing/decreasing volume is not supported by default...
Best regards
Stefano
Offline
The api for widget changed in the 3.5 update according to their update documentation.
http://awesome.naquadah.org/wiki/Awesom … eplacement
Offline
OK, I ported the volume widget by myself with some help from the awesome wm mailing list.
I updated the wiki:
Offline