streetturtle / awesome-wm-widgets

Widgets for Awesome Window Manager
http://pavelmakhov.com/awesome-wm-widgets/
MIT License
2.09k stars 270 forks source link

Spotify Widget (question) #311

Closed raven2cz closed 2 years ago

raven2cz commented 2 years ago

I'm using spotify widget in the default awesomewm panel. example:

    s.mywibox.widget = {
      layout = wibox.layout.align.horizontal,
      { -- Left widgets
        layout = wibox.layout.fixed.horizontal,
        mylauncher,
        separator,
        s.mytaglist,
        separator,
        s.mypromptbox,
      },
      s.mytasklist, -- Middle widget
      { -- Right widgets
        layout = wibox.layout.fixed.horizontal,
        separator,
        spotifyWibox,
        separator,
        todo_widget(),
        separator,
        wibox.widget.systray(),
        separator,
        keyboardWibox,
        fsWibox,
        memWibox,
        cpuWibox,
        tempWibox,
        alsaWibox,
        netWibox,
        weatherWibox,
        clockWibox,
        s.mylayoutbox,
      },

The configuration of spotify widget is

-- Spotify widget
local spotifyWibox = spotify_widget({
  font = theme.font,
  max_length = 500,
  play_icon = '/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg',
  pause_icon = '/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg'
})

But the widget size is still around just 150px, the each song names is cut and have to rotate. I have much more space in the panel.

Is there some way how to force minimal size, or add preference to extend the spotify size. Or maybe create some wibox container which extends the spotify included cmp, but I don't know if the spotify will be correctly resized.

streetturtle commented 2 years ago

Hi! Could you please share a screenshot?

raven2cz commented 2 years ago

spotify-short-width

davidk55 commented 2 years ago

Hello, I just have the same problem right now. I also tried -1 and big numbers like 1000 for the max_length, but it do not apply and still shows only part of the name. Would be cool if you can give some context in how you fixed it if you did @raven2cz

raven2cz commented 2 years ago

Hi,

https://github.com/streetturtle/awesome-wm-widgets/issues/328

Included zip file. There are all important changes for spotify.lua and todo.lua. The issue is not still processed. It is not just about light theme. I extends the spotify length and much more. It needs better external configuration of these components. But it is not done. And it is a reason why I don't created PR. But it can help you, you can create your patch or improve it and create PR.

davidk55 commented 2 years ago

Just tried your fix and it works perfectly, thanks