Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-02-17 08:42:59

paolo321
Member
Registered: 2011-06-26
Posts: 121

timer plugin on xubuntu: same color for bar and panel

On xubuntu with default elementary dark theme , timer plugin is almost unusable since the bar has the same color of the panel , and it's really difficult to see it.
I cannot find a way to specify a different color for the bar...

Ideally, I would like it to be of the same "almost white" of the various tray icons

Offline

#2 2020-06-05 05:10:33

JayM
Member
Registered: 2020-01-08
Posts: 14

Re: timer plugin on xubuntu: same color for bar and panel

Apologies for necroposting but I have the same question. In many dark themes the bar icon for xfce4-timer-plugin when it's idle is black which is hard to see against a dark panel. For instance, in Arc Dark:
xfce4-timer-plugin.png
(It's between Show Desktop's icon and my Orage clock. My panel is completely transparent and I use a dark grey and red wallpaper.)

Since the icon is different colors and widths depending on which theme is selected in Settings -> Appearance I suspect that the app's colors could be overridden in (probably) the user's ~/.gtk2/gtkrc or (possibly) ~/.config/gtk-3.0/gtk.css but I have no idea how to go about even trying to tweak it there, especially for GTK2. A websearch turned up nothing useful and looking at the existing contents of .gtk2/gtkrc

style "myclock" {
fg[NORMAL] = "#ffffff"
}
class "XfceXfceClockAnalog" style "myclock"

indicates I'd have to know the plugin's class which I don't.

Specifically I'd like to know:

1. Does this plugin use GTK2 or GTK3 styling?
If GTK2,
2. What's its class? "XfceXfce4TimerPlugin"?
3. I'm guessing that fg[NORMAL] would change the color of the bar when the timer's inactive. What would the setting be to change its color when an alarm is active, fg[ACTIVE]?
If GTK3, I've tried adding

.xfce4-timer-plugin {
background-color: gray;
color: red;
}

to my .config/gtk3.0/gtk.css file, logged out and in with no changes.

I've looked at the GTK+ CSS Overview website but still can't figure out how to style this particular plugin. Can someone whack me with their clue stick and help me to get started? Thanks. smile

Edit: I'm using Xfce 4.14.2 in MX Linux 19.2 64-bit, GTK version 3.2.0-4. The plugin version is 1.7.0-1.

Last edited by JayM (2020-06-05 07:22:48)

Offline

#3 2020-06-05 10:16:20

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: timer plugin on xubuntu: same color for bar and panel

And I would like to see a Help file for this app, since the GUI is not particularly user-friendly. I may write one and send it up, though I'm not sure the Devs would want to add a button.


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#4 2020-06-05 10:52:52

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: timer plugin on xubuntu: same color for bar and panel

With 4.14, it would be the GTK3 version of the plugin. There is no class name defined for this plugin, so to access it you need to either use its widget name (something like #xfce4-timer-plugin-2 - you can find this name by hovering over it's widget on the  Panel Properties >Items tab) or you can aim at all progress bars in the panel (using .xfce4-panel as the base class name - note that this will affect all progress bars, but if this is the only one you have, you'll be fine).

You can change the colours of the trough (the background part of the progress bar that doesn't change) or the progress (the part that constantly changes based on the value). Here are some examples of snippets to put into ~/.config/gtk-3.0/gtk.css:

#xfce4-timer-plugin-2 progress { background-color: red; }
#xfce4-timer-plugin-2 trough { background-color: blue; border-color: blue}  
.xfce4-panel progress { background-color: red; }
.xfce4-panel trough { background-color: blue; border-color: blue}  

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

#5 2020-06-05 12:06:59

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: timer plugin on xubuntu: same color for bar and panel

Great stuff, ToZ! I too use a dark theme and now can actually see something.

I will send up a Help file and see if it flies.


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#6 2020-06-05 12:15:26

JayM
Member
Registered: 2020-01-08
Posts: 14

Re: timer plugin on xubuntu: same color for bar and panel

Thank you, oh Wizard of ToZ. big_smile That did the trick.

On my system the plugin's internal name is xfce4-timer-plugin-42 so this snippet of css set the colors to not only be easily visible but match my preferred dark grey and red theme, shades-of-gray-Firebrick thatI got from gnome-look.org:

#xfce4-timer-plugin-42 progress { 
	background-color: silver; 
}

#xfce4-timer-plugin-42 trough { 
	background-color: red; 
} 

so now it looks like this:
xfce4-timer-plugin-fixed.png
And now I know how to do this for other plugins too!

Last edited by JayM (2020-06-05 12:16:51)

Offline

#7 2020-06-06 09:55:36

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: timer plugin on xubuntu: same color for bar and panel

BTW: I wish this would get some work:

--the GUI is not well organized for the average user
--the icon is invisible against a dark theme
--there is no file search icon next to the command box, forcing the user to go look elsewhere for a sound file, copy its location, and come back to paste it in
--there is no default alarm sound set up to make it possible to use OOTB
--and, of course, there is no help file [WRONG!]
--I still can't get it to function correctly

EDIT: there is a help file, just no button to launch it from where the user is looking: https://docs.xfce.org/panel-plugins/xfce4-timer-plugin. That requires that the user be online unless it is also somewhere onboard
EDIT 2: freedesktop has a sound file that could be made available by default: /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga. Not sure if that sound collection is normally available to the user by default, but the file could be installed with the app and the command box could be populated with "play [not everybody knows what to put] path-to-alarm-clock-elapsed.oga"

I know, I know: make an enhancement request...

Last edited by Jerry3904 (2020-06-06 10:41:21)


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#8 2020-06-07 19:14:23

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: timer plugin on xubuntu: same color for bar and panel

Still futzing around with this. I finally got a sound to work with this command:

play /usr/share/sounds/freedesktop/stereo/complete.oga

The alarm-clock-elapsed.oga just produced static.

Last edited by Jerry3904 (2020-06-07 19:14:41)


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#9 2020-06-07 20:32:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: timer plugin on xubuntu: same color for bar and panel

If you have event sounds enabled and libcanberra installed, you can also:

canberra-gtk-play -i complete

The "-i" indicates a freesdesktop sound theme supported sound file (found in /usr/share/sounds/SOUNDTHEME/stereo - or defaulting to /usr/share/sounds/freedesktop/stereo if the file is not found in the specificed theme). Uses the same method as sound themes to generate the sound and will change as you change the sound theme.

canberra-gtk-play -i alarm-clock-elapsed

...worked here for me using this method..


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

#10 2020-06-08 09:29:00

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: timer plugin on xubuntu: same color for bar and panel

HEY: I submitted a revision of the Help file, and now it's up already! It includes ToZ's trick (scroll down):

https://docs.xfce.org/panel-plugins/xfce4-timer-plugin

Nice to be able to help once in a while...

Last edited by Jerry3904 (2020-06-08 09:29:37)


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#11 2020-06-08 10:38:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: timer plugin on xubuntu: same color for bar and panel

Jerry3904 wrote:

HEY: I submitted a revision of the Help file, and now it's up already! It includes ToZ's trick (scroll down):

https://docs.xfce.org/panel-plugins/xfce4-timer-plugin

Nice to be able to help once in a while...

Thank you for helping Jerry - much appreciated.


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

#12 2020-06-09 06:07:22

vinox14
Member
Registered: 2020-05-25
Posts: 14

Re: timer plugin on xubuntu: same color for bar and panel

Was puzzled that both play and caberra-gtk-play command wasn't working. I am on Debian 10 and was not aware that - sox or gnome-session-canberra is not installed by default, so installing either will make it work.

Offline

Board footer

Powered by FluxBB