Add circular option in section [tags] ; Make user able to turn off the 'tag_prev on first tag send to last tag' effect
This commit is contained in:
parent
da97ee762c
commit
eecde8774c
@ -192,6 +192,8 @@ config_tag(void)
|
|||||||
ks = fetch_section(sec, "tag");
|
ks = fetch_section(sec, "tag");
|
||||||
n = fetch_section_count(ks);
|
n = fetch_section_count(ks);
|
||||||
|
|
||||||
|
W->tag_circular = fetch_opt_first(sec, "1", "circular").boolean;
|
||||||
|
|
||||||
/* [mouse] */
|
/* [mouse] */
|
||||||
if((mb = fetch_section(sec, "mouse")))
|
if((mb = fetch_section(sec, "mouse")))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,7 +42,7 @@ string_to_opt(char *s)
|
|||||||
ret.fnum = strtod(s, NULL);
|
ret.fnum = strtod(s, NULL);
|
||||||
|
|
||||||
ret.boolean = (!strcmp(s, "true")
|
ret.boolean = (!strcmp(s, "true")
|
||||||
|| !strcmp(s, "true")
|
|| !strcmp(s, "True")
|
||||||
|| !strcmp(s, "TRUE")
|
|| !strcmp(s, "TRUE")
|
||||||
|| !strcmp(s, "1"));
|
|| !strcmp(s, "1"));
|
||||||
|
|
||||||
|
|||||||
@ -170,7 +170,7 @@ uicb_tag_next(Uicb cmd)
|
|||||||
|
|
||||||
if((t = TAILQ_NEXT(W->screen->seltag, next)))
|
if((t = TAILQ_NEXT(W->screen->seltag, next)))
|
||||||
tag_screen(W->screen, t);
|
tag_screen(W->screen, t);
|
||||||
else if( /* CIRCULAR OPTION */ 1)
|
else if(W->tag_circular)
|
||||||
tag_screen(W->screen, TAILQ_FIRST(&W->screen->tags));
|
tag_screen(W->screen, TAILQ_FIRST(&W->screen->tags));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ uicb_tag_prev(Uicb cmd)
|
|||||||
|
|
||||||
if((t = TAILQ_PREV(W->screen->seltag, tsub, next)))
|
if((t = TAILQ_PREV(W->screen->seltag, tsub, next)))
|
||||||
tag_screen(W->screen, t);
|
tag_screen(W->screen, t);
|
||||||
else if( /* CIRCULAR OPTION */ 1)
|
else if(W->tag_circular)
|
||||||
tag_screen(W->screen, TAILQ_LAST(&W->screen->tags, tsub));
|
tag_screen(W->screen, TAILQ_LAST(&W->screen->tags, tsub));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ uicb_tag_move_client_next(Uicb cmd)
|
|||||||
|
|
||||||
if((t = TAILQ_NEXT(W->screen->seltag, next)))
|
if((t = TAILQ_NEXT(W->screen->seltag, next)))
|
||||||
tag_client(t, W->client);
|
tag_client(t, W->client);
|
||||||
else if( /* CIRCULAR OPTION */ 1)
|
else if(W->tag_circular)
|
||||||
tag_client(TAILQ_FIRST(&W->screen->tags), W->client);
|
tag_client(TAILQ_FIRST(&W->screen->tags), W->client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ uicb_tag_move_client_prev(Uicb cmd)
|
|||||||
|
|
||||||
if((t = TAILQ_PREV(W->screen->seltag, tsub, next)))
|
if((t = TAILQ_PREV(W->screen->seltag, tsub, next)))
|
||||||
tag_client(t, W->client);
|
tag_client(t, W->client);
|
||||||
else if( /* CIRCULAR OPTION */ 1)
|
else if(W->tag_circular)
|
||||||
tag_client(TAILQ_LAST(&W->screen->tags, tsub), W->client);
|
tag_client(TAILQ_LAST(&W->screen->tags, tsub), W->client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -354,6 +354,8 @@ struct wmfs
|
|||||||
#define CFOCUS_CLICK 0x02
|
#define CFOCUS_CLICK 0x02
|
||||||
Flags cfocus; /* Focus configuration, can be set to 0, CFOCUS_ENTER or CFOCUS_CLICK*/
|
Flags cfocus; /* Focus configuration, can be set to 0, CFOCUS_ENTER or CFOCUS_CLICK*/
|
||||||
|
|
||||||
|
bool tag_circular;
|
||||||
|
|
||||||
/* Log file */
|
/* Log file */
|
||||||
FILE *log;
|
FILE *log;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user