awesome-revelation/README.md

170 lines
5.8 KiB
Markdown
Raw Permalink Normal View History

2011-08-23 23:37:11 +02:00
# revelation.lua
2013-08-31 23:54:57 +02:00
Provides Mac OSX like 'Expose' view of all clients.
2013-09-03 02:47:32 +02:00
2014-01-02 22:35:30 +01:00
This is a fork from [revelation](https://github.com/bioe007/awesome-revelation)
2015-09-27 00:09:27 +02:00
It is modified from the original revelation.lua for incorporating with awesome 3.5 or later.
2014-01-02 22:35:30 +01:00
It also have some features.
2015-09-22 11:43:16 +02:00
**Now master branch works for both master and stable awesome WM**
2015-09-22 11:51:00 +02:00
2015-09-27 00:09:27 +02:00
## Changes since 2015-09-26
When all clients are exposing, you can zoom (__Modkey + Shift + hintbox charater__ or __right button__ of the mouse)
or kill a client (__middle button__ of the mouse) and the position of hintboxes will be updated accordingly.
## 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.
* Added an option to change character ordering
2013-08-31 23:54:57 +02:00
2013-12-30 23:52:56 +01:00
## Changes after 2013-12-30
2014-01-02 22:35:30 +01:00
* Now it is possible, in revelation.init({...}), to change the default settings of
2013-12-30 23:52:56 +01:00
revelation module.
2014-01-02 22:35:30 +01:00
* 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})`.
2015-09-27 00:09:27 +02:00
3. `{...,curr_tag_only=true}` make the revelation only collect the client from current
2013-12-30 23:52:56 +01:00
tags.
2015-09-27 00:09:27 +02:00
2013-09-01 12:48:34 +02:00
## Changes from the original revelation
2013-09-01 00:21:34 +02:00
* Support awesome 3.5 or later
2013-09-03 02:47:32 +02:00
* Add the support of multiple screens. Now multiple 'Expose' views will be shown
on the multiple screens at the same time.
2013-08-31 23:54:57 +02:00
2013-09-03 02:47:32 +02:00
* The way of selecting and focusing the client was changed. The old way that is
2014-01-02 22:35:30 +01:00
navigating clients by pressing the keys "j, h, k, l" and then selecting the
2013-09-03 02:47:32 +02:00
client by pressing key "Enter" was deprecated. Now each client in the 'Expose'
2014-01-02 22:35:30 +01:00
views come with a letter surrounding by a hint box, you can select the client
2015-09-27 00:09:27 +02:00
by pressing the corresponding letter in the hint box. The idea and codes of this method
2014-01-02 22:35:30 +01:00
was copied from the module [hint](https://github.com/zackpete/hints).
2013-09-03 02:47:32 +02:00
2013-09-01 00:21:34 +02:00
* Add zoom mode. Add the function of zooming the client by pressing the right
button of the mouse.
2013-08-31 23:54:57 +02:00
2014-01-02 22:35:30 +01:00
* The unwanted clients can be excluded by the parameter`{rule={...}....}`.
2011-08-23 23:37:11 +02:00
2013-09-01 12:48:34 +02:00
## Screenshot
2013-09-01 00:34:40 +02:00
2013-09-01 12:48:34 +02:00
![screenshot](./screenshot.png)
2013-09-01 00:34:40 +02:00
2016-01-17 16:56:26 +01:00
## Usage
2011-10-21 01:18:17 +02:00
### Installation
2011-08-23 23:37:11 +02:00
(From user's awesome configuration directory, usually ~/.config/awesome)
1. Clone the repository:
2011-08-23 23:37:11 +02:00
git clone https://github.com/guotsuan/awesome-revelation revelation
2013-09-01 00:21:34 +02:00
2. Include it at the top of your rc.lua file:
`local revelation=require("revelation")`
2011-08-23 23:37:11 +02:00
2016-01-17 16:57:43 +01:00
3. **Important: Add `revelation.init()` after `beautiful.init()`**
2011-08-23 23:37:11 +02:00
3. Define a global keybinding (e. g. `ModKey + e`) for revelation in your rc.lua:
2012-03-13 07:31:58 +01:00
2012-04-05 00:50:31 +02:00
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),
2012-04-05 00:50:31 +02:00
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
2011-08-23 23:37:11 +02:00
**NOTE:** Always double check the key binding syntax against the version of
Awesome which you are using.
2011-08-23 23:37:11 +02:00
4. Restart Awesome (usually __Modkey + Control + r__) and try the keybinding __Modkey + e__.
2011-08-23 23:37:11 +02:00
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.
2011-08-23 23:37:11 +02:00
2011-10-21 01:18:17 +02:00
### Configuration
2013-12-30 23:52:56 +01:00
Revelation's configuration is done through the init() function
There are three basic settings, shown with default values:
2011-10-21 01:18:17 +02:00
-- The name of the tag created for the 'exposed' view
2013-12-30 23:52:56 +01:00
revelation.tag_name = 'Revelation'
2011-10-21 01:18:17 +02:00
-- A table of matcher functions (used in client filtering)
2013-12-30 23:52:56 +01:00
revelation.exact = awful.rules.match
revelation.any = awful.rules.match_any
2011-10-21 01:18:17 +02:00
-- Character order for selecting clients
revelation.charorder = "jkluiopyhnmfdsatgvcewqzx1234567890",
2011-10-21 01:18:17 +02:00
The rule matching functions must conform to `awful.rules.match` prototypes.
2014-01-02 22:35:30 +01:00
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.
2011-10-21 01:18:17 +02:00
2013-12-30 23:52:56 +01:00
to change the settings, use:
2015-11-05 20:23:44 +01:00
revelation.init({tag_name = ..., match = {...}, charorder = ...})
2013-12-30 23:52:56 +01:00
2013-09-01 00:21:34 +02:00
2011-10-21 01:18:17 +02:00
### Examples
All clients:
awful.key({modkey}, "e", revelation)
To match all urxvt terminals:
awful.key({modkey}, "e", function()
2013-12-30 23:52:56 +01:00
revelation({rule={class="URxvt"}})
2011-10-21 01:18:17 +02:00
end)
To match clients with class 'foo' or 'bar':
awful.key({modkey}, "e", function()
revelation({
2013-12-30 23:52:56 +01:00
rule{class={"foo", "bar"},
any=true}
2011-10-21 01:18:17 +02:00
})
end)
2013-09-01 00:21:34 +02:00
To exclude the clients, we set:
awful.key({modkey}, "e", function()
revelation({rule={class="conky"}, is_excluded=true})
2013-09-01 00:21:34 +02:00
end)
2013-08-31 23:54:57 +02:00
2013-12-30 23:52:56 +01:00
To set only collect clients from current tag
awful.key({modkey}, "e", function()
revelation({rule={class="conky"}, is_excluded=true,
curr_tag_only=true})
2013-12-30 23:52:56 +01:00
end)
2011-08-23 23:37:11 +02:00
## Credits
### Maintenance
2013-09-01 00:21:34 +02:00
* Quan Guo <guotsuan@gmail.com>
* Perry Hargrave <resixian@gmail.com>
### Contributions, many thanks!
2015-09-27 00:09:27 +02:00
* Daniel Hahler <github@thequod.de>
* Yauhen Kirylau
* Nikola Petrov <nikolavp@gmail.com>
### Original authors
* Espen Wiborg <espenhw@grumblesmurf.org>
* Julien Danjou <julien@danjou.info>
2011-08-23 23:37:11 +02:00
2014-01-02 22:35:30 +01:00
(c) 20013-2014 Quan Guo
(c) 2009-12 Perry Hargrave
(c) 2008 Espen Wiborg, Julien Danjou