diff --git a/tag.c b/tag.c index 0c8481391..7ed97906a 100644 --- a/tag.c +++ b/tag.c @@ -293,6 +293,19 @@ tag_view_only(Tag *target) tag_view(target, True); } +void +tag_view_byindex(int screen, int dindex, Bool view) +{ + Tag *tag; + + if(dindex < 0) + return; + + for(tag = globalconf.screens[screen].tags; tag && dindex > 0; + tag = tag->next, dindex--); + tag_view(tag, view); +} + void tag_view_only_byindex(int screen, int dindex) { diff --git a/tag.h b/tag.h index f3d9bb48c..f24d9e0bd 100644 --- a/tag.h +++ b/tag.h @@ -29,6 +29,7 @@ Tag * tag_new(const char *, Layout *, double, int, int); void tag_view(Tag *, Bool); +void tag_view_byindex(int, int, Bool); void tag_push_to_screen(Tag *, int); Tag ** get_current_tags(int); void tag_client(Client *, Tag *);