mpd: added some optional stats, commented
This commit is contained in:
parent
4113d371d1
commit
15349516ca
2
README
2
README
|
@ -249,7 +249,7 @@ vicious.widgets.mpd
|
||||||
argument is provided connection attempt will be made to localhost
|
argument is provided connection attempt will be made to localhost
|
||||||
port 6600 with no password
|
port 6600 with no password
|
||||||
- returns a table with string keys: {volume}, {state}, {Artist},
|
- returns a table with string keys: {volume}, {state}, {Artist},
|
||||||
{Title}, {Album}, {Genre}
|
{Title}, {Album}, {Genre} and optionally {Name} and {file}
|
||||||
|
|
||||||
vicious.widgets.volume
|
vicious.widgets.volume
|
||||||
- provides volume levels and state of requested ALSA mixers
|
- provides volume levels and state of requested ALSA mixers
|
||||||
|
|
1
TODO
1
TODO
|
@ -9,7 +9,6 @@
|
||||||
** TODO Consider including this code in format helper
|
** TODO Consider including this code in format helper
|
||||||
- return format and format:gsub("${[^}]+}", "")
|
- return format and format:gsub("${[^}]+}", "")
|
||||||
- Note: We should then also replace just $1/$2...
|
- Note: We should then also replace just $1/$2...
|
||||||
** TODO Include Name and file in MPD widget
|
|
||||||
** TODO Complete the hddtemp fix
|
** TODO Complete the hddtemp fix
|
||||||
- In certain setups regexp does not match all devices
|
- In certain setups regexp does not match all devices
|
||||||
- The regexp catches the first device name, but last stats
|
- The regexp catches the first device name, but last stats
|
||||||
|
|
|
@ -24,7 +24,9 @@ local function worker(format, warg)
|
||||||
["{Artist}"] = "N/A",
|
["{Artist}"] = "N/A",
|
||||||
["{Title}"] = "N/A",
|
["{Title}"] = "N/A",
|
||||||
["{Album}"] = "N/A",
|
["{Album}"] = "N/A",
|
||||||
["{Genre}"] = "N/A"
|
["{Genre}"] = "N/A",
|
||||||
|
--["{Name}"] = "N/A",
|
||||||
|
--["{file}"] = "N/A",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Fallback to MPD defaults
|
-- Fallback to MPD defaults
|
||||||
|
@ -47,6 +49,8 @@ local function worker(format, warg)
|
||||||
elseif k == "Title" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
elseif k == "Title" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
||||||
elseif k == "Album" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
elseif k == "Album" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
||||||
elseif k == "Genre" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
elseif k == "Genre" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
||||||
|
--elseif k == "Name" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
||||||
|
--elseif k == "file" then mpd_state["{"..k.."}"] = helpers.escape(v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue