Add uicb client move to next/prev tag
This commit is contained in:
parent
1585802bf0
commit
36c0e0671d
12
src/config.h
12
src/config.h
@ -28,11 +28,13 @@ static const struct { char *name; void (*func)(Uicb cmd); } uicb_list[] =
|
||||
{ "reload", uicb_reload },
|
||||
|
||||
/* Tag */
|
||||
{ "tag_set", uicb_tag_set },
|
||||
{ "tag", uicb_tag_set_with_name },
|
||||
{ "tag_next", uicb_tag_next },
|
||||
{ "tag_prev", uicb_tag_prev },
|
||||
{ "tag_client", uicb_tag_client },
|
||||
{ "tag_set", uicb_tag_set },
|
||||
{ "tag", uicb_tag_set_with_name },
|
||||
{ "tag_next", uicb_tag_next },
|
||||
{ "tag_prev", uicb_tag_prev },
|
||||
{ "tag_client", uicb_tag_client },
|
||||
{ "tag_move_client_next", uicb_tag_move_client_next },
|
||||
{ "tag_move_client_prev", uicb_tag_move_client_prev },
|
||||
|
||||
/* Layout */
|
||||
{ "layout_vmirror", uicb_layout_vmirror },
|
||||
|
||||
29
src/tag.c
29
src/tag.c
@ -176,6 +176,35 @@ uicb_tag_client(Uicb cmd)
|
||||
tag_client(t, W->client);
|
||||
}
|
||||
|
||||
void
|
||||
uicb_tag_move_client_next(Uicb cmd)
|
||||
{
|
||||
(void)cmd;
|
||||
struct tag *t;
|
||||
|
||||
/* Remove from current tag */
|
||||
tag_client(NULL, W->client);
|
||||
|
||||
if((t = TAILQ_PREV(W->screen->seltag, tsub, next)))
|
||||
tag_client(t, W->client);
|
||||
else if( /* CIRCULAR OPTION */ 1)
|
||||
tag_client(TAILQ_FIRST(&W->screen->tags, tsub), W->client);
|
||||
}
|
||||
|
||||
void
|
||||
uicb_tag_move_client_prev(Uicb cmd)
|
||||
{
|
||||
(void)cmd;
|
||||
struct tag *t;
|
||||
|
||||
/* Remove from current tag */
|
||||
tag_client(NULL, W->client);
|
||||
|
||||
if((t = TAILQ_PREV(W->screen->seltag, tsub, next)))
|
||||
tag_client(t, W->client);
|
||||
else if( /* CIRCULAR OPTION */ 1)
|
||||
tag_client(TAILQ_LAST(&W->screen->tags, tsub), W->client);
|
||||
}
|
||||
|
||||
static void
|
||||
tag_remove(struct tag *t)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user