My graphical environment is FVWM2 on OpenBSD.
How can we display a digital clock in the top right corner of the screen, on top of everything?
So it shouldn't matter if a new window comes up, the clock needs to be always on top.
FVWM2 uses "layers". A window in a higher layer is always drawn over a window in a lower layer. There is also a
StaysOnTop flag which puts a window into the topmost layer (layer 6 by default). Normal windows are in layer 4 by default, and will be drawn beneath layer 6 windows.
My .fvwm2rc file has this entry:
Style "xarclock" Layer 5,NoTitle, Sticky, WindowListSkip,clicktofocus
and when it draws the clock, I can move my other windows around, and they always stay behind the clock.
So it looks like, once you find your preferred clock program, you need to figure out what the correct "style" is, and then say
Style "xarclock" StaysOnTop
Style "xarclock" Layer 5
Put it in the top right corner with the
./xarclock -geometry -1+1
"-1" means "1 pixel from the right-hand edge" and "+1" means "1 pixel from the top"
The fvwm task bar seems to meet your requirements for a persistent display regardless of other windows. Position and many other variables can be tweaked to changed task bar behavior.
When started, the taskbar shows up as a single row of buttons filling the full width of the screen, but during the work can be resized to accommodate up to 8 rows. In addition, if the AutoStick option is used, the taskbar will auto position itself at the top or bottom of the screen, and can be dragged from one position to another with a normal move operation.
The following options can be placed in the .fvwm2rc file
*FvwmTaskBar: StatusFont font Specifies the font to be used for the clock and tip windows. If this option is not specified, fixed font is used.