question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drawbox width of the Tasklist widget not adjusted depending of icons number + icons not centered

See original GitHub issue

The issue:

qtile --version :0.22.1

I wanted to get a tasklist widget with only centered icons and with a widget drawbox adjusted to the number of icon. Instead:

  • The icons are placed on the left hand side
  • using a non transparent color for the background we can see that the widget is taking more space than necessary. This prevents the use of RectDecoration (at least to get good cosmetic results).

Ideally the width of the drawbox would be dynamically adjusted depending on the number of icons.

image

Removal of text was obtained with

def txt_remove(text): 
    text = ""
    return text

and in tasklist.widget parse_text=txt_remove,

Required:

  • I have searched past issues to see if this bug has already been reported.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
elParaguayocommented, Sep 22, 2022

I’ll add to my list.

0reactions
ervinpopescucommented, Sep 23, 2022

I remember this rice that had a custom task list doing the job, if that helps: https://www.reddit.com/r/unixporn/comments/wb2r57/final_rice_on_qtile/

Qtile dots: https://github.com/ervinpopescu/dots-Lenovo/tree/main/.config/qtile

Hi, I’m the chef who made that rice 😃

As you can see from the dots, the tasklist has a transparent background, the issue you are pointing out bugged me too. I tried to make something like a thumbnail for windows in the tasklist and came across this, tried fixing it by playing with the calculate_length method and the __init__, but that didn’t work, so I eventually gave up, and then gave up on the thumbnail thing too, but not because of this issue.

So yeah, @elParaguayo is completely correct, but it would be nice if we had a way of not hardcoding the widget’s length 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class awful.widget.tasklist - awesome API documentation
Tasklist widget module for awful. Status icons: By default, the tasklist prepends some symbols in front of the client name.
Read more >
Tasklist icon placement · Issue #1714 · qtile/qtile - GitHub
Groupbox or Graph widgets seem to not have this issue, text or graphs are always vertically aligned to center, unless overridden with margin_y....
Read more >
Source code for libqtile.widget.tasklist - Qtile Docs
MarginMixin): """Displays the icon and name of each window in the current group ... is None(no shadow)"), ("borderwidth", 2, "Current group border width"), ......
Read more >
lua - awesomewm - size of tasklist icons - Stack Overflow
I am working with a non-modified, just installed awesome wm build and cant seem to figure this one out. I tried s.mytasklist =...
Read more >
Solved: Help with custom WAB DrawBox - Esri Community
My custom DrawBox does not load on my widget. The widget just shows the loading icon. I want to basically modify the DrawBox...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found