summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shadura <andrewsh@debian.org>2016-04-29 15:52:16 +0200
committerAndrew Shadura <andrewsh@debian.org>2016-04-29 15:52:16 +0200
commitc6dd1ec3b3d71a979f106879669a15d94cfed6ef (patch)
tree9fbade96d39c5df18899e04889915ee3180d3c9d
parentcc0dafee5f33f4efc97b31ebb64f9a3459c0873b (diff)
Apply patches for dgit.debian/3.10_20120413+hg2813-9
-rwxr-xr-xalternative_wmiircs/plan9port/wmiirc4
-rw-r--r--alternative_wmiircs/python/wmiirc.py4
-rw-r--r--alternative_wmiircs/ruby/config.yaml2
-rw-r--r--cmd/menu/Makefile4
-rw-r--r--cmd/tray/Makefile4
-rw-r--r--cmd/tray/tray.c21
-rw-r--r--cmd/wihack.sh9
-rw-r--r--cmd/wmii/Makefile4
-rw-r--r--cmd/wmii/client.c2
-rw-r--r--cmd/wmii/column.c4
-rw-r--r--cmd/wmii/dat.h10
-rw-r--r--cmd/wmii/fns.h4
-rw-r--r--cmd/wmii/frame.c5
-rw-r--r--cmd/wmii/main.c48
-rw-r--r--cmd/wmii/message.c22
-rw-r--r--cmd/wmii/view.c41
-rw-r--r--cmd/wmiir.c4
-rw-r--r--cmd/x11/Makefile5
-rw-r--r--config.mk6
-rw-r--r--lib/libstuff/x11/windows/createwindow_visual.c4
-rw-r--r--lib/libstuff/x11/xft.c6
-rw-r--r--lib/libwmii_hack/Makefile3
-rw-r--r--lib/libwmii_hack/hack.c6
-rw-r--r--man/wimenu.man18
-rw-r--r--man/wmiir.man12
-rw-r--r--mk/hdr.mk5
-rw-r--r--mk/python.mk2
-rw-r--r--mk/wmii.mk2
-rw-r--r--rc/wmiirc.sh8
-rw-r--r--test/Makefile3
30 files changed, 190 insertions, 62 deletions
diff --git a/alternative_wmiircs/plan9port/wmiirc b/alternative_wmiircs/plan9port/wmiirc
index 5ea1f27..003a4b2 100755
--- a/alternative_wmiircs/plan9port/wmiirc
+++ b/alternative_wmiircs/plan9port/wmiirc
@@ -30,8 +30,8 @@ noticetimeout=5
noticebar=/rbar/!notice
# Theme
-wmiifont='drift,-*-fixed-*-*-*-*-9-*-*-*-*-*-*-*'
-wmiifont='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
+wmiifont='-*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-'
+wmiifont='-*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-'
wmiinormcol=('#000000' '#c1c48b' '#81654f')
wmiifocuscol=('#000000' '#81654f' '#000000')
wmiibackground='#333333'
diff --git a/alternative_wmiircs/python/wmiirc.py b/alternative_wmiircs/python/wmiirc.py
index a33ff01..42c4243 100644
--- a/alternative_wmiircs/python/wmiirc.py
+++ b/alternative_wmiircs/python/wmiirc.py
@@ -38,7 +38,7 @@ noticebar=('right', '!notice')
background = '#333333'
floatbackground='#222222'
-wmii['font'] = 'drift,-*-fixed-*-*-*-*-9-*-*-*-*-*-*-*'
+wmii['font'] = '-*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-*'
wmii['normcolors'] = '#000000', '#c1c48b', '#81654f'
wmii['focuscolors'] = '#000000', '#81654f', '#000000'
wmii['grabmod'] = keys.defs['mod']
@@ -103,6 +103,8 @@ events.bind({
'Notice': lambda args: notice.show(args),
+ 'ScreenChange': lambda args: wmii.ctl('wipescreens'),
+
Match(('LeftBarClick', 'LeftBarDND'), 1): lambda e, b, tag: tags.select(tag),
Match('LeftBarClick', 4): lambda *a: tags.select(tags.next(True)),
Match('LeftBarClick', 5): lambda *a: tags.select(tags.next()),
diff --git a/alternative_wmiircs/ruby/config.yaml b/alternative_wmiircs/ruby/config.yaml
index 60065b3..fd8f07b 100644
--- a/alternative_wmiircs/ruby/config.yaml
+++ b/alternative_wmiircs/ruby/config.yaml
@@ -36,7 +36,7 @@ display:
##
# The font to use in all text drawn by wmii.
#
- font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*
+ font: -*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-*
##
# Thickness of client border (measured in pixels).
diff --git a/cmd/menu/Makefile b/cmd/menu/Makefile
index d8524c8..c4d62db 100644
--- a/cmd/menu/Makefile
+++ b/cmd/menu/Makefile
@@ -15,8 +15,8 @@ TAGFILES= dat.h $(ROOT)/include/*.h $(ROOT)/include/stuff/*.h
PACKAGES += $(X11PACKAGES)
-LIB = $(LIBS9) $(LIBIXP)
-LIBS += -lm
+LIB = $(LIBS9)
+LIBS += -lm $(LIBIXP)
OBJ = main \
caret \
history \
diff --git a/cmd/tray/Makefile b/cmd/tray/Makefile
index 2789c5d..a6e3c49 100644
--- a/cmd/tray/Makefile
+++ b/cmd/tray/Makefile
@@ -9,8 +9,8 @@ HFILES= dat.h fns.h selection.h
PACKAGES += $(X11PACKAGES)
-LIB = $(LIBS9) $(LIBIXP)
-LIBS += -lm
+LIB = $(LIBS9)
+LIBS += -lm $(LIBIXP)
OBJ = \
client \
ewmh \
diff --git a/cmd/tray/tray.c b/cmd/tray/tray.c
index dece602..1257996 100644
--- a/cmd/tray/tray.c
+++ b/cmd/tray/tray.c
@@ -55,6 +55,9 @@ restrut(Window *w, int orientation) {
ewmh_setstrut(w, strut);
}
+static bool
+root_config_event(Window *w, void *aux, XConfigureEvent *ev);
+
void
tray_init(void) {
WinAttr wa;
@@ -77,7 +80,7 @@ tray_init(void) {
sethandler(tray.win, &handlers);
pushhandler(&scr.root, &root_handlers, nil);
- selectinput(&scr.root, scr.root.eventmask | PropertyChangeMask);
+ selectinput(&scr.root, scr.root.eventmask | PropertyChangeMask | StructureNotifyMask);
changeprop_string(tray.win, "_WMII_TAGS", tray.tags);
@@ -99,6 +102,7 @@ tray_init(void) {
hints.flags = InputHint;
hints.input = false;
XSetWMHints(display, tray.win->xid, &hints);
+ root_config_event(nil, nil, nil);
tray_resize(tray.win->r);
}
@@ -409,6 +413,20 @@ static Handlers handlers = {
};
static bool
+root_config_event(Window *w, void *aux, XConfigureEvent *ev) {
+
+ USED(aux);
+ int i, n;
+ Rectangle *rects;
+
+ rects = xinerama_screens(&n);
+
+ scr.rect = rects[0];
+ tray_update();
+ return false;
+}
+
+static bool
property_event(Window *w, void *aux, XPropertyEvent *ev) {
if(ev->atom == NET("CURRENT_DESKTOP"))
tray_resize(tray.r);
@@ -418,6 +436,7 @@ property_event(Window *w, void *aux, XPropertyEvent *ev) {
}
static Handlers root_handlers = {
+ .config = root_config_event,
.property = property_event,
};
diff --git a/cmd/wihack.sh b/cmd/wihack.sh
index ae06ff0..10ced8c 100644
--- a/cmd/wihack.sh
+++ b/cmd/wihack.sh
@@ -7,12 +7,12 @@ usage() {
exit 1
}
-checkarg='[ ${#@} -gt 0 ] || usage'
+checkarg='[ $# -gt 0 ] || usage'
export WMII_HACK_TIME=$(date +%s)
-while [ ${#@} -gt 0 ]
+while [ "$1" != "" ]
do
- case $1 in
+ case "$1" in
-transient)
shift; eval $checkarg
export WMII_HACK_TRANSIENT=$1
@@ -36,8 +36,7 @@ eval $checkarg
if [ ! -u "`which $1`" -a ! -g "`which $1`" ]
then
- export LD_PRELOAD=libwmii_hack.so
- export LD_LIBRARY_PATH="@LIBDIR@${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
+ export LD_PRELOAD="@LIBDIR@/libwmii_hack.so"
else
unset WMII_HACK_TRANSIENT WMII_HACK_TYPE WMII_HACK_TAGS
fi
diff --git a/cmd/wmii/Makefile b/cmd/wmii/Makefile
index b5d41c4..e527387 100644
--- a/cmd/wmii/Makefile
+++ b/cmd/wmii/Makefile
@@ -10,8 +10,8 @@ TAGFILES = dat.h
PACKAGES += $(X11PACKAGES) xext xrandr xrender xinerama
-LIB = $(LIBIXP) $(LIBS9)
-LIBS += -lm
+LIB = $(LIBS9)
+LIBS += -lm $(LIBIXP)
OBJ = area \
bar \
diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c
index c119bd0..5a7224e 100644
--- a/cmd/wmii/client.c
+++ b/cmd/wmii/client.c
@@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
+ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c
index 098e964..25a9567 100644
--- a/cmd/wmii/column.c
+++ b/cmd/wmii/column.c
@@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
+ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@@ -156,7 +156,7 @@ column_detach(Frame *f) {
if(first)
stack_scale(first, dy);
column_arrange(a, false);
- }else if(a->view->areas[a->screen]->next)
+ }else if(a->view->areas[a->screen]->next && !a->permanent)
column_destroy(a);
}
diff --git a/cmd/wmii/dat.h b/cmd/wmii/dat.h
index 1b32f9a..1a3fc3e 100644
--- a/cmd/wmii/dat.h
+++ b/cmd/wmii/dat.h
@@ -1,4 +1,4 @@
-/* Copyright ©2007-2010 Kris Maglione <jg@suckless.org>
+/* Copyright ©2007-2014 Kris Maglione <jg@suckless.org>
* See LICENSE file for license details.
*/
@@ -18,7 +18,11 @@
#include <stuff/util.h>
#include "debug.h"
-#define FONT "fixed"
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 255
+#endif
+
+#define FONT "-*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-"
#define FOCUSCOLORS "#000000 #81654f #000000"
#define NORMCOLORS "#000000 #c1c48b #81654f"
@@ -149,6 +153,7 @@ struct Area {
int mode;
int screen;
bool max;
+ bool permanent;
Rectangle r;
Rectangle r_old;
};
@@ -371,6 +376,7 @@ EXTERN long ignoreenter;
EXTERN bool resizing;
EXTERN int starting;
EXTERN char* user;
+EXTERN long nscreens_new;
EXTERN Client* kludge;
diff --git a/cmd/wmii/fns.h b/cmd/wmii/fns.h
index cc2e7e0..a0da74d 100644
--- a/cmd/wmii/fns.h
+++ b/cmd/wmii/fns.h
@@ -1,4 +1,4 @@
-/* Copyright ©2007-2010 Kris Maglione <jg@suckless.org>
+/* Copyright ©2007-2014 Kris Maglione <jg@suckless.org>
* See LICENSE file for license details.
*/
@@ -207,6 +207,7 @@ void update_keys(void);
/* main.c */
void init_screens(void);
void spawn_command(const char*);
+void wipe_screens(void);
/* message.c */
char* mask(char**, int*, int*);
@@ -280,6 +281,7 @@ void view_select(const char*);
void view_update(View*);
void view_update_all(void);
void view_update_rect(View*);
+void view_update_screens(View*);
void view_update_urgency(View*, char*);
Rectangle* view_rects(View*, uint *num, Frame *ignore);
diff --git a/cmd/wmii/frame.c b/cmd/wmii/frame.c
index 3c1a838..85f7f82 100644
--- a/cmd/wmii/frame.c
+++ b/cmd/wmii/frame.c
@@ -1,4 +1,4 @@
-/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
+/* Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@@ -559,7 +559,8 @@ move_focus(Frame *old_f, Frame *f) {
noinput = (old_f && old_f->client->noinput) ||
(f && f->client->noinput) ||
disp.hasgrab != &c_root;
- if(noinput) {
+
+ if(noinput || true) {
if(old_f)
frame_draw(old_f);
if(f)
diff --git a/cmd/wmii/main.c b/cmd/wmii/main.c
index e58b858..fc5f43a 100644
--- a/cmd/wmii/main.c
+++ b/cmd/wmii/main.c
@@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
+ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#define EXTERN
@@ -158,12 +158,14 @@ regerror(char *err) {
fprint(2, "%s: %s\n", argv0, err);
}
+static bool keep_screens = true;
+
void
init_screens(void) {
static int old_n, old_nscreens;
- Rectangle *rects;
+ Rectangle *rects, *r;
View *v;
- int i, n, m;
+ int i, j, n, m;
#ifdef notdef
d.x = Dx(scr.rect) - Dx(screen->r);
@@ -176,15 +178,33 @@ init_screens(void) {
/* Reallocate screens, zero any new ones. */
rects = xinerama_screens(&n);
+ r = malloc(n * sizeof *r);
+
+ /* Weed out subsumed/cloned screens */
+ for(m=-1; m < n; n=m) {
+ for(i=n-1, m=0; i >= 0; i--) {
+ for(j=0; j < n; j++)
+ if (i != j &&
+ eqrect(rects[i],
+ rect_intersection(rects[i], rects[j])))
+ break;
+ if (j == n)
+ r[m++] = rects[i];
+ }
+ for(i=m-1, j=0; i >= 0; i--)
+ rects[j++] = r[i];
+ }
+ free(r);
+
m = nscreens;
- nscreens = max(n, nscreens);
+ nscreens_new = keep_screens ? max(n, nscreens) : n;
+
+ for(v=view; v; v=v->next)
+ view_update_screens(v);
+
+ nscreens = nscreens_new;
screens = erealloc(screens, (nscreens + 1) * sizeof *screens);
screens[nscreens] = nil;
- for(v=view; v; v=v->next) {
- v->areas = erealloc(v->areas, nscreens * sizeof *v->areas);
- v->r = erealloc(v->r, nscreens * sizeof *v->r);
- v->pad = erealloc(v->pad, nscreens * sizeof *v->pad);
- }
/* Reallocate buffers. */
freeimage(disp.ibuf);
@@ -207,9 +227,11 @@ init_screens(void) {
screen->r = rects[i];
else
screen->r = rectsetorigin(screen->r, scr.rect.max);
+
if(i >= m)
for(v=view; v; v=v->next)
view_init(v, i);
+
def.snap = Dy(screen->r) / 63;
bar_init(screens[i]);
}
@@ -219,10 +241,18 @@ init_screens(void) {
if (old_n != n || old_nscreens != nscreens)
event("ScreenChange %d %d\n", n, nscreens);
+
old_n = n;
old_nscreens = nscreens;
}
+void
+wipe_screens(void) {
+ keep_screens = false;
+ init_screens();
+ keep_screens = true;
+}
+
static void
cleanup(void) {
starting = -1;
diff --git a/cmd/wmii/message.c b/cmd/wmii/message.c
index d392ad0..0127605 100644
--- a/cmd/wmii/message.c
+++ b/cmd/wmii/message.c
@@ -1,4 +1,4 @@
-/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
+/* Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@@ -62,6 +62,7 @@ enum {
LUP,
LURGENT,
LVIEW,
+ LWIPESCREENS,
LTILDE,
};
char *symtab[] = {
@@ -103,6 +104,7 @@ char *symtab[] = {
"up",
"urgent",
"view",
+ "wipescreens",
"~",
};
@@ -609,26 +611,33 @@ message_root(void *p, IxpMsg *m) {
setdef(&screen->barpos, s, barpostab, nelem(barpostab));
view_update(selview);
break;
+
case LBORDER:
def.border = msg_getulong(msg_getword(m, 0));;
view_update(selview);
break;
+
case LCOLMODE:
setdef(&def.colmode, msg_getword(m, 0), modes, Collast);
break;
+
case LDEBUG:
msg_debug(msg_getword(m, 0));
break;
+
case LEXEC:
execstr = strdup(m->pos);
srv.running = 0;
break;
+
case LSPAWN:
spawn_command(m->pos);
break;
+
case LFOCUSCOLORS:
msg_parsecolors(m, &def.focuscolor);
goto updatecolors;
+
case LFONT:
fn = loadfont(m->pos);
if(fn) {
@@ -640,6 +649,7 @@ message_root(void *p, IxpMsg *m) {
ret = "can't load font";
view_update(selview);
break;
+
case LFONTPAD:
if(!getint(msg_getword(m, 0), &def.font->pad.min.x) ||
!getint(msg_getword(m, 0), &def.font->pad.max.x) ||
@@ -652,6 +662,7 @@ message_root(void *p, IxpMsg *m) {
view_update(selview);
}
break;
+
case LGRABMOD:
s = msg_getword(m, Ebadvalue);
if(!parsekey(s, &i, nil) || i == 0)
@@ -659,10 +670,12 @@ message_root(void *p, IxpMsg *m) {
def.mod = i;
break;
+
case LINCMODE:
setdef(&def.incmode, msg_getword(m, 0), incmodetab, nelem(incmodetab));
view_update(selview);
break;
+
case LNORMCOLORS:
msg_parsecolors(m, &def.normcolor);
updatecolors:
@@ -670,12 +683,19 @@ message_root(void *p, IxpMsg *m) {
client_reparent(c);
view_update(selview);
break;
+
case LSELCOLORS:
warning("selcolors have been removed");
return Ebadcmd;
+
case LVIEW:
view_select(m->pos);
break;
+
+ case LWIPESCREENS:
+ wipe_screens();
+ break;
+
case LQUIT:
srv.running = 0;
break;
diff --git a/cmd/wmii/view.c b/cmd/wmii/view.c
index 5bf43c5..4aa3d29 100644
--- a/cmd/wmii/view.c
+++ b/cmd/wmii/view.c
@@ -1,5 +1,5 @@
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
+ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "dat.h"
@@ -113,6 +113,38 @@ view_init(View *v, int iscreen) {
}
void
+view_update_screens(View *v) {
+ Area *a;
+ Frame *f;
+ int s;
+
+ if (v->sel->screen > (long)nscreens)
+ v->sel = v->floating->next;
+
+ v->selscreen = min(v->selscreen, nscreens);
+
+ if (nscreens_new < nscreens) {
+ foreach_frame(v, s, a, f) {
+ f->oldscreen = min(f->oldscreen, nscreens_new);
+ if (a->screen >= nscreens_new) {
+ a->permanent = true;
+ area_detach(f);
+ view_attach(v, f);
+ }
+ }
+
+ foreach_area(v, s, a) {
+ if (a->screen >= nscreens_new)
+ area_destroy(a);
+ }
+ }
+
+ v->areas = erealloc(v->areas, nscreens_new * sizeof *v->areas);
+ v->r = erealloc(v->r, nscreens_new * sizeof *v->r);
+ v->pad = erealloc(v->pad, nscreens_new * sizeof *v->pad);
+}
+
+void
view_destroy(View *v) {
View **vp;
Frame *f;
@@ -385,6 +417,7 @@ view_attach(View *v, Frame *f) {
oldsel = v->oldsel;
a = v->sel;
+
if(c->floating == Never)
a = view_findarea(v, v->selscreen, v->selcol, false);
else if(client_floats_p(c)) {
@@ -392,8 +425,12 @@ view_attach(View *v, Frame *f) {
oldsel = v->sel;
a = v->floating;
}
+ else if(c->sel && c->sel->screen >= 0 && c->sel->screen < nscreens_new &&
+ c->sel->screen != v->sel->screen)
+ a = view_findarea(v, c->sel->screen, 0, false);
else if((ff = client_groupframe(c, v))) {
- a = ff->area;
+ if (ff->client != c && ff->area->screen < nscreens_new)
+ a = ff->area;
if(v->oldsel && ff->client == view_selclient(v))
a = v->oldsel;
}
diff --git a/cmd/wmiir.c b/cmd/wmiir.c
index ecf9a92..360ffb9 100644
--- a/cmd/wmiir.c
+++ b/cmd/wmiir.c
@@ -529,6 +529,7 @@ main(int argc, char *argv[]) {
char *address;
exectab *tab;
int ret;
+ Stat *stat;
IXP_ASSERT_VERSION;
@@ -579,6 +580,9 @@ main(int argc, char *argv[]) {
if(tab->cmd == 0)
usage();
+ stat = ixp_stat(client, "/keys");
+ ixp_freestat(stat);
+
ret = tab->fn(argc, argv);
ixp_unmount(client);
diff --git a/cmd/x11/Makefile b/cmd/x11/Makefile
index 5dd7fa3..606ad1d 100644
--- a/cmd/x11/Makefile
+++ b/cmd/x11/Makefile
@@ -7,9 +7,8 @@ TARG = wikeyname \
PACKAGES += $(X11PACKAGES)
-LIB = $(LIBS9) $(LIBIXP)
-LIBS += $(LIB)
-CFLAGS += $(INCX11)
+LIB = $(LIBS9)
+LIBS += $(LIB) $(LIBIXP) -ldl
wiclick.out: wiclick.o
$(LINK) $@ $< -lXtst
diff --git a/config.mk b/config.mk
index 0512ce7..4c62802 100644
--- a/config.mk
+++ b/config.mk
@@ -14,11 +14,10 @@ PREFIX = /usr/local
INCLUDES = -I. -I$(ROOT)/include -I$(INCLUDE) -I/usr/include
LIBS = -L$(ROOT)/lib -L/usr/lib
-TERMINAL = xterm
+TERMINAL = x-terminal-emulator
# Flags
include $(ROOT)/mk/gcc.mk
-CFLAGS += -Os $(DEBUGCFLAGS)
LDFLAGS += -g
# Compiler, Linker. Linker should usually *not* be ld.
@@ -30,8 +29,7 @@ AR = ar crs
PYTHON = python
X11PACKAGES = x11 xinerama xrender xrandr
-INCX11 = $$(pkg-config --cflags $(X11PACKAGES))
-LIBIXP = $(LIBDIR)/libixp.a
+LIBIXP = -lixp
# Enable RTLD. Only necessary for Xft support.
CFLAGS += -DHAVE_RTLD
diff --git a/lib/libstuff/x11/windows/createwindow_visual.c b/lib/libstuff/x11/windows/createwindow_visual.c
index e64c884..32bd3d6 100644
--- a/lib/libstuff/x11/windows/createwindow_visual.c
+++ b/lib/libstuff/x11/windows/createwindow_visual.c
@@ -5,6 +5,10 @@
#include <string.h>
#include <unistd.h>
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 255
+#endif
+
static char hostname[HOST_NAME_MAX + 1];
static long pid;
diff --git a/lib/libstuff/x11/xft.c b/lib/libstuff/x11/xft.c
index ddbf60b..f53c1b6 100644
--- a/lib/libstuff/x11/xft.c
+++ b/lib/libstuff/x11/xft.c
@@ -9,12 +9,16 @@ Xft *xft;
#ifdef HAVE_RTLD
#include <dlfcn.h>
+#ifndef LIBXFT_SO
+#define LIBXFT_SO "libXft.so"
+#endif
+
bool
havexft(void) {
void *libxft;
if(xft == nil) {
- libxft = dlopen("libXft.so", RTLD_LAZY);
+ libxft = dlopen(LIBXFT_SO, RTLD_LAZY);
if(libxft == nil)
return false;
xft = emalloc(sizeof *xft);
diff --git a/lib/libwmii_hack/Makefile b/lib/libwmii_hack/Makefile
index e3037c9..059bd8d 100644
--- a/lib/libwmii_hack/Makefile
+++ b/lib/libwmii_hack/Makefile
@@ -3,9 +3,6 @@ include $(ROOT)/mk/hdr.mk
hack.o hack.o_pic: util.c hack.h x11.h
-CFLAGS += $(INCX11)
-SOLDFLAGS += $(LIBX11)
-
TARG = libwmii_hack
# Can't just link libstuff here. We need PIC objects.
OBJ = hack \
diff --git a/lib/libwmii_hack/hack.c b/lib/libwmii_hack/hack.c
index 72f22dd..56e4fd9 100644
--- a/lib/libwmii_hack/hack.c
+++ b/lib/libwmii_hack/hack.c
@@ -13,6 +13,10 @@
#include "util.c"
#include "x11.c"
+#ifndef LIBX11_SO
+#define LIBX11_SO "libX11.so"
+#endif
+
enum {
Timeout = 10,
};
@@ -40,7 +44,7 @@ init(Display *d) { /* Hrm... assumes one display... */
long n;
int i;
- xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
+ xlib = dlopen(LIBX11_SO, RTLD_GLOBAL | RTLD_LAZY);
if(xlib == nil)
return;
mapwindow = (mapfn)(uintptr_t)dlsym(xlib, "XMapWindow");
diff --git a/man/wimenu.man1 b/man/wimenu.man1
index 9c0c6df..a728ac3 100644
--- a/man/wimenu.man1
+++ b/man/wimenu.man1
@@ -104,7 +104,7 @@ movement keys of vi and the standard UNIX shell input bindings.
Move forward one word.
: C-a
- Move to the begining of the line.
+ Move to the beginning of the line.
: C-e
Move to the end of the line.
@@ -172,13 +172,13 @@ to that command. Given three commands and argument sets,
the following script provides the appropriate completions:
```
-#!/bin/sh -f
+#!/bin/sh \-f
rm fifo
mkfifo fifo
# Open wimenu with a fifo as its stdin
-wimenu -c <fifo | awk '
+wimenu \-c <fifo | awk '
BEGIN {
# Define the completion results
cmds = "foo\nbar\nbaz\n"
@@ -211,7 +211,7 @@ wimenu -c <fifo | awk '
# Skip the trailing part of the command
getline rest
}
-' | tail -1
+' | tail \-1
```
In theory, this facility can be used for myriad purposes,
diff --git a/man/wmiir.man1 b/man/wmiir.man1
index 81df2e3..031ec0f 100644
--- a/man/wmiir.man1
+++ b/man/wmiir.man1
@@ -88,7 +88,7 @@ to scripting wmii:
given value as argv[0]. For instance, to run sh as a login
shell, one might run
-``` wmiir setsid -0 -sh sh
+``` wmiir setsid \-0 \-sh sh
If _-f_ is given, wmiir will fork into the background before
executing the command.
: proglist [--] <directory> ...
diff --git a/mk/hdr.mk b/mk/hdr.mk
index c4fced8..de45f7d 100644
--- a/mk/hdr.mk
+++ b/mk/hdr.mk
@@ -48,13 +48,14 @@ BINSH!= $(SHELLSEARCH)
SHELL := $(BINSH)
.SHELL: name=sh path=$(SHELL)
+all:
+
include $(ROOT)/config.mk
sinclude $(ROOT)/config.local.mk
sinclude $(shell echo .)depend
-.SILENT:
+#.SILENT:
.SUFFIXES: .$(SOEXT) .1 .3 .awk .build .c .clean .depend .install .man1 .man3 .o .o_pic .out .pdf .py .rc .sh .uninstall
-all:
.c.depend:
echo MKDEP $<
diff --git a/mk/python.mk b/mk/python.mk
index ae06599..999e819 100644
--- a/mk/python.mk
+++ b/mk/python.mk
@@ -6,7 +6,7 @@ clean: pyclean
.py.install:
echo PYTHON install $* $(PYPREFIX)
DESTDIR=$(DESTDIR); \
- $(DEBUG) $(PYTHON) $< install -c --root=$${DESTDIR:-/} $(PYPREFIX)
+ $(DEBUG) $(PYTHON) $< install -c --root=$${DESTDIR:-/} --install-layout=deb $(PYPREFIX)
pyclean:
echo CLEAN build/
rm -rf build
diff --git a/mk/wmii.mk b/mk/wmii.mk
index 862b422..b33bce5 100644
--- a/mk/wmii.mk
+++ b/mk/wmii.mk
@@ -10,7 +10,7 @@ WMII_HGVERSION!= echo $(VERS)
VERSION = $(WMII_HGVERSION)
COPYRIGHT = ©2010 Kris Maglione
-CONFDIR = wmii-hg
+CONFDIR = wmii
LOCALCONF = ~/.$(CONFDIR)
GLOBALCONF = $(ETC)/$(CONFDIR)
diff --git a/rc/wmiirc.sh b/rc/wmiirc.sh
index b56c581..f6a36c7 100644
--- a/rc/wmiirc.sh
+++ b/rc/wmiirc.sh
@@ -20,7 +20,7 @@ export WMII_NORMCOLORS='#000000 #c1c48b #81654f'
export WMII_FOCUSCOLORS='#000000 #81654f #000000'
export WMII_BACKGROUND='#333333'
-export WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
+export WMII_FONT='-*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-*'
set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS)
export WMII_TERM="@TERMINAL@"
@@ -107,11 +107,13 @@ Event Unresponsive
wmiir xwrite /client/$client/ctl slay &
fi
}&
+Event ScreenChange
+ wmiir xwrite /ctl wipescreens
Event Notice
- wmiir xwrite $noticebar $wi_arg
+ wmiir xwrite $noticebar "label $wi_arg"
kill $xpid 2>/dev/null # Let's hope this isn't reused...
- { sleep $noticetimeout; wmiir xwrite $noticebar ' '; }&
+ { sleep $noticetimeout; wmiir xwrite $noticebar 'label '; }&
xpid = $!
# Menus
diff --git a/test/Makefile b/test/Makefile
index b1d8d81..9c63f49 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -7,8 +7,7 @@ OFILES = ../cmd/util.o \
../cmd/wmii/map.o \
../cmd/wmii/x11.o
-LDFLAGS += $(OFILES) -lfmt -lutf -lbio $(LIBX11) -lXext
-CFLAGS += $(INCX11)
+LIBS += $(OFILES) -lfmt -lutf -lbio -lXext
include $(ROOT)/mk/many.mk