You are not logged in.

#1 2009-08-11 18:24:10

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

[solved] Using xprop to set a property

xprop(1) has a "-set" option. I can't figure out how to use it. The "surf" browser is scriptable by setting a property named "_SURF_URL" to the URL you want it to load. I've tried these:

$ xprop -id 14680096 -set _SURF_URL http://www.google.com
xprop: error: unsupported conversion for _SURF_URL

$ xprop -id 14680096 -f _SURF_URL STRING -set _SURF_URL http://www.google.com
xprop: error: Bad format: STRING.

(The "id" is the one printed by "surf -x", and is correct, since I can use it to read properties.)

How do I use this?

Last edited by ataraxia (2009-08-12 14:55:01)

Offline

#2 2009-08-11 18:43:13

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: [solved] Using xprop to set a property

The -f option isn't that straightforward... see the description of 'format' and 'dformat' in xprop(1).
This should work:

xprop -id 14680096 -f _SURF_URL 8s -set _SURF_URL http://www.google.com

Offline

#3 2009-08-11 19:06:11

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [solved] Using xprop to set a property

Thanks, that does work. It's interesting that xprop displays a string as "STRING" but won't accept such an alias for inputting it. You'd think after all these years I'd have the "basics" down, but I guess there's always something else to learn...

Offline

Board footer

Powered by FluxBB