Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mocp_album_cover = wibox.widget {
- forced_height = 96,
- forced_width = 96,
- resize = true,
- widget = wibox.widget.imagebox
- }
- mocp_album_cover:set_image("/home/" .. user .. "/.moc/default_album.png")
- .................................................................
- s.popup_mocp = awful.popup {
- ontop = true,
- visible = false,
- screen = s,
- shape = function(cr, width, height) gears.shape.partially_rounded_rect(cr, width, height, true, true, false, true, 16) end,
- offset = { y = 5 },
- border_width = 2,
- border_color = beautiful.border_focus,
- widget = {
- {
- {
- {
- { { { widget = mocp_album_cover, }, bg = beautiful.bg_normal, shape_clip = true, shape = function(cr, width, height) gears.shape.partially_rounded_rect(cr, width, height, true, true, false, true, 16) end, widget = wibox.container.background, }, margins = 5, widget = wibox.container.margin, },
- {
- {
- { widget = mocp_playlist_button },
- { widget = mocp_shuffle_button },
- { widget = mocp_repeat_button },
- layout = wibox.layout.align.horizontal,
- expand = 'none',
- },
- { widget = mocwidget.w_artist },
- { widget = mocwidget.w_album },
- { widget = mocwidget.w_title },
- layout = wibox.layout.fixed.vertical,
- },
- layout = wibox.layout.fixed.horizontal,
- },
- layout = wibox.layout.fixed.horizontal,
- },
- { widget = mocline },
- {
- { widget = mocp_prev_button },
- { widget = mocp_pause_button },
- { widget = mocp_next_button },
- layout = wibox.layout.align.horizontal,
- expand = 'none',
- },
- layout = wibox.layout.fixed.vertical,
- },
- margins = 10,
- widget = wibox.container.margin,
- },
- }
- awful.placement.right(s.popup_mocp, { margins = { right = 65, top = 50, }, parent = s })
- .................................................................
- awesome.connect_signal("song::changed", function() mocp_album_cover:set_image(gears.surface.load_uncached("/home/" .. user .. "/.moc/current_album.png")) end)
- ..............................................
- ffmpeg -y -i "`mocp -Q %file`" $HOME/.moc/current_album.png
- if [ $? -eq 1 ]; then
- cp $HOME/.moc/default_album.png $HOME/.moc/current_album.png
- fi
- .........................................
- awesome.emit_signal("song::changed")
Add Comment
Please, Sign In to add comment