mirror of https://github.com/0intro/wmii
Hg sucks at merging.
This commit is contained in:
parent
3ee60cd19c
commit
717e770e72
|
@ -5,7 +5,7 @@ name, and not to its source code or any other materials.
|
|||
When in doubt about any of these conditions or other matters
|
||||
of packaging or distrobution, , please contact the wmii
|
||||
mailing lists <wmii-hackers@suckless.org> or
|
||||
<wmii@suckless.org>.
|
||||
<wmii@suckless.org>, or Kris Maglione <fbsdaemon@gmail.com>.
|
||||
|
||||
Any binary distribution of wmii MUST have a properly set
|
||||
version string. This string may normally be set in
|
||||
|
|
1
Makefile
1
Makefile
|
@ -24,6 +24,5 @@ deb:
|
|||
dpkg-buildpackage -rfakeroot
|
||||
|
||||
include ${ROOT}/mk/dir.mk
|
||||
include ${ROOT}/mk/common.mk
|
||||
INSTDIRS = ${PDIRS}
|
||||
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
|
||||
* Copyright ©2006-2007 Kris Maglione <fbsdaemon@gmail.com>
|
||||
/* Copyright ©2006-2008 Kris Maglione <fbsdaemon@gmail.com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include "dat.h"
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <sys/limits.h>
|
||||
#include "fns.h"
|
||||
|
||||
static void place_frame(Frame *f);
|
||||
|
||||
Client*
|
||||
area_selclient(Area *a) {
|
||||
if(a && a->sel)
|
||||
|
@ -249,3 +247,4 @@ area_focus(Area *a) {
|
|||
event("ColumnFocus %d\n", area_idx(a));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -983,7 +983,8 @@ apply_tags(Client *c, const char *tags) {
|
|||
else
|
||||
if(!strcmp(buf+n, "!") || !strcmp(buf+n, "sel"))
|
||||
cur = screen->sel->name;
|
||||
else if(!Mbsearch(buf+n, badtags, bsstrcmp))
|
||||
else
|
||||
if(!Mbsearch(buf+n, badtags, bsstrcmp))
|
||||
cur = buf+n;
|
||||
|
||||
n = i + 1;
|
||||
|
|
|
@ -108,18 +108,8 @@ column_remove(Frame *f, bool arrange) {
|
|||
}
|
||||
}
|
||||
|
||||
static Handlers divhandler = {
|
||||
.bdown = bdown_event,
|
||||
.expose = expose_event,
|
||||
};
|
||||
|
||||
Area*
|
||||
column_new(View *v, Area *pos, uint w) {
|
||||
Area *a;
|
||||
|
||||
a = area_create(v, pos, w);
|
||||
if(!a)
|
||||
return nil;
|
||||
void
|
||||
column_detach(Frame *f) {
|
||||
|
||||
column_remove(f, true);
|
||||
}
|
||||
|
|
|
@ -235,6 +235,22 @@ struct View {
|
|||
Rectangle r;
|
||||
};
|
||||
|
||||
/* Yuck. */
|
||||
#define VECTOR(type, nam, c) \
|
||||
typedef struct Vector_##nam Vector_##nam; \
|
||||
struct Vector_##nam { \
|
||||
type* ary; \
|
||||
long n; \
|
||||
long size; \
|
||||
}; \
|
||||
void vector_##c##free(Vector_##nam*); \
|
||||
void vector_##c##init(Vector_##nam*); \
|
||||
void vector_##c##push(Vector_##nam*, type); \
|
||||
|
||||
VECTOR(long, long, l)
|
||||
VECTOR(Rectangle, rect, r)
|
||||
#undef VECTOR
|
||||
|
||||
#ifndef EXTERN
|
||||
# define EXTERN extern
|
||||
#endif
|
||||
|
|
|
@ -38,6 +38,7 @@ Client* client_create(XWindow, XWindowAttributes*);
|
|||
void client_destroy(Client*);
|
||||
bool client_floats_p(Client*);
|
||||
void client_focus(Client*);
|
||||
Frame* client_groupframe(Client*, View*);
|
||||
void client_kill(Client*, bool);
|
||||
void client_manage(Client*);
|
||||
void client_map(Client*);
|
||||
|
|
|
@ -659,7 +659,7 @@ fs_read(Ixp9Req *r) {
|
|||
respond(r, nil);
|
||||
return;
|
||||
case FsFRctl:
|
||||
buf = root_readctl();
|
||||
buf = readctl_root();
|
||||
write_buf(r, buf, strlen(buf));
|
||||
respond(r, nil);
|
||||
return;
|
||||
|
|
|
@ -88,3 +88,32 @@ get_sticky(Rectangle src, Rectangle dst) {
|
|||
|
||||
return stickycorner;
|
||||
}
|
||||
|
||||
/* XXX: These don't belong here. */
|
||||
/* Blech. */
|
||||
#define VECTOR(type, nam, c) \
|
||||
void \
|
||||
vector_##c##init(Vector_##nam *v) { \
|
||||
memset(v, 0, sizeof *v); \
|
||||
} \
|
||||
\
|
||||
void \
|
||||
vector_##c##free(Vector_##nam *v) { \
|
||||
free(v->ary); \
|
||||
memset(v, 0, sizeof *v); \
|
||||
} \
|
||||
\
|
||||
void \
|
||||
vector_##c##push(Vector_##nam *v, type val) { \
|
||||
if(v->n == v->size) { \
|
||||
if(v->size == 0) \
|
||||
v->size = 2; \
|
||||
v->size <<= 2; \
|
||||
v->ary = erealloc(v->ary, v->size * sizeof *v->ary); \
|
||||
} \
|
||||
v->ary[v->n++] = val; \
|
||||
} \
|
||||
|
||||
VECTOR(long, long, l)
|
||||
VECTOR(Rectangle, rect, r)
|
||||
|
||||
|
|
|
@ -705,3 +705,44 @@ msg_sendframe(Frame *f, int sym, bool swap) {
|
|||
view_update_all();
|
||||
return nil;
|
||||
}
|
||||
|
||||
char*
|
||||
readctl_root(void) {
|
||||
bufclear();
|
||||
bufprint("view %s\n", screen->sel->name);
|
||||
bufprint("focuscolors %s\n", def.focuscolor.colstr);
|
||||
bufprint("normcolors %s\n", def.normcolor.colstr);
|
||||
bufprint("font %s\n", def.font->name);
|
||||
bufprint("grabmod %s\n", def.grabmod);
|
||||
bufprint("border %d\n", def.border);
|
||||
if(debug) {
|
||||
bufprint("debug ");
|
||||
printdebug();
|
||||
bufprint("\n");
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
char*
|
||||
readctl_view(View *v) {
|
||||
Area *a;
|
||||
uint i;
|
||||
|
||||
bufclear();
|
||||
bufprint("%s\n", v->name);
|
||||
|
||||
/* select <area>[ <frame>] */
|
||||
bufprint("select %s", area_name(v->sel));
|
||||
if(v->sel->sel)
|
||||
bufprint(" %d", frame_idx(v->sel->sel));
|
||||
bufprint("\n");
|
||||
|
||||
/* select client <client> */
|
||||
if(v->sel->sel)
|
||||
bufprint("select client %C\n", v->sel->sel->client);
|
||||
|
||||
for(a = v->area->next, i = 1; a; a = a->next, i++)
|
||||
bufprint("colmode %d %s\n", i, colmode2str(a->mode));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ horiz:
|
|||
|
||||
r = fw->fprev_r;
|
||||
if(f->aprev) {
|
||||
f->aprev->r.max.y = fw->fr.min.y;
|
||||
f->aprev->r.max.y = r.min.y;
|
||||
frame_resize(f->aprev, f->aprev->r);
|
||||
}else
|
||||
r.min.y = f->area->r.min.y;
|
||||
|
|
|
@ -42,6 +42,7 @@ update_rules(Rule **rule, const char *data) {
|
|||
char *value_end = value + sizeof(value) - 1;
|
||||
char *r, *v;
|
||||
const char *p;
|
||||
char c;
|
||||
|
||||
SET(r);
|
||||
SET(v);
|
||||
|
@ -56,6 +57,10 @@ update_rules(Rule **rule, const char *data) {
|
|||
state = IGNORE;
|
||||
for(p = data; (c = *p); p++)
|
||||
switch(state) {
|
||||
case COMMENT:
|
||||
if(c == '\n')
|
||||
state = IGNORE;
|
||||
break;
|
||||
case IGNORE:
|
||||
if(c == '#')
|
||||
state = COMMENT;
|
||||
|
@ -75,6 +80,7 @@ update_rules(Rule **rule, const char *data) {
|
|||
else if(c == '/') {
|
||||
*r = 0;
|
||||
state = IGNORE;
|
||||
break;
|
||||
}
|
||||
if(r < regex_end)
|
||||
*r++ = c;
|
||||
|
|
|
@ -47,7 +47,7 @@ toutf8n(char *str, size_t nstr) {
|
|||
}
|
||||
|
||||
char*
|
||||
toutf8(char *str) {
|
||||
toutf8(const char *str) {
|
||||
return toutf8n(str, strlen(str));
|
||||
}
|
||||
|
||||
|
|
|
@ -3,15 +3,16 @@
|
|||
|
||||
export home="$HOME"
|
||||
lconf="$home/.wmii-CONFVERSION"
|
||||
gconf="CONFPREFIX/.wmii-CONFVERSION"
|
||||
gconf="CONFPREFIX/wmii-CONFVERSION"
|
||||
|
||||
export WMII_CONFPATH="$conf:$gconf"
|
||||
export WMII_CONFPATH="$lconf:$gconf"
|
||||
export POSIXLY_CORRECT=gnu_hippies
|
||||
|
||||
which="`which which`"
|
||||
if wmii9rc; then
|
||||
WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which rc.wmii`
|
||||
WMIIRC=`PATH="$WMII_CONFPATH:$PATH" $which rc.wmii`
|
||||
else
|
||||
WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which wmiirc`
|
||||
WMIIRC=`PATH="$WMII_CONFPATH:$PATH" $which wmiirc`
|
||||
fi
|
||||
|
||||
mkdir $conf 2>/dev/null && $gconf/welcome &
|
||||
|
|
|
@ -18,7 +18,6 @@ CFLAGS += $(DEBUGCFLAGS)
|
|||
LDFLAGS += -g $(LIBS)
|
||||
SOLDFLAGS += $(LDFLAGS)
|
||||
STATIC = -static
|
||||
MKDEP = cpp -M
|
||||
|
||||
# Compiler, Linker. Linker should usually *not* be ld.
|
||||
CC = cc -c
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* Copyright ©2007-2008 Kris Maglione <fbsdaemon@gmail.com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#define nil ((void*)0)
|
||||
#define nelem(ary) (sizeof(ary) / sizeof(*ary))
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* Copyright ©2007-2008 Kris Maglione <fbsdaemon@gmail.com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#define Window XWindow
|
||||
#define Font XFont
|
||||
#define Screen XScreen
|
||||
|
|
Loading…
Reference in New Issue