void uicb_tag_prev(Uicb cmd) { (void)cmd; struct tag *t; if((t = TAILQ_PREV(W->screen->seltag, tsub, next))) tag_screen(W->screen, t); else if( /* CIRCULAR OPTION */ 1) tag_screen(W->screen, TAILQ_LAST(&W->screen->tags, tsub)); }
void uicb_tag_next(Uicb cmd) { (void)cmd; struct tag *t; if((t = TAILQ_NEXT(W->screen->seltag, next))) tag_screen(W->screen, t); else if( /* CIRCULAR OPTION */ 1) tag_screen(W->screen, TAILQ_FIRST(&W->screen->tags)); }
void uicb_tag_prev(Uicb cmd) { (void)cmd; struct tag *t; if((t = TAILQ_PREV(W->screen->seltag, tsub, next))) tag_screen(W->screen, t); else if(W->flags & WMFS_TAGCIRC) tag_screen(W->screen, TAILQ_LAST(&W->screen->tags, tsub)); }
void uicb_tag_next(Uicb cmd) { (void)cmd; struct tag *t; if((t = TAILQ_NEXT(W->screen->seltag, next))) tag_screen(W->screen, t); else if(W->flags & WMFS_TAGCIRC) tag_screen(W->screen, TAILQ_FIRST(&W->screen->tags)); }
void uicb_tag_click(Uicb cmd) { (void)cmd; struct tag *t; if((t = (struct tag*)W->last_clicked_barwin->ptr) && t->screen == W->screen) tag_screen(W->screen, t); }
void uicb_tag_set_with_name(Uicb cmd) { struct tag *t; TAILQ_FOREACH(t, &W->screen->tags, next) if(!strcmp(cmd, t->name)) { tag_screen(W->screen, t); return; } }
void uicb_tag_set(Uicb cmd) { int i = 0, n = ATOI(cmd); struct tag *t; TAILQ_FOREACH(t, &W->screen->tags, next) if(i++ == n) { tag_screen(W->screen, t); return; } }
void uicb_tag_del(Uicb cmd) { struct infobar *i; struct tag *t = W->screen->seltag; (void)cmd; if(SLIST_EMPTY(&t->clients) && TAILQ_NEXT(TAILQ_FIRST(&W->screen->tags), next)) { tag_screen(W->screen, TAILQ_NEXT(t, next)); tag_remove(t); W->screen->flags |= SCREEN_TAG_UPDATE; SLIST_FOREACH(i, &W->screen->infobars, next) infobar_elem_reinit(i); W->screen->flags ^= SCREEN_TAG_UPDATE; } }