Battery level on desktop but not system tray

not for gnome v46, only up to v42. i don’t know if it will work for 46. i also looked thru all the gnome extensions and there are currently nothing listed like this 1, their all for the system tray.

would this display on the desktop or just a simple notification banner?

It’s a notification via notify-send. Every fifteen minutes it lets you know where you stand. If your battery gets below 15% or above 90% it warns you rather noisily via espeak-ng. (Those are user-configurable by editing the script.)

Using notify-send overcomes your problem with being able to see it You can configure those notifications to use any font, font size, and color you wish.

I hacked this thing together because I use i3 window manager and had never bothered to set something up. My laptop shut down in the middle of something, no warning. I decided that was unacceptable but, like you, couldn’t find anything that suited me. Initially it was just “high” and “low” warnings, but I thought, what the hell, while I’m in here I may as well make it interesting.

Future plans are to reduce the calls to upower to one (not sure how to do that yet, but there’s bound to be a way) and switch from time-based checking to percentage-based, i.e., let me know at 20%, 25%, 30%, etc., instead of every 15 minutes. I think it’d be cooler, and I could set better icons. My problem is that it works as it is.

i’ll try this for a bit. i hope it works like you say.

1 Like

I did essentially a full rewrite recently and I like it better. One call to upower rather than four. I was also grep-ing into awk, which was silly, and I fixed that.

This topic was automatically closed after 30 days. New replies are no longer allowed.