Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

A couple of things (Battery, volume, systray)

56 views
Skip to first unread message

Eduardo Queiroz

unread,
Nov 17, 2022, 7:10:48 PM11/17/22
to qtile-dev
Hi guys,

Now that I finished uni I fully moved to Linux and qtile and therefore I am trying to make it the way I want it. However, I am having a couple of issues:

    - My battery widget is set this way:
    widget.Battery(                                                        
        background=myColor[14],                                            
        battery=0,                                                        
        format="{char}",                                                  
        charge_char=" ",                                                  
        discharge_char=" ",                                              
        empty_char=" ",                                                  
        padding=5,                                                        
        foreground=myColor[2],                                            
        mouse_callbacks={                                                  
        "Button1": lambda: qtile.cmd_spawn(                            
             terminal                                                  
             + " --hold upower -i /org/freedesktop/UPower/devices/battery_BAT0")                                    },                                                                
        ),                                                                    
    widget.Battery(                                                        
        foreground=myColor[1],                                            
        background=myColor[14],                                            
        format="{percent:2.0%}",                                          
        mouse_callbacks={                                                  
            "Button1": lambda: qtile.cmd_spawn(                            
            terminal                                                  
            + " --hold upower -i /org/freedesktop/UPower/devices/battery_BAT0")                                    },                                                                
       ),

The problem is this case is that most of the time instead of the characters set in "charge_char", "discharge_char" and "empty_char" a question mark is shown.
Also is it possible to add something like "full_char", "half_char" and "quarter_char"?

For the volume I would like to ask the same thing as a suggested to the battery, so
"full_vol_char" and so on?

Last, I have a two monitor setup and the systray widget always crash on my second screen. Is there anything to make it work?

Thanks for everything,

Eddie

James Wright

unread,
Nov 29, 2022, 5:08:05 PM11/29/22
to qtile-dev
Regarding the question mark in the battery symbol, I'm not sure what's happening on the backend to make that appear, but for me that's normally what shows up when the battery is fully charged, but is plugged in (ie. it's not "charging" since it's already charged, but it's not draining either).

For the different icons, see this: https://qtile-extras.readthedocs.io/en/stable/manual/ref/widgets.html#upowerwidget.  It's not full/half/quarter charge explicitly, but you could set the "low" and "critical" settings to be whatever. Or you can modify the code pretty easily to suite you.

For the systray, I don't think you can have more than one systray open. Not sure where the limitation is for that though; I have a feeling it might be something inherent to the systray system itself.

el Paraguayo

unread,
Nov 29, 2022, 5:11:49 PM11/29/22
to qtil...@googlegroups.com
System tray is hardcoded to only allow one instance so you can't have it on multiple screens.

You could try using StatusNotifier instead but note that it's not a drop-in replacement. Not every so that works with system tray will also implement a compatible icon for that widget.

--
You received this message because you are subscribed to the Google Groups "qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtile-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/fc41447f-254f-4c11-954e-6f28b57a79c2n%40googlegroups.com.

Eduardo Queiroz

unread,
Dec 1, 2022, 4:03:36 PM12/1/22
to qtile-dev
but for me that's normally what shows up when the battery is fully charged, but is plugged in
    For this one I noticed I missed the full_char. Unfortunately, it hasn't worked so I still see the question mark. I wonder if there is something related with the state of my battery because it never reaches 100%. I will stick with this tough and if I get really bothered by that I will change to a static icon.

System tray is hardcoded to only allow one instance so you can't have it on multiple screens
     I think I misunderstood the docs, because it says it doesn't allow creating more than one systray and somehow I thought appending my widgets to the screens it would append the same one. Nothing that an if statement can't correct.

About the volume widget, is that ok if I bring this up on the github page?

Thanks


Reply all
Reply to author
Forward
0 new messages