AwesomeWM library for managing tags based on viewports
Go to file
James Reed 88de6e995c
toolbox: Use lua-toolbox
2020-12-13 16:55:59 -07:00
rockspec rockspec: Add version v0.1.0 2020-09-16 12:19:46 -06:00
.gitignore Add .gitignore 2020-08-05 14:37:40 -06:00
Dockerfile.toolbox toolbox: Use lua-toolbox 2020-12-13 16:55:59 -07:00
LICENSE Change license to MIT 2020-09-16 11:34:38 -06:00
Makefile Makefile: Add target to serve gh-pages with python 2020-08-05 14:47:31 -06:00
README.md Clarify conceptual usage 2020-11-24 16:12:09 -07:00
config.ld Initial commit 2019-09-16 11:55:41 -06:00
init.lua Clarify conceptual usage 2020-11-24 16:12:09 -07:00

README.md

awesome-viewport

awesome-viewport is a library for Awesome window manager that manages tags based on viewports.

Installation

$ git clone https://github.com/jcrd/awesome-viewport.git
$ cd awesome-viewport
$ luarocks make --local rockspec/awesome-viewport-devel-1.rockspec

Concept

Once connected to a screen, selecting a single tag will make that tag the active viewport. This tag will remember any other selected tags when the viewport changes, so that when it is re-selected, all previously selected tags are viewed.

For example:

Tag 1 is selected, becoming the active viewport

  • Tag 1 is selected, becoming the active viewport.

Tag 2 is toggled into view

  • Tag 2 is toggled into view. Tag 1, as the active viewport, will record this.

Tag 2 is selected, but tag 1 is not viewed

  • If tag 2 is selected, it becomes the new active viewport, and tag 1 will not be viewed. The association is one way.

Tag 1 is selected, toggling tag 2 into view

  • Tag 1 is re-selected, becoming the active viewport. Because tag 2 was viewed when tag 1 was previously the active viewport, it is toggled back into view.

Usage

Require the library:

local viewport = require("awesome-viewport")

Connect to a screen to begin managing its tags:

awful.screen.connect_for_each_screen(function (s)
      viewport.connect(s)
  end)

View a single tag:

tag1:view_only()

This tag will be the active viewport.

Get the active viewport for the focused screen:

viewport()

Toggle another tag into view:

awful.tag.viewtoggle(tag2)

tag1 will remember that tag2 is toggled while its the active viewport, so that if the viewport changes and tag1 is re-viewed, tag2 will also be toggled into view.

See the API documentation for descriptions of all functions.

License

This project is licensed under the MIT License (see LICENSE).