mirror of https://github.com/0intro/wmii
applied several namespace changes
This commit is contained in:
parent
9e18d437a7
commit
cb1510d077
|
@ -17,18 +17,18 @@ Area *alloc_area(Page *p, XRectangle * r, char *layout)
|
|||
|
||||
a->rect = *r;
|
||||
a->page = p;
|
||||
snprintf(buf, MAX_BUF, "/%s/a/%d", p->file[P_PREFIX]->name, id);
|
||||
snprintf(buf, MAX_BUF, "/%s/layout/%d", p->file[P_PREFIX]->name, id);
|
||||
a->file[A_PREFIX] = ixp_create(ixps, buf);
|
||||
snprintf(buf, MAX_BUF, "/%s/a/%d/f", p->file[P_PREFIX]->name, id);
|
||||
snprintf(buf, MAX_BUF, "/%s/layout/%d/frame", p->file[P_PREFIX]->name, id);
|
||||
a->file[A_FRAME_PREFIX] = ixp_create(ixps, buf);
|
||||
snprintf(buf, MAX_BUF, "/%s/a/%d/f/sel", p->file[P_PREFIX]->name, id);
|
||||
snprintf(buf, MAX_BUF, "/%s/layout/%d/frame/sel", p->file[P_PREFIX]->name, id);
|
||||
a->file[A_SEL_FRAME] = ixp_create(ixps, buf);
|
||||
a->file[A_SEL_FRAME]->bind = 1;
|
||||
snprintf(buf, MAX_BUF, "/%s/a/%d/ctl", p->file[P_PREFIX]->name, id);
|
||||
snprintf(buf, MAX_BUF, "/%s/layout/%d/ctl", p->file[P_PREFIX]->name, id);
|
||||
a->file[A_CTL] = ixp_create(ixps, buf);
|
||||
snprintf(buf, MAX_BUF, "/%s/a/%d/geometry", p->file[P_PREFIX]->name, id);
|
||||
snprintf(buf, MAX_BUF, "/%s/layout/%d/geometry", p->file[P_PREFIX]->name, id);
|
||||
a->file[A_GEOMETRY] = ixp_create(ixps, buf);
|
||||
snprintf(buf, MAX_BUF, "/%s/a/%d/layout", p->file[P_PREFIX]->name, id);
|
||||
snprintf(buf, MAX_BUF, "/%s/layout/%d/name", p->file[P_PREFIX]->name, id);
|
||||
a->file[A_LAYOUT] = wmii_create_ixpfile(ixps, buf, layout);
|
||||
a->layout = get_layout(layout);
|
||||
a->layout->init(a);
|
||||
|
|
|
@ -18,10 +18,10 @@ Client *alloc_client(Window w)
|
|||
Client *c = (Client *) cext_emallocz(sizeof(Client));
|
||||
|
||||
c->win = w;
|
||||
snprintf(buf, MAX_BUF, "/detached/c/%d", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/client/%d", id);
|
||||
c->file[C_PREFIX] = ixp_create(ixps, buf);
|
||||
win_prop(dpy, c->win, XA_WM_NAME, buf2, MAX_BUF);
|
||||
snprintf(buf, MAX_BUF, "/detached/c/%d/name", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/client/%d/name", id);
|
||||
c->file[C_NAME] = wmii_create_ixpfile(ixps, buf, buf2);
|
||||
id++;
|
||||
cext_attach_item(&clients, c);
|
||||
|
|
|
@ -31,50 +31,50 @@ Frame *alloc_frame(XRectangle * r)
|
|||
f->rect = *r;
|
||||
f->cursor = normal_cursor;
|
||||
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d", id);
|
||||
f->file[F_PREFIX] = ixp_create(ixps, buf);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/c", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/client", id);
|
||||
f->file[F_CLIENT_PREFIX] = ixp_create(ixps, buf);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/c/sel", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/client/sel", id);
|
||||
f->file[F_SEL_CLIENT] = ixp_create(ixps, buf);
|
||||
f->file[F_SEL_CLIENT]->bind = 1;
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/ctl", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/ctl", id);
|
||||
f->file[F_CTL] = ixp_create(ixps, buf);
|
||||
f->file[F_CTL]->after_write = handle_after_write_frame;
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/geometry", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/geometry", id);
|
||||
f->file[F_GEOMETRY] = ixp_create(ixps, buf);
|
||||
f->file[F_GEOMETRY]->before_read = handle_before_read_frame;
|
||||
f->file[F_GEOMETRY]->after_write = handle_after_write_frame;
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/border", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/border", id);
|
||||
f->file[F_BORDER] = wmii_create_ixpfile(ixps, buf, def[WM_BORDER]->content);
|
||||
f->file[F_BORDER]->after_write = handle_after_write_frame;
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/tab", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/tab", id);
|
||||
f->file[F_TAB] = wmii_create_ixpfile(ixps, buf, def[WM_TAB]->content);
|
||||
f->file[F_TAB]->after_write = handle_after_write_frame;
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/handleinc", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/handleinc", id);
|
||||
f->file[F_HANDLE_INC] = wmii_create_ixpfile(ixps, buf, def[WM_HANDLE_INC]->content);
|
||||
f->file[F_HANDLE_INC]->after_write = handle_after_write_frame;
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/locked", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/locked", id);
|
||||
f->file[F_LOCKED] = wmii_create_ixpfile(ixps, buf, def[WM_LOCKED]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/sstyle/bgcolor", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/sstyle/bgcolor", id);
|
||||
f->file[F_SEL_BG_COLOR] = wmii_create_ixpfile(ixps, buf, def[WM_SEL_BG_COLOR]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/sstyle/fgcolor", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/sstyle/fgcolor", id);
|
||||
f->file[F_SEL_FG_COLOR] = wmii_create_ixpfile(ixps, buf, def[WM_SEL_FG_COLOR]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/sstyle/bordercolor", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/sstyle/bordercolor", id);
|
||||
f->file[F_SEL_BORDER_COLOR] = wmii_create_ixpfile(ixps, buf, def[WM_SEL_BORDER_COLOR]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/nstyle/bgcolor", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/nstyle/bgcolor", id);
|
||||
f->file[F_NORM_BG_COLOR] = wmii_create_ixpfile(ixps, buf, def[WM_NORM_BG_COLOR]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/nstyle/fgcolor", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/nstyle/fgcolor", id);
|
||||
f->file[F_NORM_FG_COLOR] = wmii_create_ixpfile(ixps, buf, def[WM_NORM_FG_COLOR]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/nstyle/bordercolor", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/nstyle/bordercolor", id);
|
||||
f->file[F_NORM_BORDER_COLOR] = wmii_create_ixpfile(ixps, buf, def[WM_NORM_BORDER_COLOR]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/event/b2press", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/event/b2press", id);
|
||||
f->file[F_EVENT_B2PRESS] = wmii_create_ixpfile(ixps, buf, def[WM_EVENT_B2PRESS]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/event/b3press", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/event/b3press", id);
|
||||
f->file[F_EVENT_B3PRESS] = wmii_create_ixpfile(ixps, buf, def[WM_EVENT_B3PRESS]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/event/b4press", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/event/b4press", id);
|
||||
f->file[F_EVENT_B4PRESS] = wmii_create_ixpfile(ixps, buf, def[WM_EVENT_B4PRESS]->content);
|
||||
snprintf(buf, MAX_BUF, "/detached/f/%d/event/b5press", id);
|
||||
snprintf(buf, MAX_BUF, "/detached/frame/%d/event/b5press", id);
|
||||
f->file[F_EVENT_B5PRESS] = wmii_create_ixpfile(ixps, buf, def[WM_EVENT_B5PRESS]->content);
|
||||
id++;
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ Page *alloc_page()
|
|||
p->file[P_PREFIX] = ixp_create(ixps, buf);
|
||||
snprintf(buf, sizeof(buf), "/%d/name", id);
|
||||
p->file[P_NAME] = wmii_create_ixpfile(ixps, buf, buf2);
|
||||
snprintf(buf, sizeof(buf), "/%d/a/", id);
|
||||
snprintf(buf, sizeof(buf), "/%d/layout/", id);
|
||||
p->file[P_AREA_PREFIX] = ixp_create(ixps, buf);
|
||||
snprintf(buf, sizeof(buf), "/%d/a/sel", id);
|
||||
snprintf(buf, sizeof(buf), "/%d/layout/sel", id);
|
||||
p->file[P_SEL_AREA] = ixp_create(ixps, buf);
|
||||
p->file[P_SEL_AREA]->bind = 1; /* mount point */
|
||||
snprintf(buf, sizeof(buf), "/%d/ctl", id);
|
||||
|
|
|
@ -570,8 +570,8 @@ static void init_cursors()
|
|||
|
||||
static void init_default()
|
||||
{
|
||||
def[WM_DETACHED_FRAME] = ixp_create(ixps, "/detached/f");
|
||||
def[WM_DETACHED_CLIENT] = ixp_create(ixps, "/detached/c");
|
||||
def[WM_DETACHED_FRAME] = ixp_create(ixps, "/detached/frame");
|
||||
def[WM_DETACHED_CLIENT] = ixp_create(ixps, "/detached/client");
|
||||
def[WM_TRANS_COLOR] = wmii_create_ixpfile(ixps, "/default/transcolor", BLITZ_SEL_FG_COLOR);
|
||||
def[WM_TRANS_COLOR]->after_write = handle_after_write;
|
||||
def[WM_SEL_BG_COLOR] = wmii_create_ixpfile(ixps, "/default/sstyle/bgcolor", BLITZ_SEL_BG_COLOR);
|
||||
|
|
66
rc/wmirc
66
rc/wmirc
|
@ -1,16 +1,16 @@
|
|||
#!9PREFIX/bin/rc
|
||||
# configure wmii
|
||||
|
||||
TAB=1
|
||||
TAB=0
|
||||
BAR_HEIGHT=16
|
||||
|
||||
SEL_BG_COLOR='#307080'
|
||||
SEL_FG_COLOR='#fefefe'
|
||||
SEL_BORDER_COLOR='#5090a0'
|
||||
NORM_BG_COLOR='#004050'
|
||||
NORM_FG_COLOR='#cccccc'
|
||||
NORM_BORDER_COLOR='#206070'
|
||||
FONT='fixed'
|
||||
SEL_BG_COLOR='#101010'
|
||||
SEL_FG_COLOR='#66ff00'
|
||||
SEL_BORDER_COLOR='#66ff00'
|
||||
NORM_BG_COLOR='#000000'
|
||||
NORM_FG_COLOR='#eeeeee'
|
||||
NORM_BORDER_COLOR='#111111'
|
||||
FONT='-artwiz-snap-normal-*-*-*-*-*-*-*-*-*-*-*'
|
||||
|
||||
MODKEY=M
|
||||
NORTHKEY=k
|
||||
|
@ -100,22 +100,22 @@ wmir write /bar/ctl 'display 1'
|
|||
# default layout (column, float):
|
||||
wmir write /wm/default/layout column
|
||||
wmir write /wm/default/font $FONT
|
||||
wmir write /wm/default/transcolor $SEL_BG_COLOR
|
||||
wmir write /wm/default/transcolor $SEL_BORDER_COLOR
|
||||
wmir write /wm/default/handleinc 1
|
||||
|
||||
wmir write /wm/default/border 1
|
||||
wmir write /wm/default/pagegeometry '0,0,east,south-'^$BAR_HEIGHT
|
||||
wmir write /wm/event/clientupdate \
|
||||
'text=`{wmir read /wm/sel/a/sel/f/sel/c/sel/name} \
|
||||
'text=`{wmir read /wm/sel/layout/sel/frame/sel/client/sel/name} \
|
||||
wmir write /bar/'^$clab^'/data $"text'
|
||||
wmir write /wm/event/pageupdate \
|
||||
'text=`{wmir read /wm/sel/name} ^ \
|
||||
`{wmir read /wm/sel/a/sel/layout|awk ''{print substr($0,0,1)}''} ^ \
|
||||
`{wmir read /wm/sel/layout/sel/layout|awk ''{print substr($0,0,1)}''} ^ \
|
||||
`{wmir read /keys/lookup|awk ''{print substr($0,7,1)}''} \
|
||||
wmir write /bar/'^$plab^'/data $"text'
|
||||
|
||||
for(frame in `{wmir read /wm/sel/a/sel | grep '^[0-9]'})
|
||||
framesconf /wm/sel/a/sel/$frame refresh
|
||||
for(frame in `{wmir read /wm/sel/layout/sel | grep '^[0-9]'})
|
||||
framesconf /wm/sel/layout/sel/$frame refresh
|
||||
frameconf /wm/default norefresh
|
||||
|
||||
|
||||
|
@ -125,21 +125,21 @@ kbind bare $MODKEY-Escape 'kmode normal'
|
|||
|
||||
kbind move Escape 'kmode normal'
|
||||
kbind move $MODKEY-C-r 'kmode resize'
|
||||
kbind move $NORTHKEY 'wmir write /wm/sel/a/sel/f/sel/geometry -0,-30,-0,-0'
|
||||
kbind move $SOUTHKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +0,+30,+0,+0'
|
||||
kbind move $WESTKEY 'wmir write /wm/sel/a/sel/f/sel/geometry -40,-0,-0,-0'
|
||||
kbind move $EASTKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +40,+0,+0,+0'
|
||||
kbind move S-$NORTHKEY 'wmir write /wm/sel/a/sel/f/sel/geometry -0,north,-0,-0'
|
||||
kbind move S-$SOUTHKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +0,south-'^$BAR_HEIGHT^',+0,+0'
|
||||
kbind move S-$WESTKEY 'wmir write /wm/sel/a/sel/f/sel/geometry west,-0,-0,-0'
|
||||
kbind move S-$EASTKEY 'wmir write /wm/sel/a/sel/f/sel/geometry east,+0,+0,+0'
|
||||
kbind move $NORTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry -0,-30,-0,-0'
|
||||
kbind move $SOUTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +0,+30,+0,+0'
|
||||
kbind move $WESTKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry -40,-0,-0,-0'
|
||||
kbind move $EASTKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +40,+0,+0,+0'
|
||||
kbind move S-$NORTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry -0,north,-0,-0'
|
||||
kbind move S-$SOUTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +0,south-'^$BAR_HEIGHT^',+0,+0'
|
||||
kbind move S-$WESTKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry west,-0,-0,-0'
|
||||
kbind move S-$EASTKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry east,+0,+0,+0'
|
||||
|
||||
kbind resize Escape 'kmode normal'
|
||||
kbind resize $MODKEY-C-m 'kmode move'
|
||||
kbind resize $NORTHKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +0,+0,+0,-30'
|
||||
kbind resize $SOUTHKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +0,+0,+0,+30'
|
||||
kbind resize $WESTKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +0,+0,-40,+0'
|
||||
kbind resize $EASTKEY 'wmir write /wm/sel/a/sel/f/sel/geometry +0,+0,+40,+0'
|
||||
kbind resize $NORTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +0,+0,+0,-30'
|
||||
kbind resize $SOUTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +0,+0,+0,+30'
|
||||
kbind resize $WESTKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +0,+0,-40,+0'
|
||||
kbind resize $EASTKEY 'wmir write /wm/sel/layout/sel/frame/sel/geometry +0,+0,+40,+0'
|
||||
|
||||
kbind normal $MODKEY-C-b 'kmode bare'
|
||||
kbind normal $MODKEY-C-m 'kmode move'
|
||||
|
@ -149,22 +149,22 @@ kbind normal $MODKEY-C-p 'wmir write /menu/precmd extern; wmir write /menu/looku
|
|||
kbind normal $MODKEY-C-c 'wmir write /wm/ctl close'
|
||||
kbind normal $MODKEY-C-q,y quit
|
||||
kbind normal $MODKEY-C-w,y wmirc
|
||||
kbind normal $MODKEY-t 'extern xterm ''+sb'' -bg ''#003040'' -fg ''#dddddd'' -cr ''#408090'' -sl 4000'
|
||||
kbind normal $MODKEY-t 'extern urxvt ''+sb'' -bg ''#000000'' -fg ''#ffffff'' -cr ''#ffffff'' -sl 4000 -fn -artwiz-smoothansi-*-*-*-*-*-*-*-*-*-*-*-*'
|
||||
kbind normal $MODKEY-d 'wmir write /wm/ctl detach'
|
||||
kbind normal $MODKEY-a 'wmir write /wm/ctl attach'
|
||||
kbind normal $MODKEY-S-a 'wmir write /wm/ctl icons'
|
||||
kbind normal $MODKEY-Return 'wmir write /wm/sel/ctl ''select zoomed'''
|
||||
kbind normal $MODKEY-C-y 'wmir write /wm/ctl new'
|
||||
kbind normal $MODKEY-u 'wmir write /wm/sel/a/sel/f/sel/locked 0'
|
||||
kbind normal $MODKEY-S-u 'wmir write /wm/sel/a/sel/f/sel/locked 1'
|
||||
kbind normal $MODKEY-u 'wmir write /wm/sel/layout/sel/frame/sel/locked 0'
|
||||
kbind normal $MODKEY-S-u 'wmir write /wm/sel/layout/sel/frame/sel/locked 1'
|
||||
kbind normal $MODKEY-$WESTKEY 'wmir write /wm/ctl ''select prev'''
|
||||
kbind normal $MODKEY-$EASTKEY 'wmir write /wm/ctl ''select next'''
|
||||
kbind normal $MODKEY-Tab 'wmir write /wm/sel/ctl ''select next'''
|
||||
kbind normal $MODKEY-$SOUTHKEY 'wmir write /wm/sel/ctl ''select next'''
|
||||
kbind normal $MODKEY-$NORTHKEY 'wmir write /wm/sel/ctl ''select prev'''
|
||||
kbind normal $MODKEY-S-Tab 'wmir write /wm/sel/a/sel/f/sel/ctl ''select next'''
|
||||
kbind normal $MODKEY-S-$SOUTHKEY 'wmir write /wm/sel/a/sel/f/sel/ctl ''select next'''
|
||||
kbind normal $MODKEY-S-$NORTHKEY 'wmir write /wm/sel/a/sel/f/sel/ctl ''select prev'''
|
||||
kbind normal $MODKEY-S-Tab 'wmir write /wm/sel/layout/sel/frame/sel/ctl ''select next'''
|
||||
kbind normal $MODKEY-S-$SOUTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/ctl ''select next'''
|
||||
kbind normal $MODKEY-S-$NORTHKEY 'wmir write /wm/sel/layout/sel/frame/sel/ctl ''select prev'''
|
||||
kbind normal $MODKEY-space 'wmir write /wm/sel/ctl ''select toggled'''
|
||||
kbind normal $MODKEY-S-p 'wmir write /wm/ctl pager'
|
||||
for(i in 0 1 2 3 4 5 6 7 8 9) {
|
||||
|
@ -186,5 +186,7 @@ normstyle /menu/nstyle >[2]/dev/null
|
|||
selstyle /menu/sstyle >[2]/dev/null
|
||||
|
||||
# MISC
|
||||
xsetroot -mod 2 2 -fg '#003040' -bg '#004050'
|
||||
feh --bg-scale $HOME/wallpaper/bg.png
|
||||
status &
|
||||
#mpc && status-mpd &
|
||||
urxvt '+sb' -bg '#000000' -fg '#ffffff' -cr '#ffffff' -sl 4000 -fn -artwiz-smoothansi-*-*-*-*-*-*-*-*-*-*-*-*&
|
||||
|
|
Loading…
Reference in New Issue