0

I want to start an application (a clock) in x windows and I want to

-- not be focusable
-- not be cyclable
-- not be in window list
-- not be in task list
-- not have a visible frame

In other words, I want only to attach the clock on the desktop and this is all.

It is possible to do this from window menu toggling these parameters but I want to start it from command line, to be able to do it instantaneously.

alinsoar
  • 15,386
  • 4
  • 57
  • 74
  • Skipping window and task list is probably doable with _NET_WM_STATE_SKIP_TASKBAR and _NET_WM_STATE_SKIP_PAGER, functions and decorations are doable with [MWM hints](http://stackoverflow.com/questions/1904445/borderless-windows-on-linux) but there is no standard way to make a window unfocusable. I don't quite see why you would need that though. You probably still want it to be at least movable and closeable from the window menu. – n. m. could be an AI Mar 12 '17 at 11:23
  • I am using sawfish. I toggled those parameters from window menu until it displayed closer of what I wanted to see. If you can post step by step instructions about how to do it from command line I will accept your answer. No problem if you cannot do the focusable flag. – alinsoar Mar 12 '17 at 13:31
  • If you want to write an X11 program that achieves these properties using Xlib or another client library, I can expand on my comments. I have some knowledge of Qt and gtk and some xcb. I have no idea how to configure sawfish and I suspect such questiins are off topic here, even if you are using bash to do the configuration. – n. m. could be an AI Mar 12 '17 at 14:54
  • I think sawfish is not important because the behaviour of an application depends on its communication with Xlib library. It is the window manager that gnome used at the beginning. ok, if you do something and start the `oclock` application as we established I will accept your post. https://linux.die.net/man/1/oclock and here is the picture of the application: http://resinblade.net/pages/linux/x_win.html – alinsoar Mar 12 '17 at 15:19
  • I'm not quite sure what you are trying to do. Do you want to modify oclock code or write a script that will start the unmodified oclock but strip the decorations etc? By the way on my system oclock is already displayed without decorations and in a circle-shaped window (it does appear in the task bar though). – n. m. could be an AI Mar 12 '17 at 16:33
  • In my system I start it with oclock \ -transparent \ -bd red \ -minute yellow \ -hour blue \ -jewel white \ -shape \ -fg white \ -geometry 600x600\ & – alinsoar Mar 12 '17 at 16:44
  • I looks nice but I see its window frame (the upper part of window) where the minimize,max, win-menu buttons lie. This bar disturbs me, I want to have all the time the clock on the wallpaper, but this window decoration disturbs. – alinsoar Mar 12 '17 at 16:46
  • I do not want to modify the code of oclock. I want to `say` to Xlib to hide everything apart from the clock. – alinsoar Mar 12 '17 at 16:47
  • There must be some communication with the X protocol whose default behaviour to be changed from commandline when or after the oclock starts.... – alinsoar Mar 12 '17 at 16:49
  • You can manipulate window properties using the xprop program, but it has its limitations. You can find xsetprop on github which fixes this limitation. There is an example of setting exactly one of the properties you need. For other oroperties, search "extended window manager hints". This does fall under configuration rather than programming in my book. – n. m. could be an AI Mar 12 '17 at 17:04
  • If you do this and explain step by step I will accept your answer. Can you do it and help me install this behaviour from command line? I want to put it in ./xinitrc as I create my own desktop environment and I want oclock to be part of it. – alinsoar Mar 12 '17 at 17:16

1 Answers1

0

For those things the application dose not do them, as some of the comments say. The application does set hints as to what it wants. The window manager, window list etc, will do what ever their policy is: ignore, honour, or a bit of both.

In kde/plasma you can tell set a configuration that does all of this, based on application, and/or window title, and/or some other properties.

Edit: I have just discovered devilspie and a gui configurer for it (gdevilspie). They can do the same as KDE but for what ever Window manager you are running. Should be able to solve your problems. Other X11 control tools are xdotool, and wmctrl.

ctrl-alt-delor
  • 7,506
  • 5
  • 40
  • 52
  • I know these things but my question was, how to control from a program/script these things (to control the behaviour of the window manager -- in my case sawfish), supposing the program itself does not do it alone. – alinsoar Nov 01 '17 at 09:08
  • Just added something that I have just learnt, that would allow you to do it in non KDE. – ctrl-alt-delor Nov 01 '17 at 09:14