Add uicb client move to next/prev tag
This commit is contained in:
parent
1585802bf0
commit
36c0e0671d
@ -33,6 +33,8 @@ static const struct { char *name; void (*func)(Uicb cmd); } uicb_list[] =
|
|||||||
{ "tag_next", uicb_tag_next },
|
{ "tag_next", uicb_tag_next },
|
||||||
{ "tag_prev", uicb_tag_prev },
|
{ "tag_prev", uicb_tag_prev },
|
||||||
{ "tag_client", uicb_tag_client },
|
{ "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 */
|
||||||
{ "layout_vmirror", uicb_layout_vmirror },
|
{ "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);
|
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
|
static void
|
||||||
tag_remove(struct tag *t)
|
tag_remove(struct tag *t)
|
||||||
|
|||||||
@ -30,6 +30,8 @@ void uicb_tag_set_with_name(Uicb cmd);
|
|||||||
void uicb_tag_next(Uicb cmd);
|
void uicb_tag_next(Uicb cmd);
|
||||||
void uicb_tag_prev(Uicb cmd);
|
void uicb_tag_prev(Uicb cmd);
|
||||||
void uicb_tag_client(Uicb cmd);
|
void uicb_tag_client(Uicb cmd);
|
||||||
|
void uicb_tag_move_client_next(Uicb cmd);
|
||||||
|
void uicb_tag_move_client_prev(Uicb cmd);
|
||||||
|
|
||||||
|
|
||||||
#endif /* TAG_H */
|
#endif /* TAG_H */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user