Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-10-12 19:56:43

jharms
Member
Registered: 2016-10-12
Posts: 11

[Solved] Using xfconf-query to define the panel background property

I am new to Xfce, just migrated from KDE (trying to maintain the look of my desktop). Full success, I like Xfce very much - uncomparibly more mature and stable than plasma (and I got my cherished "drawer" function - pullup menu) back that somewhere between KDE 4.3 and 4.5 stopped working).

Since I quite frequently (re-)install systems, I needed a script for automatically generating the desktop environment. This is now about accomplished, essentially wrapping into a perl script calls to xfconf-query (getting much inspiration from https://forum.xfce.org/viewtopic.php?id=8619), but also including calls to dconf since I use gnome-terminal and need to import profiles.

I have one unresolved problem, where I would very much appreciate to get help from this forum: I did not find a solution how to create color properties; I will illustrate my problem using the panel background property as an example - but the same difficulty arrives where I want to create+set the. desktop background.

I had understood that, starting with a default background (background property not explicitly defined), and wanting to set the panel background to green, I should use

xfconf-query -c xfce4-panel -p /panels/panel-1/background-color -t int -s 0 -t int -s 65535 -t int -s 0 -t int -s 65535 --create

but did not manage to make this work: this command switches the panel background from its default (light gray) to black. Looking at the array so defined by

xfconf-query -c xfce4-panel -p /panels/panel-1/background-color

I obtain the 4-item array with the values I thought to have defined as a result of my command ( 0 65535 0 65535). Using the xfce4-settings editor, again the  displayed color-values are the ones I had introduced. However, using xfce4-settings-manager (panel-tab -> appearance -> color), the manager effectivly shows the black color as it is displayed as the panel background.

Doing the same exercise, but starting from a panel that already has an explicitly defined background property,

xfconf-query -c xfce4-panel -p /panels/panel-1/background-color -s 0 -s 65535 -s 0 -s 65535

works like a charm and does what I expect it to do.

Googling was no help (I neither found a reference to this issue, nor an example with code where xfconf-query is used to create a color).

My environment: Mageia (6) cauldron with xfce4 4.12 (intending to also replace KDE4 on my production Mageia-5 systems)

Last edited by jharms (2016-10-13 20:27:15)

Offline

#2 2016-10-12 20:46:37

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

Re: [Solved] Using xfconf-query to define the panel background property

xfconf-query -c xfce4-panel -p /panels/panel-1/background-color -t int -s 0 -t int -s 65535 -t int -s 0 -t int -s 65535 --create

The values required for that key are unsigned ints or "uint".

xfconf-query -c xfce4-panel -p /panels/panel-1/background-color -t uint -s 0 -t uint -s 65535 -t uint -s 0 -t uint -s 65535 --create

If your not already doing it, it would be a good idea to first create and set the background style to "Solid Color"

xfconf-query -c xfce4-panel -p /panels/panel-1/background-style --create -t int -s 1

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 2016-10-13 20:26:23

jharms
Member
Registered: 2016-10-12
Posts: 11

Re: [Solved] Using xfconf-query to define the panel background property

Many thanks - using type uint makes my problem go away. In fact, I had suspected that the difficulty could be due to a problem of the type, but did not find sufficient evidence with my googling exercises.

Suggestion: is it possible to update https://forum.xfce.org/viewtopic.php?id=8619 (comment 12) correspondingly? That is a quite recent reference and will probably be frequently consulted. That would not only be helpful, but might also prevent error propagation.

Offline

#4 2016-10-14 13:28:07

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: [Solved] Using xfconf-query to define the panel background property

jharms wrote:

Suggestion: is it possible to update https://forum.xfce.org/viewtopic.php?id=8619 (comment 12) correspondingly? That is a quite recent reference and will probably be frequently consulted. That would not only be helpful, but might also prevent error propagation.

Done: Added 'uint', 'int64', 'uint64', and 'double' to the list of supported types.
Also included a paragraph about decimal, hexadecimal, and octal notation of integer values.

Offline

#5 2018-12-10 16:39:30

jharms
Member
Registered: 2016-10-12
Posts: 11

Re: [Solved] Using xfconf-query to define the panel background property

Picking up an old thread rather than creating a new one on precisely the same issue:

The info presented above is not valid any more with xfce 4.13 - there has recently been a fundamental modification. Testing Mageia 7 (which comes with xfce 4.13) I realize that defining colors has been modified with respect to xfce 4.12

- in 4.12 colors were defined as triplets of 3 integer values plus a trailing integer value for transparency

- in 4.13 these values are floating values (6 digits after the point)

- in consequencem scripts using xfconf-query to automatically set up an xfce desktop dont work any more  -  and, a quick fix is not possible because it is not clear as what types the floating values need to be specified

- after an upgrade to 4.13, the desktop setup needs to be manually corrected - a pity

Question: how to specify the quadruplet that specifies this new color representation - what is the -t <type> clause to be provided?'

Illustration: panel background colour

xfconf-query -c xfce4-panel -p /panels/panel-1/background-color   (4.12)
Value is an array with 4 items:

51400
59624
55512
51400

xfconf-query -c xfce4-panel -p /panels/panel-1/background-rgba  (4.13)
0.784314
0.909804
0.847059
1.000000

For the desktop background, even the path specification has substantially changed:
/backdrop/screen0/monitor0/workspace0/color1 (or color2) in 4.12 becomes
/backdrop/screen0/monitorDP1/workspace0/rgba1 (or rgba2) in 4.13

Offline

#6 2018-12-10 23:40:20

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: [Solved] Using xfconf-query to define the panel background property

jharms wrote:

The info presented above is not valid any more with xfce 4.13 - there has recently been a fundamental modification.

That happens sometimes with development versions of things (4.12 is a "general release" version, as will be 4.14). I assume this is why development versions are designated as such.

Since you have chosen to use this development version of Xfce, please consider subscribing to an Xfce developer email list. You may end up learning that the people responsible for these changes are aware of the ramifications of same and, perhaps, learn why they have happened and what to do about it - or you might learn that the developer isn't aware of same, and have the opportunity to help him/her/them deal with it.

Also consider filing a report at https://bugzilla.xfce.org/ .

And good luck with your issue!

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#7 2018-12-11 03:13:28

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

Re: [Solved] Using xfconf-query to define the panel background property

jharms wrote:

Question: how to specify the quadruplet that specifies this new color representation - what is the -t <type> clause to be provided?'

Use double. For example:

xfconf-query -c xfce4-panel -p /panels/panel-1/background-rgba -t double -s 1.000000 -t double -s 0.000000 -t double -s 0.000000 -t double -s 0.233898

Here is a good reference thread on the xfconf system that another member put together: https://forum.xfce.org/viewtopic.php?pid=43171#p43171


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

#8 2018-12-12 21:02:35

jharms
Member
Registered: 2016-10-12
Posts: 11

Re: [Solved] Using xfconf-query to define the panel background property

@MDM
What did I say to trigger this lecture? - whatever it is: sorry! And, I have not choosen - 4.13 comes as the choice of my distro; as a plain user of that distro I dont think that a developpers ml is the right place for my kind of question.

@TOZ
Thank you, you have put me on the right trail. In fact, guessing, I had tried double, but had not realized that the key has also changed: was background-colour, is now background-rgba, which explains why my guess failed. Everything is OK now.

Offline

#9 2018-12-13 06:59:12

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: [Solved] Using xfconf-query to define the panel background property

Hi jharms,

My post was not meant to be a "lecture," especially not with the connotations that you appear to mean when you use the term (and, in any case, I'd never consider a couple of short paragraphs to amount to a lecture). My post was actually intended to be constructive in nature. Development versions of a thing are meant to be an important step between one release version and the next release version, in which the developers can work on things without having to worry about making them ready for "prime time," so to speak, and with that restriction eased, they can do as their titles signify - that is to say, develop the thing. I thought that your experiences might help the developer(s) working on the portion of the Xfce prodject that you are affected by in that it might give the person some valuable feedback - and, that the direct, two-way communication might also help you. And, of course, that this might help all of the rest of us by allowing the developer(s) to build a better product, which would be reflected in the eventual release version.

I am sorry that you did not understand my post.

It looks like you have solved your issue, and I am glad for you.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

Board footer

Powered by FluxBB