Слушаю музыку с mpd. В качестве гуйни к нему - Cantata.
Понадобился осомовиджет для этого. Использовал пример из вики к vicious.widgets.mpd.
Код виджета:
mpdwidget = wibox.widget.textbox()
vicious.register(mpdwidget, vicious.widgets.mpd,
function (mpdwidget, args)
if args["{state}"] == "Stop" then
return " Not Playing "
else
return args["{Artist}"]..' - '.. args["{Title}"]
end
end, 10)
music_directory "/home/princess-cadance/music-lossless/"
playlist_directory "/home/princess-cadance/.local/share/cantata/mpd/playlists"
sticker_file "/home/princess-cadance/.local/share/cantata/mpd/sticker.sql"
bind_to_address "/home/princess-cadance/.local/share/cantata/mpd/socket"
db_file "/home/princess-cadance/.cache/cantata/mpd/tag_cache"
pid_file "/home/princess-cadance/.cache/cantata/mpd/pid"
state_file "/home/princess-cadance/.cache/cantata/mpd/state"
log_file "/dev/null"
metadata_to_use "artist,album,title,track,name,genre,date,disc,albumartist,composer"
audio_output {
type "alsa"
name "Output"
}
mixer_type "software"
audio_buffer_size "8192"
filesystem_charset "UTF-8"
id3v1_encoding "UTF-8"
awesome v3.5.5 (Kansas City Shuffle)
• Build: Aug 25 2014 20:55:55 for i686 by gcc version 4.7.3 (@Gentoo-TD)
• Compiled against Lua 5.1.5 (running with Lua 5.1)
• D-Bus support: ✔
Music Player Daemon 0.18.14