Module awful.ewmh
Implements EWMH requests handling.
Info:
- Copyright: 2009 Julien Danjou
- Author: Julien Danjou <julien@danjou.info>
Functions
add_activate_filter (f[, context]) | Add an activate (focus stealing) filter function. |
remove_activate_filter (f[, context]) | Remove an activate (focus stealing) filter function. |
Request handlers
awful.ewmh.activate | Activate a window. |
awful.ewmh.tag | Tag a window with its requested tag. |
awful.ewmh.urgent | Handle client urgent request |
awful.ewmh.geometry | Move and resize the client. |
Tables
generic_activate_filters | The list of all registered generic request::activate (focus stealing) filters. |
contextual_activate_filters | The list of all registered contextual request::activate (focus stealing) filters. |
Functions
- add_activate_filter (f[, context])
-
Add an activate (focus stealing) filter function.
The callback takes the following parameters:
* **c** (*client*) The client requesting the activation * **context** (*string*) The activation context. * **hints** (*table*) Some additional hints (depending on the context)
If the callback returns
true
, the client will be activated unless theforce
hint is set. If the callback returnsfalse
, the activation request is cancelled. If the callback returnsnil
, the previous callback will be executed. This will continue until either a callback handles the request or when it runs out of callbacks. In that case, the request will be granted if the client is visible.For example, to block Firefox from stealing the focus, use:
awful.ewmh.add_activate_filter(function(c, "ewmh") if c.class == "Firefox" then return false end end)
- f function The callback
- context
string
The
request::activate
context
See also:
- remove_activate_filter (f[, context])
-
Remove an activate (focus stealing) filter function.
This is an helper to avoid dealing with ewmh.add_activate_filter directly.
- f function The callback
- context
string
The
request::activate
context
Returns:
-
boolean
If the callback existed
See also:
Request handlers
- awful.ewmh.activate
-
Activate a window.
This sets the focus only if the client is visible.
It is the default signal handler for
request::activate
on a client .Arguments:
- c client.object A client to use
- context string The context where this signal was used.
- hints A table with additional hints:
- raise boolean should the client be raised? (default false)
- awful.ewmh.tag
-
Tag a window with its requested tag.
It is the default signal handler for
request::tag
on a client .Arguments:
- c client.object A client to tag
- t tag or boolean A tag to use. If true, then the client is made sticky.
- hints table Extra information (default {})
- awful.ewmh.urgent
-
Handle client urgent request
Arguments:
- c client.object A client
- urgent boolean If the client should be urgent
- awful.ewmh.geometry
-
Move and resize the client.
This is the default geometry request handler.
Arguments:
Tables
- generic_activate_filters
-
The list of all registered generic request::activate (focus stealing)
filters. If a filter is added to only one context, it will be in
ewmh.contextual_activate_filters ["context_name"].
See also:
- contextual_activate_filters
-
The list of all registered contextual request::activate (focus stealing)
filters. If a filter is added to only one context, it will be in
ewmh.generic_activate_filters .
See also: