new uicb: tag_create
This commit is contained in:
parent
437bc5c22c
commit
5d9ef8b5d5
18
tag.c
18
tag.c
|
@ -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
1
tag.h
|
@ -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
1
uicb.c
|
@ -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},
|
||||
|
|
Loading…
Reference in New Issue