I've had a similar problem with awesome
window manager as well as urxvt
, when ImageMagick was used to set the background. It got quickly resolved with feedback from the author of awesome
- you can see the archive of this conversation on gmane archives - here and further on here.
The solution was to change the background setter and I chose to use habak
because it was the lightest one. You can also use other, like feh
or Esetroot
(belongs to Enlightenment WM). I think I would recommend you to try feh
first, since it seems to be packaged for many distros.
Side note: In case someone wanted to try out many different bg-setters, here's a list of those that awsetbg
(bg-setting wrapper script from awesome
) tries to use:
Esetroot habak feh hsetroot chbg fvwm-root imlibsetroot display qiv xv xsri xli xsetbg wmsetbg xsetroot
Note that some of those only come shipped with bigger packages.
Edit: Looking at xsri manpage, I think it might provide best flexibility for your needs.
As far as I know (but I'm no X expert), visibility is only tracked through VisibilityNotify
events, it isn't a state that you can query like IsViewable
. You'd need to get KDE to spit it out, I don't know if it can do that.
You may be solve your problem by sending the window a VisibilityNotify(state=VisibilityUnobscured)
event. I don't know if that's enough, you may also need to send a MapNotify
event. Here's some untested Python code to send a VisibilityNotify
event.
#! /usr/bin/env python
import re, sys, time
import Xlib.X, Xlib.XK, Xlib.display, Xlib.protocol
def parse_action(string):
state = {
'0': 0,
'1': 1,
'2': 2,
'unobscured': 0,
'partiallyobscured': 1,
'fullyobscured': 2,
'visibilityunobscured': 0,
'visibilitypartiallyobscured': 1,
'visibilityfullyobscured': 2,
}[string.lower()]
return state
def parse_window(display, arg):
wid = int(arg, 0)
return display.create_resource_object('window', wid)
def send_event(display, window, state):
window.send_event(Xlib.protocol.event.VisibilityNotify(window=window,
state=state))
display.sync()
if __name__ == "__main__":
display = Xlib.display.Display()
send_event(display, parse_window(display, sys.argv[1]), parse_action(sys.argv[2]))
Best Answer
Launch a second X server, using XNest, and position it within the real root window. This has several advantages over messing with xorg.conf files:
you can still put extra stuff in the black border (or not make it black, etc.) (might be cool remove the frame and see "joejoejoe wuz here" down the side)
you can position it exactly where you want just using mouse (XNest is an X server that looks like a client to the root X Server)
and uh, you don't have to futz with xorg.conf files