Top Latest Append

pterjan's diary


2008-11-13

  Setting a X property using xprop

I have spent quite some time figuring out how to use xprop -set as the man page is not really useful. I had a window with _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL and wanted to set this property to _NET_WM_WINDOW_TYPE_UTILITY.

[pterjan@plop tmp]$ xprop -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_UTILITY                            
xprop: error: unsupported conversion for _NET_WM_WINDOW_TYPE

So I thought that maybe it doesn't know how to resolve to atom:

[pterjan@plop tmp]$ xlsatoms |grep _NET_WM_WINDOW_TYPE_UTILITY
407 _NET_WM_WINDOW_TYPE_UTILITY
[pterjan@plop tmp]$ xprop -set _NET_WM_WINDOW_TYPE 407  
 xprop: error: unsupported conversion for _NET_WM_WINDOW_TYPE

At this point I started looking on google and could only find people asking and no answer...

Then a friend suggested me xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE 407 which sort of worked but the result was _NET_WM_WINDOW_TYPE(ATOM) = 407. So I tried xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_UTILITY and it worked!

So, when setting a property, you have to specify its format. I would have loved to read this in the man page.

Today's TSUKKOMI(Total: 3) [Add a TSUKKOMI]

  Damien Pollet [Seems obvious to me… just like any half-decent language forces you to explicitly specify the static type of variables ..]

  Vincent Untz [For this specific case, an easy solution is: wnckprop --set-window-type=utility]

  Benjamin Sergeant [XChangeProperty is the X11 function for that if you want to write your own tool (fun fun :)]


2008-11-30

  Terrorism

This is actually my second post with this title.

During this Week-End I have read Spook Country by William Gibson and one of the characters says something about terrorism which is so true but people tend to forget:

Are you really so scared of terrorists that you'll dismantle the structures that made America what it is?
[...]
If you are, you let the terrorist win. Because that is exactly, specifically, his goal, his only goal: to frighten you into surrending the rule of law. That's why they call him 'terrorist'. He uses terrifying threats to induce you to degrade your own society.

Today's TSUKKOMI(Total: 1) [Add a TSUKKOMI]

  dave [That's just not true though. It's not the terrorist, but opportunistic politicians that will use any frightening even..]


2004|06|07|08|09|11|
2005|01|02|05|06|07|08|09|10|11|12|
2006|01|02|03|06|08|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|12|
2011|02|04|06|
2012|01|05|11|
2013|01|02|04|06|
2014|02|
2015|06|
2017|05|07|12|