I’ve tried looking online and in this forum but the only thing I could find was a script in the Mint forum, which being based on different distros could cause problems since I don’t have much knowledge on Mint.
under Settings → System → Greeter settings (it’s some longer name) → thePanel Tab
is an item called “Power”
the Battery icon (along with percentage when you hover over it) will be shown
when the system is actually disconnected from mains power and runs only on battery
Then why would you look for a script on the forum of a Debian based OS like Mint at all?
To have this on the login screen, the suggestion by @Nachlese is likely the best approach. The only other possibilities I’m aware of depend upon being logged in to the OS.
I need to correct myself.
Manjaro Xfce4 uses the lightdm-gtk-greeter - and I just assumed that the “power” item was “it”.
Not true - and I can’t even really test it because that is a VM with, of course, no battery even present or defined.
My real machine is Linux Mint, which uses the slick greeter - and there you can actually select the battery indicator to be shown or hidden.
The option in the config file /etc/lightdm/lightdm-gtk-greeter.conf
(where the greeter section is)
should be:
[Greeter]
...
...
show-power=true
or: show-power=false
respectively
Use an editor and add it,
if there is no graphical way to configure it - I can’t test it for my VM does not even have a battery.
No, I didn’t. Perhaps a slight misunderstanding here.
But I didn’t realize at first that this was not what I was dealing with - the gtk-greeter is installed by default in my Manjaro Xfce.
Of course it can be installed - the greeters can be changed.
That is perhaps not necessary though - I simply cannot test whether the battery indicator can be switched on/off the same way in both the slick-greeter and the gtk-greeter, because there is no battery available in my VM.
It was just what appeared in my searches and thought it might of been a universal solution rather than specifically for Mint, also it could of provided a hint for a solution.
Unfortunately this doesn’t appear to work.
Thanks for the input everyone
I’m thinking for the time being using command-line utilities.