{"id":16974354,"url":"https://github.com/jcrd/awesome-viewport","last_synced_at":"2026-02-20T07:30:17.503Z","repository":{"id":97083547,"uuid":"208863258","full_name":"jcrd/awesome-viewport","owner":"jcrd","description":"AwesomeWM library for managing tags based on viewports","archived":false,"fork":false,"pushed_at":"2020-12-15T16:02:49.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-22T16:09:23.272Z","etag":null,"topics":["awesomewm","lua","tags"],"latest_commit_sha":null,"homepage":"https://jcrd.github.io/awesome-viewport/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcrd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-16T17:56:01.000Z","updated_at":"2021-02-02T19:59:17.000Z","dependencies_parsed_at":"2024-01-14T13:37:59.926Z","dependency_job_id":"c4f3f96d-260b-49b1-b7cf-6f0baf1557d0","html_url":"https://github.com/jcrd/awesome-viewport","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcrd%2Fawesome-viewport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcrd%2Fawesome-viewport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcrd%2Fawesome-viewport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcrd%2Fawesome-viewport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcrd","download_url":"https://codeload.github.com/jcrd/awesome-viewport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239680976,"owners_count":19679508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesomewm","lua","tags"],"created_at":"2024-10-14T01:06:16.430Z","updated_at":"2026-02-20T07:30:17.445Z","avatar_url":"https://github.com/jcrd.png","language":"Lua","funding_links":[],"categories":["Window Mangement"],"sub_categories":["Tag Management"],"readme":"# awesome-viewport\n\nawesome-viewport is a library for [Awesome](https://github.com/awesomeWM/awesome)\nwindow manager that manages tags based on viewports.\n\n## Installation\n\n```\n$ git clone https://github.com/jcrd/awesome-viewport.git\n$ cd awesome-viewport\n$ luarocks make --local rockspec/awesome-viewport-devel-1.rockspec\n```\n\n## Concept\n\nOnce connected to a screen, selecting a single tag will make that tag the active\nviewport. This tag will remember any other selected tags when the viewport\nchanges, so that when it is re-selected, all previously selected tags are\nviewed.\n\nFor example:\n\n![Tag 1 is selected, becoming the active viewport][1]\n\n* Tag 1 is selected, becoming the active viewport.\n\n![Tag 2 is toggled into view][2]\n\n* Tag 2 is toggled into view. Tag 1, as the active viewport, will record this.\n\n![Tag 2 is selected, but tag 1 is not viewed][3]\n\n* If tag 2 is selected, it becomes the new active viewport, and tag 1 will not be\n  viewed. The association is one way.\n\n![Tag 1 is selected, toggling tag 2 into view][2]\n\n* Tag 1 is re-selected, becoming the active viewport. Because tag 2 was viewed\n  when tag 1 was previously the active viewport, it is toggled back into view.\n\n[1]: https://github.com/jcrd/awesome-viewport/blob/assets/1.png\n[2]: https://github.com/jcrd/awesome-viewport/blob/assets/2.png\n[3]: https://github.com/jcrd/awesome-viewport/blob/assets/3.png\n\n## Usage\n\nRequire the library:\n```lua\nlocal viewport = require(\"awesome-viewport\")\n```\n\nConnect to a screen to begin managing its tags:\n```lua\nawful.screen.connect_for_each_screen(function (s)\n      viewport.connect(s)\n  end)\n```\n\nView a single tag:\n```lua\ntag1:view_only()\n```\n\nThis tag will be the active viewport.\n\nGet the active viewport for the focused screen:\n\n```lua\nviewport()\n```\n\nToggle another tag into view:\n```lua\nawful.tag.viewtoggle(tag2)\n```\n\n`tag1` will remember that `tag2` is toggled while its the active viewport, so\nthat if the viewport changes and `tag1` is re-viewed, `tag2` will also be\ntoggled into view.\n\nSee the [API documentation](https://jcrd.github.io/awesome-viewport/) for\ndescriptions of all functions.\n\n## License\n\nThis project is licensed under the MIT License (see [LICENSE](LICENSE)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcrd%2Fawesome-viewport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcrd%2Fawesome-viewport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcrd%2Fawesome-viewport/lists"}