You are not logged in.
Pages: 1
I don't want a "slit" per se, but I'm wondering if there's any way to define a space along one of my screen edges that windows won't cover when they maximize.
Offline
It's called strut. There are simple ~20 LOC apps that make it, just google
IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686
Offline
It's called strut. There are simple ~20 LOC apps that make it, just google
Thanks for the tip. So far google hasn't been my friend with finding info on this, but I'm sure all track something down.
Offline
Hmm........from what I can find the strut is application dependant. If an app has set struts, it stops the window from maximizing over. I'm trying to keep my conky from being hidden by a maxamized window...is it possible to set struts in Conky? I've been unable to find any info on it. :-(
Offline
Here is short "program" that does what you want I think. You have to set the borders on each side as you want them and then compile it.
I found this while googling for a solution to the same problem you had, I tried to find the news group post I've got it from again, but can't find it anymore.
I'm not really into using Xorg libraries and routtines so I can't say if the code below is good or if it could be done better, but it works. Anyways here's the code:
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#define LEFT 0
#define RIGHT 0
#define TOP 0
#define BOTTOM 20
int main(int argc, char **argv)
{
Display *dpy;
Window win;
XEvent event;
unsigned long strut[4];
XWMHints xwmh = { (InputHint|StateHint), False, IconicState,
0, 0, 0, 0, 0, 0, };
if ((dpy = XOpenDisplay(NULL)) == NULL) {
fprintf(stderr, "%s: can't open %s\en", argv[0], XDisplayName(NULL));
return 1;
}
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 1, 1, 0, 0, 0);
XSetWMHints(dpy, win, &xwmh);
XMapWindow(dpy, win);
strut[0] = LEFT;
strut[1] = RIGHT;
strut[2] = TOP;
strut[3] = BOTTOM;
XChangeProperty(dpy, win, XInternAtom(dpy, "_NET_WM_STRUT", False),
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) strut, 4);
while (1) {
XNextEvent(dpy, &event);
}
}To compile it just type:
gcc -L/usr/X11R6/lib -lX11 -o simple_strut simple_strut.cThe prgram has a little flaw, if you use visibility or programs like it you will have a window icon for the above program as it will not automatically skip the window list. One can suerly remedy this but I didn't get around doing it till now.
Offline
Sweet. Thanks.
Offline
Pages: 1