Module: awful.permissions
Implements EWMH requests handling.
Info:
- Copyright: 2009 Julien Danjou
-
Originally authored by: Julien Danjou <julien@danjou.info>
(Full contributors list available on our github project)
Static module functions
| awful.permissions.add_activate_filter (f[, context]) | Add an activate (focus stealing) filter function. | |
| awful.permissions.remove_activate_filter (f[, context]) -> boolean | Remove an activate (focus stealing) filter function. | |
Request handlers
| awful.permissions.activate | Activate a window. | |
| awful.permissions.tag | Tag a window with its requested tag. | |
| awful.permissions.urgent | Handle client urgent request | |
| awful.permissions.geometry | Move and resize the client. | |
| awful.permissions.wibox_geometry | Move and resize the wiboxes. | |
| awful.permissions.merge_maximization | Merge the 2 requests sent by clients wanting to be maximized. | |
| awful.permissions.client_geometry_requests | Allow the client to move itself. | |
| awful.permissions.update_border |
The default client request::border handler.
|
|
| awful.permissions.autoactivate |
Default handler for the request::autoactivate signal.
|
|
Theme variables
| beautiful.maximized_honor_padding | boolean | Honor the screen padding when maximizing. | |
| beautiful.fullscreen_hide_border | boolean | Hide the border on fullscreen clients. | |
| beautiful.maximized_hide_border | boolean | Hide the border on maximized clients. | |
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. | |
Static module functions
- awful.permissions.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. If the callback returnsfalse, the activation request is cancelled unless theforcehint is set. 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.permissions.add_activate_filter(function(c) if c.class == "Firefox" then return false end end, "permissions")Parameters:
- f function The callback
- context
string
The
request::activatecontext (optional)
See also:
- awful.permissions.remove_activate_filter (f[, context]) -> boolean
-
Remove an activate (focus stealing) filter function.
This is an helper to avoid dealing with permissions.add_activate_filter directly.
Parameters:
- f function The callback
- context
string
The
request::activatecontext (optional)
Returns:
-
boolean
If the callback existed
See also:
Request handlers
- awful.permissions.activate
-
Activate a window.
This sets the focus only if the client is visible. If
raiseis set in the hints, it will also unminimize the client and move it to the top of its layer.It is the default signal handler for
request::activateon a client.Arguments:
- c client 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 unminimized and raised? (default false)
- switch_to_tag boolean should the client's first tag be selected if none of the client's tags are selected? (default false)
- switch_to_tags boolean Select all tags associated with the client. (default false)
- awful.permissions.tag
-
Tag a window with its requested tag.
It is the default signal handler for
request::tagon a client.Arguments:
- c client A client to tag
- t tag or boolean A tag to use. If true, then the client is made sticky. (optional)
- hints table Extra information (default {})
- awful.permissions.urgent
-
Handle client urgent request
Arguments:
- c client A client
- urgent boolean If the client should be urgent
- awful.permissions.geometry
-
Move and resize the client.
This is the default geometry request handler.
Arguments:
- c client The client
- context string The context
- hints table The hints to pass to the handler (default {})
- awful.permissions.wibox_geometry
-
Move and resize the wiboxes.
This is the default geometry request handler.
Arguments:
- w wibox The wibox.
- context string The context
- hints table The hints to pass to the handler (default {})
- awful.permissions.merge_maximization
-
Merge the 2 requests sent by clients wanting to be maximized.
The X clients set 2 flags (atoms) when they want to be maximized. This caused 2 request::geometry to be sent. This code gives some time for them to arrive and send a new
request::geometry(through the property change) with the combined state.Arguments:
- c client The client
- context string The context
- hints table The hints to pass to the handler (default {})
- awful.permissions.client_geometry_requests
-
Allow the client to move itself.
This is the default geometry request handler when the context is permissions.
Arguments:
- c client The client
- context string The context
- hints table The hints to pass to the handler (default {})
- awful.permissions.update_border · 58 theme variables
-
The default client
request::borderhandler.To replace this handler with your own, use:
client.disconnect_signal("request::border", awful.ewmh.update_border)The default implementation chooses from dozens beautiful theme variables depending if the client is tiled, floating, maximized and then from its state (urgent, new, active, normal)
Click to display more Consumed theme variables:
Theme variable Usage beautiful.border_color_markedbeautiful.border_color_activebeautiful.border_color_normalbeautiful.border_color_newbeautiful.border_color_urgentbeautiful.border_color_floatingbeautiful.border_color_floating_activebeautiful.border_color_floating_normalbeautiful.border_color_floating_newbeautiful.border_color_floating_urgentbeautiful.border_color_maximizedbeautiful.border_color_maximized_activebeautiful.border_color_maximized_normalbeautiful.border_color_maximized_newbeautiful.border_color_maximized_urgentbeautiful.border_color_fullscreenbeautiful.border_color_fullscreen_activebeautiful.border_color_fullscreen_normalbeautiful.border_color_fullscreen_newbeautiful.border_color_fullscreen_urgentbeautiful.border_width_activebeautiful.border_width_normalbeautiful.border_width_newbeautiful.border_width_urgentbeautiful.border_width_floatingbeautiful.border_width_floating_activebeautiful.border_width_floating_normalbeautiful.border_width_floating_newbeautiful.border_width_floating_urgentbeautiful.border_width_maximizedbeautiful.border_width_maximized_activebeautiful.border_width_maximized_normalbeautiful.border_width_maximized_newbeautiful.border_width_maximized_urgentbeautiful.border_width_fullscreenbeautiful.border_width_fullscreen_activebeautiful.border_width_fullscreen_normalbeautiful.border_width_fullscreen_newbeautiful.border_width_fullscreen_urgentbeautiful.opacity_floatingbeautiful.opacity_floating_activebeautiful.opacity_floating_normalbeautiful.opacity_floating_newbeautiful.opacity_floating_urgentbeautiful.opacity_maximizedbeautiful.opacity_maximized_activebeautiful.opacity_maximized_normalbeautiful.opacity_maximized_newbeautiful.opacity_maximized_urgentbeautiful.opacity_fullscreenbeautiful.opacity_fullscreen_activebeautiful.opacity_fullscreen_normalbeautiful.opacity_fullscreen_newbeautiful.opacity_fullscreen_urgentbeautiful.opacity_activebeautiful.opacity_normalbeautiful.opacity_newbeautiful.opacity_urgent - awful.permissions.autoactivate
-
Default handler for the
request::autoactivatesignal.All it does is to emit
request::activatewith the following context mapping:- mouse_enter: mouse.enter
- switchtag : *autofocus.checkfocus_tag*
- history : *autofocus.check_focus*
Theme variables
- beautiful.maximized_honor_padding boolean
- Honor the screen padding when maximizing.
- beautiful.fullscreen_hide_border boolean
- Hide the border on fullscreen clients.
- beautiful.maximized_hide_border boolean
- Hide the border on maximized clients.
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
permissions.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
permissions.generic_activate_filters.
See also: