You are not logged in.
On a recently-upgraded Debian Bullseye VM (with the current Lithium BL packages) most things seem to be working OK, except xfce4-power-manager has no proper icon in tint2's system tray - just a generic "not found" sort of thing. This seems true with other icon themes (I tried Adwaita and Faenza) so it's not coming from our tweaked icon set.
Systray on bottom-right, third icon from left:
Current apt sources are:
deb https://deb.debian.org/debian bullseye main non-free contrib
deb https://kelaino.bunsenlabs.org/~johnraff/debian beryllium main
deb https://pkg.bunsenlabs.org/debian lithium main
(The kelaino repo will hold the migrated Beryllium packages, but right now only bunsen-common.)
upower -d on the VM:
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: no
updated: Wed 03 Feb 2021 13:13:51 JST (2982 seconds ago)
has history: no
has statistics: no
unknown
warning-level: none
icon-name: 'battery-missing-symbolic'
Daemon:
daemon-version: 0.99.11
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: HybridSleep
Found this xfce issue, but no fix (the dev seems less interested in supporting generic systray icons than in the xfce4 panel plugin):
https://gitlab.xfce.org/xfce/xfce4-powe … issues/104
strace xfce4-power-manager 2>&1 | grep 'open.*/usr/share/icons' (last 3 lines):
openat(AT_FDCWD, "/usr/share/icons/Papirus-Dark/48x48/status/ac-adapter.svg", O_RDONLY) = 14
openat(AT_FDCWD, "/usr/share/icons/Papirus-Dark/16x16/actions/image-missing.svg", O_RDONLY) = 14
openat(AT_FDCWD, "/usr/share/icons/Papirus-Dark/24x24/status/image-missing.svg", O_RDONLY) = 14
It seems to be displaying the image-missing icon.
Any input appreciated!
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
I noticed this on a BL system that has been upgraded to Sid and as the system is a desktop not a laptop there's no battery, except for my connected bluetooth mouse's battery.
On Buster/Lithium the empty/missing battery icon is correctly shown. Maybe add such an icon to the BL icon set for all the themes that are shipped with BL for beryllium?
Last edited by DeepDayze (2021-02-03 17:02:13)
Real Men Use Linux
Offline
FWIW if you are using xfce4 4.16 the power icon is black for most themes and does not work like it did before....
Pax vobiscum,
Mark Rabideau - https://many-roads.com https:/eirenicon.org
i3wm, dwm, hlwm on sid/ arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
Offline
The error occurs with the new Xfce4 v4.16 that is shipping with bullseye if I'm not mistaken.
As it appears, xfce4-power-manager only displays the correct battery icon in the systray when 'Papirus' is set as default icon theme.
And even then, it doesn't show correctly, i.e. not adhering to light/dark icon theme settings.
see below scrot snip showing a black battery icon, in spite of 'Papirus-Dark' theme is selected.
On this MX Fluxbox system, I have a battery executor as a workaround to show battery depletion/charging levels (also shown in the scrot in white - as it should be)
EDIT: @manyroads meantime already posted a similar reply.....
Last edited by ceeslans (2021-02-03 18:21:52)
Offline
The error occurs with the new Xfce4 v4.16 that is shipping with bullseye if I'm not mistaken.
As it appears, xfce4-power-manager only displays the correct battery icon in the systray when 'Papirus' is set as default icon theme.
And even then, it doesn't show correctly, i.e. not adhering to light/dark icon theme settings.
see below scrot snip showing a black battery icon, in spite of 'Papirus-Dark' theme is selected.https://i.imgur.com/Orq8E2T.png
On this MX Fluxbox system, I have a battery executor as a workaround to show battery depletion/charging levels (also shown in the scrot in white - as it should be)EDIT: @manyroads meantime already posted a similar reply.....
Then maybe a tint2 executor would be a good workaround to correct this "bug". Perhaps share your executor setup for this?
Real Men Use Linux
Offline
Then maybe a tint2 executor would be a good workaround to correct this "bug". Perhaps share your executor setup for this?
Here you go.
You can either set the icon path to the 'Papirus' panel icons in /usr/share/icons - or to the icon folder in ~/.config/tint2 (grab the archive in below link).
The script is set to the commonly used BAT0 levels. If so needed, change the path to BAT1.
~/.config/tint2/executors/battery
#!/bin/bash
iconpath="/usr/share/icons/Papirus-Dark/24x24/panel/"
#iconpath="$HOME/.config/tint2/executors/icons/battery/"
status=$(cat /sys/class/power_supply/BAT0/status)
perc=$(cat /sys/class/power_supply/BAT0/capacity)
if [[ $status = "Discharging" ]]; then
if [[ $perc -ge 91 ]]; then
echo "${iconpath}battery-full.svg"
echo "$perc%"
elif [[ $perc -ge 71 ]]; then
echo "${iconpath}battery-good.svg"
echo "$perc%"
elif [[ $perc -ge 51 ]]; then
echo "${iconpath}battery-medium.svg"
echo "$perc%"
elif [[ $perc -ge 31 ]]; then
echo "${iconpath}battery-low.svg"
echo "$perc%"
elif [[ $perc -ge 16 ]]; then
echo "${iconpath}battery-caution.svg"
echo "$perc%"
elif [[ $perc -ge 1 ]]; then
echo "${iconpath}battery-empty.svg"
echo "$perc%"
fi
elif [[ $status = "Charging" ]]; then
if [[ $perc -ge 90 ]]; then
echo "${iconpath}battery-full-charging.svg"
echo "$perc%"
elif [[ $perc -ge 70 ]]; then
echo "${iconpath}battery-good-charging.svg"
echo "$perc%"
elif [[ $perc -ge 50 ]]; then
echo "${iconpath}battery-medium-charging.svg"
echo "$perc%"
elif [[ $perc -ge 30 ]]; then
echo "${iconpath}battery-low-charging.svg"
echo "$perc%"
elif [[ $perc -ge 15 ]]; then
echo "${iconpath}battery-caution-charging.svg"
echo "$perc%"
elif [[ $perc -ge 1 ]]; then
echo "${iconpath}battery-empty-charging.svg"
echo "$perc%"
fi
else
echo "${iconpath}battery-full-charged.svg"
echo "$perc%"
fi
tint2rc configuration for the battery executor (adept to your personal preferences)
#-------------------------------------
# Executor (battery status)
execp = new
execp_command = ~/.config/tint2/executors/battery
execp_interval = 15
execp_has_icon = 1
execp_cache_icon = 0
execp_continuous = 0
execp_markup = 1
execp_tooltip =
execp_lclick_command = b=$(acpi -b) && notify-send "$b"
execp_rclick_command = xfce4-power-manager -c
execp_mclick_command =
execp_uwheel_command =
execp_dwheel_command =
execp_font = Noto Sans 8
execp_font_color = #eeeeee 100
execp_padding = 3 0 2
execp_background_id = 0
execp_centered = 0
execp_icon_w = 24
execp_icon_h = 24
here is the archive with the Papirus *.svg icons as called by the executor script.
~
Offline
Just wanted to say thank you for sharing this ^ Really good stuff.
Offline
Just wanted to say thank you for sharing this ^ Really good stuff.
Ditto, thanks @ceeslans!
Real Men Use Linux
Offline
What does this executor display on a desktop machine with no battery? (Save me having to set it up to test...)
---
Without it, even with the Papirus icon theme, I get the generic "image-missing" (second icon):
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
As it appears, xfce4-power-manager only displays the correct battery icon in the systray when 'Papirus' is set as default icon theme.
And even then, it doesn't show correctly, i.e. not adhering to light/dark icon theme settings.
This is my experience on two laptops, Manjaro and Archlinux.
So afaiu, xfce4-power-manager changed icon names, resulting in this mess because icon theme developers haven't caught up yet?
In that case a temporary icon theme that contains the correct icons & inherits whatever the usual icon theme should be - should be a simpler solution?
In any case, watch these issues for development:
https://gitlab.xfce.org/xfce/xfce4-powe … issues/104
https://github.com/PapirusDevelopmentTe … ssues/2484
Offline
Battery/laptop and AC/desktop are two different situations, though neither is working.
As I posted above, 'upower -d' suggests that it wants to display 'battery-missing-symbolic', same as one poster on the Papirus issue. That's on a VM with of course no battery - up to now it's displayed the same AC power icon I get on this Debian Buster desktop machine.
The strace output seems to imply it's passing over ac-adapter.svg and choosing image-missing.svg
I don't see what new icons a theme would have to provide to get this working. If we had some names that work it wouldn't be hard to add them to our tweaked icon theme.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Similar executor setup could be made, but not using icons, but some sort of textual representations, maybe even symbols from some nerd font (in a way that doesn't visually clash with user selected icons). The more interesting questions are:
a. Is xfce4-power-manager really worth the trouble? (Is this thing in everyday use by people?), I don't recall ever using it. < edit: Actually it doesn't matter, independent display is still a worthy cause.
b. Only if a is true, is there a recipe for a continuous version of this executor, maybe based on
upower -m
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[11:13:12.931] device changed: /org/freedesktop/UPower/devices/battery_BAT0
Edit: quick test, proof of concept
#!/bin/bash
# printBatteryCont
# 'continuously' print machine power state for tint2
# license: WTFPL – Do What the **** You Want to Public License
# main
(upower -m) |
while read
do
num="$(upower -d | grep percentage | head -1 | tr -dc '0-9')"
echo "${num}%"
done
Edit2: Actually, why not just use tint2 battery thing?
https://gitlab.com/o9000/tint2/blob/mas … md#battery
Last edited by brontosaurusrex (2021-02-04 12:54:34)
Online
What does this executor display on a desktop machine with no battery? (Save me having to set it up to test...)
---
Without it, even with the Papirus icon theme, I get the generic "image-missing" (second icon):
https://imgur.com/y4GgAzFl.png
Yes I get that too...just tested the executor last night on the desktop that has Sid on it. Something seems to be indeed off with the icon names. A good representation of no-battery icon would be the either the AC icon or a battery with a large X through it as generally desktops are always on AC.
On a laptop with no battery or a totally dud one, then the AC bolt on empty battery should be shown.
Last edited by DeepDayze (2021-02-04 14:40:14)
Real Men Use Linux
Offline
johnraff wrote:What does this executor display on a desktop machine with no battery? (Save me having to set it up to test...)
---
Without it, even with the Papirus icon theme, I get the generic "image-missing" (second icon):
https://imgur.com/y4GgAzFl.pngYes I get that too...just tested the executor last night on the desktop that has Sid on it. Something seems to be indeed off with the icon names. A good representation of no-battery icon would be the either the AC icon or a battery with a large X through it as generally desktops are always on AC.
On a laptop with no battery or a totally dud one, then the AC bolt on empty battery should be shown.
Seems like there is always something that has to be further worked out eh?
Would it be possible to have two tint2 scripts (one with & one without), calling the correct one based on whether a battery is present or not?
or to just ignore the executor?
This would save from having any icon at all if not on battery.
Edit2: Actually, why not just use tint2 battery thing?
https://gitlab.com/o9000/tint2/blob/mas … md#battery
This works fine as well, but for myself,I could never get an icon to work, just text. so:
"BAT %45" would be the best I could do. If someone works out the icon bit, this could work well I think.
Last edited by sleekmason (2021-02-04 15:09:34)
Offline
Turns out that even plebeian fonts like Cuprum have battery symbols embedded, which is nice for our evil plan (And fonts in tint are colored as well fonts).
So slightly expanded continuous example
https://raw.githubusercontent.com/bront … atteryCont
gives
Symbol should turn into rocket when battery is >80% charged.
What is missing: states (perhaps 'charging' and 'AC' are just enough info < that must go into tooltip imho)
And added states as tooltip.
Where tint2rc executor is
#-------------------------------------
# printBatteryCont
execp = new
execp_centered = 1
execp_has_icon = 0
execp_command = printBatteryCont
execp_continuous = 1
execp_font = cuprum 21
execp_font_color = #111111 100
execp_padding = 0 0 0
#execp_tooltip =
execp_mclick_command = xfce4-power-manager-settings
p.s. Design-wise, more interesting version of this could use images (as in ceeslans example), where bunsen logo would be painted in a way to tell the levels. Perhaps reusing tint2 start button....
Last edited by brontosaurusrex (2021-02-04 20:04:34)
Online
Turns out that even plebeian fonts like Cuprum have battery symbols embedded, which is nice for our evil plan (And fonts in tint are colored as well fonts).
So slightly expanded continuous example
https://raw.githubusercontent.com/bront … atteryCont
gives
https://images.weserv.nl/?url=https://i.imgur.com/D7NhlwWb.png
Symbol should turn into rocket when battery is >80% charged.What is missing: states (perhaps 'charging' and 'AC' are just enough info < that must go into tooltip imho)
And added states as tooltip.
https://images.weserv.nl/?url=https://i.imgur.com/qDTXTA5b.png
Where tint2rc executor is#------------------------------------- # printBatteryCont execp = new execp_centered = 1 execp_has_icon = 0 execp_command = printBatteryCont execp_continuous = 1 execp_font = cuprum 21 execp_font_color = #111111 100 execp_padding = 0 0 0 #execp_tooltip = execp_mclick_command = xfce4-power-manager-settings
p.s. Design-wise, more interesting version of this could use images (as in ceeslans example), where bunsen logo would be painted in a way to tell the levels. Perhaps reusing tint2 start button....
Now that be a cool effect!
Real Men Use Linux
Offline
I think so, that would also cover:
Would it be possible to have two tint2 scripts (one with & one without), calling the correct one based on whether a battery is present or not?
or to just ignore the executor?
This would save from having any icon at all if not on battery.
So in case of 'not a laptop' the icon does its primary menu duty, else it paints accordingly to charged state (maybe rotate even) AND does its primary menu duty.
Last edited by brontosaurusrex (2021-02-04 20:33:32)
Online
One small issue with the Cuprum fonts - Cuprum is part of the texlive-fonts-extra (432MB)
Is there another that can be used solo that is lightweight?
Edit* Or I guess just those fonts copied . . nevermind.
Last edited by sleekmason (2021-02-04 20:50:03)
Offline
I think so, that would also cover:
sleekmason wrote:Would it be possible to have two tint2 scripts (one with & one without), calling the correct one based on whether a battery is present or not?
or to just ignore the executor?
This would save from having any icon at all if not on battery.So in case of 'not a laptop' the icon does its primary menu duty, else it paints accordingly to charged state (maybe rotate even) AND does its primary menu duty.
In the case of not a laptop then the AC icon (same one shown when a laptop is on AC and full battery) should be displayed in the tray by default. Of course the menu options applicable should also be accessible.
Last edited by DeepDayze (2021-02-04 20:48:45)
Real Men Use Linux
Offline
One small issue with the Cuprum fonts - Cuprum is part of the texlive-fonts-extra (432MB)
Is there another that can be used solo that is lightweight?Edit* Or I guess just those fonts copied . . nevermind.
Actually I'm not sure how this special chars are handled (after some more testing), since this seems to work with any font I choose. Perhaps I have some magic font installed which is inherited from any font...
Online