Hello jeff covey on Fri, May 19, 2006 at 05:58:52PM CEST, you wrote:
> the configuration is much easier now with one exception: i can't put the
> bar at the top of the screen as i used to do. has this or another solution
> been considered?:
>
> http://wmii.de/pipermail/wmii/2006-May/001526.html
>
> i don't like having to look down to the bottom of the screen to see the bar
> and up to the top to see the title bar and menus for each client. it would
> be great if i could just set "BAR_ON_TOP=1" in wmiirc and have everything
> together.
A while ago I posted a patch for wmii-rc2-slavutych, with which you can
enable the bar on top as a compile time option. The patch has worked
ever since (the patch hunks merely succeeded with a small offset). For
your convenience and anyone else interested find attached the latest
wmii-3-bar_on_top.patch.
cd to the wmii-3 source directory, apply the patch using:
% patch -p1 < wmii-3-bar_on_top.patch
and (re)compile wmii using:
% make clean && make BAR_ON_TOP=1
install, restart wmii and enjoy the bar as well as the wmiimenu at the
top of the screen :) In case there are any problems please let me know.
However I have to agree that the patch does not work well with floating
clients at the moment (they are placed above the bar), but who needs
floating windows anyways when you have such a great wm like wmii doing
such a marvellous job of managing the clients! =)
Regards Alexis.
diff -Narc wmii-3.orig/cmd/Makefile wmii-3/cmd/Makefile
*** wmii-3.orig/cmd/Makefile 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/Makefile 2006-05-21 12:51:37.000000000 +0200
***************
*** 22,25 ****
# @${CC} -o $* $*.o ${LDFLAGS} -lsocket
clean:
! rm -f wmiimenu wmiir wmiipsel wmiiwarp *.o
--- 22,25 ----
# @${CC} -o $* $*.o ${LDFLAGS} -lsocket
clean:
! rm -f wmiisetsid wmiimenu wmiir wmiipsel wmiiwarp *.o
diff -Narc wmii-3.orig/cmd/wm/area.c wmii-3/cmd/wm/area.c
*** wmii-3.orig/cmd/wm/area.c 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/wm/area.c 2006-05-19 18:42:27.000000000 +0200
***************
*** 41,46 ****
--- 41,47 ----
a->view = v;
a->id = id++;
a->rect = rect;
+ a->rect.y = AREA_VIEW_Y;
a->rect.height = rect.height - brect.height;
a->mode = def.colmode;
a->rect.width = w;
***************
*** 185,192 ****
x = 0;
else
x = fr->rect.x / dx;
! if(fr->rect.y < 0)
! y = 0;
else
y = fr->rect.y / dy;
maxx = (fr->rect.x + fr->rect.width) / dx;
--- 186,193 ----
x = 0;
else
x = fr->rect.x / dx;
! if(fr->rect.y < AREA_VIEW_Y)
! y = AREA_VIEW_Y;
else
y = fr->rect.y / dy;
maxx = (fr->rect.x + fr->rect.width) / dx;
diff -Narc wmii-3.orig/cmd/wm/bar.c wmii-3/cmd/wm/bar.c
*** wmii-3.orig/cmd/wm/bar.c 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/wm/bar.c 2006-05-19 18:42:27.000000000 +0200
***************
*** 74,80 ****
unsigned int i, j;
brect = rect;
brect.height = height_of_bar();
! brect.y = rect.height - brect.height;
XMoveResizeWindow(dpy, barwin, brect.x, brect.y, brect.width,
brect.height);
XSync(dpy, False);
XFreePixmap(dpy, barpmap);
--- 74,80 ----
unsigned int i, j;
brect = rect;
brect.height = height_of_bar();
! brect.y = WM_BAR_Y;
XMoveResizeWindow(dpy, barwin, brect.x, brect.y, brect.width,
brect.height);
XSync(dpy, False);
XFreePixmap(dpy, barpmap);
diff -Narc wmii-3.orig/cmd/wm/view.c wmii-3/cmd/wm/view.c
*** wmii-3.orig/cmd/wm/view.c 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/wm/view.c 2006-05-19 18:42:27.000000000 +0200
***************
*** 318,324 ****
for(i = 1; i < v->area.size; i++) {
Area *a = v->area.data[i];
a->rect.x = xoff;
! a->rect.y = 0;
a->rect.height = rect.height - brect.height;
xoff += a->rect.width;
arrange_column(a, False);
--- 318,324 ----
for(i = 1; i < v->area.size; i++) {
Area *a = v->area.data[i];
a->rect.x = xoff;
! a->rect.y = AREA_VIEW_Y;
a->rect.height = rect.height - brect.height;
xoff += a->rect.width;
arrange_column(a, False);
diff -Narc wmii-3.orig/cmd/wm/wm.c wmii-3/cmd/wm/wm.c
*** wmii-3.orig/cmd/wm/wm.c 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/wm/wm.c 2006-05-19 18:42:27.000000000 +0200
***************
*** 327,333 ****
brect = rect;
brect.height = height_of_bar();
! brect.y = rect.height - brect.height;
barwin = XCreateWindow(dpy, RootWindow(dpy, screen), brect.x, brect.y,
brect.width, brect.height, 0, DefaultDepth(dpy, screen),
CopyFromParent, DefaultVisual(dpy, screen),
--- 327,333 ----
brect = rect;
brect.height = height_of_bar();
! brect.y = WM_BAR_Y;
barwin = XCreateWindow(dpy, RootWindow(dpy, screen), brect.x, brect.y,
brect.width, brect.height, 0, DefaultDepth(dpy, screen),
CopyFromParent, DefaultVisual(dpy, screen),
diff -Narc wmii-3.orig/cmd/wm/wm.h wmii-3/cmd/wm/wm.h
*** wmii-3.orig/cmd/wm/wm.h 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/wm/wm.h 2006-05-19 18:42:27.000000000 +0200
***************
*** 10,15 ****
--- 10,23 ----
#include <ixp.h>
#include <blitz.h>
+ #if BAR_ON_TOP == 1
+ #define WM_BAR_Y 0
+ #define AREA_VIEW_Y brect.height
+ #else
+ #define WM_BAR_Y rect.height - brect.height
+ #define AREA_VIEW_Y 0
+ #endif
+
/* WM atoms */
enum {
WMState,
diff -Narc wmii-3.orig/cmd/wmiimenu.c wmii-3/cmd/wmiimenu.c
*** wmii-3.orig/cmd/wmiimenu.c 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/cmd/wmiimenu.c 2006-05-19 18:42:27.000000000 +0200
***************
*** 20,25 ****
--- 20,31 ----
#include <blitz.h>
#include <cext.h>
+ #if BAR_ON_TOP == 1
+ #define MENU_Y 0
+ #else
+ #define MENU_Y DisplayHeight(dpy, screen) - mrect.height
+ #endif
+
VECTOR(ItemVector, char *);
static Bool done = False;
static int ret = 0;
***************
*** 373,379 ****
mrect.width = DisplayWidth(dpy, screen);
mrect.height = draw.font.ascent + draw.font.descent + 4;
! mrect.y = DisplayHeight(dpy, screen) - mrect.height;
mrect.x = 0;
win = XCreateWindow(dpy, RootWindow(dpy, screen), mrect.x, mrect.y,
--- 379,385 ----
mrect.width = DisplayWidth(dpy, screen);
mrect.height = draw.font.ascent + draw.font.descent + 4;
! mrect.y = MENU_Y;
mrect.x = 0;
win = XCreateWindow(dpy, RootWindow(dpy, screen), mrect.x, mrect.y,
diff -Narc wmii-3.orig/config.mk wmii-3/config.mk
*** wmii-3.orig/config.mk 2006-05-19 13:20:53.000000000 +0200
--- wmii-3/config.mk 2006-05-21 12:50:56.000000000 +0200
***************
*** 12,21 ****
# includes and libs
LIBS = -L${PREFIX}/lib -L/usr/lib -lc -L${X11LIB} -lX11
# Linux/BSD
CFLAGS = -O2 -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \
! -DVERSION=\"${VERSION}\"
LDFLAGS = ${LIBS}
# Solaris
--- 12,22 ----
# includes and libs
LIBS = -L${PREFIX}/lib -L/usr/lib -lc -L${X11LIB} -lX11
+ BAR_ON_TOP = 0
# Linux/BSD
CFLAGS = -O2 -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \
! -DVERSION=\"${VERSION}\" -DBAR_ON_TOP=${BAR_ON_TOP}
LDFLAGS = ${LIBS}
# Solaris
_______________________________________________
[email protected] mailing list
http://wmii.de/cgi-bin/mailman/listinfo/wmii