Battery icon on qtile panel is not appearing when running from battery

Highly respected community,

I recently switched from Garuda Dragonized to Garuda Qtile flavor. Everything works fine so far, except battery indication, which is crucial to me as I'm mainly using laptop for work. I started investigating the issue and bumped into the commented config, related to battery in qtile config.py:

#albattery.BatteryIcon(
               #          padding=0,
               #          scale=0.7,
               #          y_poss=2,
               #          theme_path=home + "/.config/qtile/icons/battery_icons_horiz",
               #          update_interval = 5,
               #          foreground = colors[5],
               #          background = colors[9]
               #          ),
               # widget.Battery(
               #          font="Noto Sans",
               #          update_interval = 10,
               #          fontsize = 12,
               #          foreground = colors[5],
               #          background = colors[9],
               #          ),

but when I tried uncommenting mantioned lines, Qtile errored due to missing albattery python import.

Then I discovered that Qtile istallation uses cbatticon by default to show battery charge and mentioned config is not required. The thing that confuses me most in this situation, icon is correctly shown when laptop has battery fully charged and plugged into power. In all other situations(not fully charged or discharging), place for battery icon is dedicated on Qtile panel, but icon itself is not visible.

Will be very grateful for any help

Executive cbatticon in terminal and see what's the error message.

1 Like

@RohitSingh thanks for the advice.

Sorry for forgetting to mention that I tried that before creating this post. No errors, generated by the cbatticon, only a GTK warning:

(cbatticon:4087): Gtk-WARNING **: 18:42:39.829: Theme parsing error: gtk.css:6342:10: 'height' is not a valid property name

Edit gtk.css line 6342 IIRC it must be 'min-height'.
If you like :slight_smile:

Thanks for the advice.

Replaced height with min-height. No more messages being generated when I launch cbatticon, but still no difference.

As far as I recall, I had some issues with battery indicator on i3, while using i3status, but that was because of battery option in the i3status config, pointed to the wrong battery controller device inside /dev directory. Does cbatticon has such option? I do not quite understand, from where this application is being called. I tried searching for it in Qtile config.py file, but there were no results found for cbatticon keyword

Sorry, IDK nothing about Qtile :wink:
And for i3 i use PC no laptop, so I can't help :frowning:

1 Like

No problem!

Thanks for help :wink: At least I have no more GTK warnings :joy:

2 Likes

You can try installing cbatticon-git, if it not help cbatticon is a third party application (separate from qtile) you can open issue at GitHub - valr/cbatticon: A lightweight and fast battery icon that sits in your system tray

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.