Show all clients all screens in Awesome window manager
Go to file
Daniel Hahler 0779215ae9 Fix running out of entries in `charorder`
When there are more clients than entries in `charorder`, the following
error occurs:

    W: awesome: luaA_dofunction:77: error while running function
    stack traceback:
            /home/user/.config/awesome/revelation/init.lua:166: in function </home/user/.config/awesome/revelation/init.lua:124>
            (...tail calls...)
            /usr/local/share/awesome/lib/awful/key.lua:43: in function </usr/local/share/awesome/lib/awful/key.lua:43>
    error: /home/user/.config/awesome/revelation/init.lua:166: attempt to index field '?' (a nil value)

This fixes it by skipping setup of `hintindex` in this case.

Fixes https://github.com/guotsuan/awesome-revelation/issues/4.
2015-04-21 02:43:48 +02:00
LICENSE Add LICENSE and update doc to reflect it. 2012-06-05 08:43:41 -07:00
README.md doc: grammar and typo fixes for the install section 2014-03-02 15:13:57 +01:00
init.lua Fix running out of entries in `charorder` 2015-04-21 02:43:48 +02:00
screenshot.png update the document and screenshot 2013-09-03 01:47:32 +01:00

README.md

revelation.lua

Provides Mac OSX like 'Expose' view of all clients.

This is a fork from revelation It is modified from the original revelation.lua for incorperating with awesome 3.5 or later. It also have some features.

Changes since 2014-02-19

  • Now the revlation is able to handle the special clients(float, fullscreen or maximized etc.)
  • When you select an minimized client, the revelation will un-minimized it and then focuse on it.

Changes after 2013-12-30

  • Now it is possible, in revelation.init({...}), to change the default settings of revelation module.

  • Function revelation(...) now accept the parameter as a table {rule={...}, is_excluded=..., curr_tag_only=...}.

  1. To add specify rules revelation({rule={...},...}).
  2. To exclude the clients matched by the rules instead of including revelation({rule={...}, is_excluded=true}).
  3. {...,curr_tag_only=true} make the revelation only collect the cliens from current tags.

Changes from the original revelation

  • Support awesome 3.5 or later

  • Add the support of multiple screens. Now multiple 'Expose' views will be shown on the multiple screens at the same time.

  • The way of selecting and focusing the client was changed. The old way that is navigating clients by pressing the keys "j, h, k, l" and then selecting the client by pressing key "Enter" was deprecated. Now each client in the 'Expose' views come with a letter surrounding by a hint box, you can select the client by pressing the corresponding letter in the hint box. The iead and codes of this method was copied from the module hint.

  • Add zoom mode. Add the function of zooming the client by pressing the right button of the mouse.

  • The unwanted clients can be excluded by the parameter{rule={...}....}.

Screenshot

screenshot

Use

Installation

(From user's awesome configuration directory, usually ~/.config/awesome)

  1. Clone the repository:

    git clone https://github.com/guotsuan/awesome-revelation revelation
    
  2. Include it at the top of your rc.lua file: local revelation=require("revelation")

  3. Add revelation.init() after beautiful.init()

  4. Define a global keybinding (e. g. ModKey + e) for revelation in your rc.lua:

    globalkeys = awful.util.table.join(
    awful.key({ modkey,           }, "Left",   awful.tag.viewprev       ), 
    awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),
    awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
    

    ==> awful.key({ modkey, }, "e", revelation),

    awful.key({ modkey,           }, "j",
    function ()
        awful.client.focus.byidx( 1)
        if client.focus then client.focus:raise() end
    end),
    

    NOTE: Always double check the key binding syntax against the version of Awesome which you are using.

  5. Restart Awesome (usually Modkey + Control + r) and try the keybinding Modkey + e.

It should bring up all clients from the current tags on all screens and set the layout to fair. You can focus clients with the cursor keys, and then press the left button to select, or you can directly focus a client by pressing the corresponding key shown in the hint box. Press the right mouse button to zoom the client or Escape to abort.

Configuration

Revelation's configuration is done through the init() function

There are two basic settings, shown with default values:

-- The name of the tag created for the 'exposed' view
revelation.tag_name = 'Revelation'

-- A table of matcher functions (used in client filtering)
revelation.exact = awful.rules.match
revelation.any   = awful.rules.match_any

The rule matching functions must conform to awful.rules.match prototypes.

For client matching rules, we follow the same syntax as awful.rules expects. If rule.any == true, then we call the config.match.any function.

to change the settings, use:

 revelation.init({tag_name = ..., match={...})

Examples

All clients:

 awful.key({modkey}, "e", revelation)

To match all urxvt terminals:

 awful.key({modkey}, "e", function()
            revelation({rule={class="URxvt"}})
         end)

To match clients with class 'foo' or 'bar':

 awful.key({modkey}, "e", function()
            revelation({
                        rule{class={"foo", "bar"},
                        any=true}
                        })
        end)

To exclude the clients, we set:

 awful.key({modkey}, "e", function()
         revelation(rule={class="conky"}, is_excluded=true)
         end)

To set only collect clients from current tag

 awful.key({modkey}, "e", function()
             revelation(rule={class="conky"}, is_excluded=true, 
            curr_tag_only=true)
             end)

Credits

Maintenance

* Quan Guo <guotsuan@gmail.com>
* Perry Hargrave <resixian@gmail.com>

Contributions, many thanks!

* Nikola Petrov <nikolavp@gmail.com>

Original authors

* Espen Wiborg <espenhw@grumblesmurf.org>
* Julien Danjou <julien@danjou.info>

(c) 20013-2014 Quan Guo
(c) 2009-12 Perry Hargrave
(c) 2008 Espen Wiborg, Julien Danjou