Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-02-19 09:52:59

u_%4x
Member
Registered: 2019-02-19
Posts: 2

Feature Request: changeable colors on Binary Clock plugin

Hi guys,

I'd really like to be able to change the colors of the binary clock plugin.

At the moment the active blocks seem to be hard coded in dark blue and visibility is really bad on dark backgrounds.

I downloaded the source code of
xfce4-panel-4.12.2
and searched through

./plugins/clock/clock-binary.c
and
./plugins/clock/clock-binary.h

but I couldn't find any color values to modify in those files.

Any help would be appreciated.

Offline

#2 2019-02-19 11:49:48

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Feature Request: changeable colors on Binary Clock plugin

Hello and welcome.

You can theme those colours. Put the following snippet into ~/.gtkrc-2.0 (change the colours to suit):

style "my-clock-colors"
{
	bg[NORMAL] = "#00FF00"
	bg[SELECTED] = "#FF0000"
}
widget "*clock*" style "my-clock-colors"

Restart the panel for the change to take effect.


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 2019-02-19 12:00:19

u_%4x
Member
Registered: 2019-02-19
Posts: 2

Re: Feature Request: changeable colors on Binary Clock plugin

ToZ wrote:

Hello and welcome.

You can theme those colours. Put the following snippet into ~/.gtkrc-2.0 (change the colours to suit):

style "my-clock-colors"
{
	bg[NORMAL] = "#00FF00"
	bg[SELECTED] = "#FF0000"
}
widget "*clock*" style "my-clock-colors"

Restart the panel for the change to take effect.

Great, works like a charm!

Thanks a lot! :-)

Offline

#4 2021-06-06 17:05:50

abecirovic3
Member
Registered: 2021-06-06
Posts: 2

Re: Feature Request: changeable colors on Binary Clock plugin

Hello,
I'm not sure if the post is still active  but today I came to the same idea of changing the color of my binary clock, but, as I am new to Linux, I didn't quite get the procedure, what steps do I need to do in order to be able to edit that file?

Offline

#5 2021-06-07 00:57:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Feature Request: changeable colors on Binary Clock plugin

abecirovic3 wrote:

Hello,
I'm not sure if the post is still active  but today I came to the same idea of changing the color of my binary clock, but, as I am new to Linux, I didn't quite get the procedure, what steps do I need to do in order to be able to edit that file?

Hello and welcome.

So that you are aware, that snippet will only work with a GTK2 version of Xfce, so basically anything 4.12 or earlier. To enable the tweak, create (if it doesn't already exist) the file ".gtkrc-2.0" in your home directory. In that file, add the content from above. For it to take effect, you will need to restart the panel or log out and back in again.

If you have a later version of Xfce (4.14 or 4.16) you will need to make the tweak to the file "gtk.css" in the ~/.config/gtk-3.0 folder. The snippet would be:

#clock-button { color: red; background-color: yellow; }

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

#6 2021-06-07 11:22:12

abecirovic3
Member
Registered: 2021-06-06
Posts: 2

Re: Feature Request: changeable colors on Binary Clock plugin

Thank you very much.

Last edited by abecirovic3 (2021-06-07 11:22:26)

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 535.64 KiB (Peak: 536.48 KiB) ]