Is it possible to set the X11 "type" property (_NET_WM_WINDOW_TYPE) of a dialog box generated by the xmessage
command to "dialog" (which I would have thought would be the default)?
In other words, I want to create a dialog box from the command line and set the _NET_WM_WINDOW_TYPE attribute:
> xmessage "message text" & # (plus relevant xmessage opts)
[1] 25396 # (or similar)
> # command to set _NET_WM_WINDOW_TYPE for this window?
To set a window type:
xprop -id <your-window-ID> \
-f _NET_WM_WINDOW_TYPE 32a \
-set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_DIALOG
I don't know an easy automated way to find out window ID of an xmessage
window. You can do this:
xmessage -xrm <some-dummy-name>:<some-unique-string> <your-other-options>
-xrm
is an old generic X11 resource management option. xmessage
understands it and ignores unknown resources, so you can pass anything you like.
Then you can use xlsclients -l
and use some kind of perl script to search for a window ID that has some-unique-string
in its command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With