Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-11-13 00:53:50

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
LinuxFirefox 132.0

Battery Monitor - xfce4-battery-plugin - How to change label text ?

Is there a way to change the label text 'Battery' ?

I've found ~/.conf/xfce4/battery-18.rc  but there seems to be no option to localize the label text.

Offline

#2 2024-11-13 11:09:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,481
LinuxFirefox 132.0

Re: Battery Monitor - xfce4-battery-plugin - How to change label text ?

Unfortunately, the option doesn't exist to change the label. Here are two potential alternatives:

  1. Using gtk css:
    First create an image file called battery.png with the label text you want and dump it into your home directory. Then add the following to ~/.config/gtk-3.0.gtk.css:

    #battery-14>box>label {color: transparent; background-image: url("tony.png"); background-repeat: no-repeat;}

    ...and adjust the "#14" to match the widget ID of your battery plugin.

  2. Using Genmon:
    Add the xfce4-genmon plugin to the panel right where you want the text to display. Hide the label display in the batter plugin. Configure the xfce4-genmon-plugin to display the label you want:

    echo "MyLabel"

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2024-11-13 12:36:34

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
Windows 10Firefox 130.0

Re: Battery Monitor - xfce4-battery-plugin - How to change label text ?

Hmm, I guess I go with option three and change it in the source code and recompile it ...  ;-)

battmon->label = (GtkLabel *)gtk_label_new(_("Battery"));

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 524.76 KiB (Peak: 530.4 KiB) ]