]>
git.madduck.net Git - etc/awesome.git/blobdiff - widgets/mpd.lua
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
local port = args.port or "6600"
local music_dir = args.music_dir or os.getenv("HOME") .. "/Music"
local refresh_timeout = args.refresh_timeout or 1
local port = args.port or "6600"
local music_dir = args.music_dir or os.getenv("HOME") .. "/Music"
local refresh_timeout = args.refresh_timeout or 1
- local notify_timeout = args.notify_timeout or 5
local color_artist = args.color_artist or beautiful.fg_normal or "#FFFFFF"
local color_song = args.color_song or beautiful.fg_focus or "#FFFFFF"
local color_artist = args.color_artist or beautiful.fg_normal or "#FFFFFF"
local color_song = args.color_song or beautiful.fg_focus or "#FFFFFF"
- local spr = args.spr or ""
- local musicplr = args.musicplr or "ncmpcpp"
+ local spr = args.spr or " "
+ local app = args.app or "ncmpcpp"
local shadow = args.shadow or false
local mpdcover = helpers.scripts_dir .. "mpdcover"
local shadow = args.shadow or false
local mpdcover = helpers.scripts_dir .. "mpdcover"
icon = "/tmp/mpdcover.png",
fg = beautiful.fg_focus or "#FFFFFF",
bg = beautiful.bg_normal or "#000000" ,
icon = "/tmp/mpdcover.png",
fg = beautiful.fg_focus or "#FFFFFF",
bg = beautiful.bg_normal or "#000000" ,
- timeout = notify_timeout,
replaces_id = mpd.id
}).id
end
mympd:set_markup(markup(color_artist, " " .. mpd_state["{Artist}"])
.. spr ..
replaces_id = mpd.id
}).id
end
mympd:set_markup(markup(color_artist, " " .. mpd_state["{Artist}"])
.. spr ..
- markup(color_song, " " .. mpd_state["{Title}"] .. " "))
+ markup(color_song, mpd_state["{Title}"] .. " "))
elseif mpd_state["{state}"] == "pause"
then
mympd:set_markup(markup(color_artist, " mpd")
.. spr ..
elseif mpd_state["{state}"] == "pause"
then
mympd:set_markup(markup(color_artist, " mpd")
.. spr ..
- markup(color_song, " paused "))
+ markup(color_song, "paused "))
else
helpers.set_map("current mpd track", nil)
set_nompd()
else
helpers.set_map("current mpd track", nil)
set_nompd()
mympd:buttons(awful.util.table.join(
awful.button({}, 0,
function()
mympd:buttons(awful.util.table.join(
awful.button({}, 0,
function()
- helpers.run_in_terminal(musicplr )
+ helpers.run_in_terminal(app )