new uicb: tag_create

This commit is contained in:
Julien Danjou 2008-01-02 17:10:32 +01:00
parent 437bc5c22c
commit 5d9ef8b5d5
3 changed files with 20 additions and 0 deletions

18
tag.c
View File

@ -404,4 +404,22 @@ uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused)))
p_delete(&curtags);
ewmh_update_net_current_desktop(get_phys_screen(screen));
}
void
uicb_tag_create(int screen, char *arg)
{
Tag *last_tag, *tag;
if(!a_strlen(arg))
return;
for(last_tag = globalconf.screens[screen].tags; last_tag && last_tag->next; last_tag = last_tag->next);
last_tag->next = tag = p_new(Tag, 1);
tag->name = a_strdup(arg);
tag->layout = globalconf.screens[screen].layouts;
tag->mwfact = 0.5;
tag->nmaster = 1;
tag->ncol = 1;
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

1
tag.h
View File

@ -43,6 +43,7 @@ Uicb uicb_tag_view;
Uicb uicb_tag_prev_selected;
Uicb uicb_tag_viewnext;
Uicb uicb_tag_viewprev;
Uicb uicb_tag_create;
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

1
uicb.c
View File

@ -54,6 +54,7 @@ const NameFuncLink UicbList[] =
{"tag_viewprev_selected", uicb_tag_prev_selected},
{"tag_viewprev", uicb_tag_viewprev},
{"tag_viewnext", uicb_tag_viewnext},
{"tag_create", uicb_tag_create},
/* layout.c */
{"tag_setlayout", uicb_tag_setlayout},
{"client_focusnext", uicb_client_focusnext},