Module client

awesome client API

Author:

Julien Danjou <julien@danjou.info>

Copyright© 2008-2009 Julien Danjou

Functions

add_signal (name, func) Add a signal.
buttons (buttons_table) Get or set mouse buttons bindings for a client.
emit_signal (name, ...) Emit a signal.
geometry (arg1) Return client geometry.
get (screen) Get all clients into a table.
isvisible () Check if a client is visible on its screen.
keys (keys_table) Get or set keys bindings for a client.
kill () Kill a client.
lower () Lower a client on bottom of others which are on the same layer.
raise () Raise a client on top of others which are on the same layer.
redraw () Redraw a client by unmapping and mapping it quickly.
remove_signal (name, func) Remove a signal.
struts (struts) Return client struts (reserved space at the edge of the screen).
swap (c) Swap a client with another one in global client list.
tags (tags_table) Access or set the client tags.
unmanage () Stop managing a client.

Tables

client Client object.


Functions

add_signal (name, func)
Add a signal.

Parameters

  • name: A signal name.
  • func: A function to call when the signal is emitted.
buttons (buttons_table)
Get or set mouse buttons bindings for a client.

Parameters

  • buttons_table: An array of mouse button bindings objects, or nothing.

Return value:

A table with all buttons.
emit_signal (name, ...)
Emit a signal.

Parameters

  • name: A signal name.
  • ...: Various arguments, optional.
geometry (arg1)
Return client geometry.

Parameters

  • arg1: A table with new coordinates, or none.

Return value:

A table with client coordinates.
get (screen)
Get all clients into a table.

Parameters

  • screen: An optional screen number.

Return value:

A table with all clients.
isvisible ()
Check if a client is visible on its screen.

Return value:

A boolean value, true if the client is visible, false otherwise.
keys (keys_table)
Get or set keys bindings for a client.

Parameters

  • keys_table: An array of key bindings objects, or nothing.

Return value:

A table with all keys.
kill ()
Kill a client.
lower ()
Lower a client on bottom of others which are on the same layer.
raise ()
Raise a client on top of others which are on the same layer.
redraw ()
Redraw a client by unmapping and mapping it quickly.
remove_signal (name, func)
Remove a signal.

Parameters

  • name: A signal name.
  • func: A function to remove.
struts (struts)
Return client struts (reserved space at the edge of the screen).

Parameters

  • struts: A table with new strut values, or none.

Return value:

A table with strut values.
swap (c)
Swap a client with another one in global client list.

Parameters

  • c: A client to swap with.
tags (tags_table)
Access or set the client tags.

Parameters

  • tags_table: A table with tags to set, or none to get the current tags table.

Return value:

A table with all tags.
unmanage ()
Stop managing a client.

Tables

client
Client object. Fields
  • window: The X window id.
  • name: The client title.
  • skip_taskbar: True if the client does not want to be in taskbar.
  • type: The window type (desktop, normal, dock, …).
  • class: The client class.
  • instance: The client instance.
  • pid: The client PID, if available.
  • role: The window role, if available.
  • machine: The machine client is running on.
  • icon_name: The client name when iconified.
  • icon: The client icon.
  • screen: Client screen.
  • hidden: Define if the client must be hidden, i.e. never mapped, invisible in taskbar.
  • minimized: Define it the client must be iconify, i.e. only visible in taskbar.
  • size_hints_honor: Honor size hints, i.e. respect size ratio.
  • border_width: The client border width.
  • border_color: The client border color.
  • titlebar: The client titlebar.
  • urgent: The client urgent state.
  • content: An image representing the client window content (screenshot).
  • focus: The focused client.
  • opacity: The client opacity between 0 and 1.
  • ontop: The client is on top of every other windows.
  • above: The client is above normal windows.
  • below: The client is below normal windows.
  • fullscreen: The client is fullscreen or not.
  • maximized_horizontal: The client is maximized horizontally or not.
  • maximized_vertical: The client is maximized vertically or not.
  • transient_for: The client the window is transient for.
  • group_window: Window identification unique to a group of windows.
  • leader_id: Identification unique to windows spawned by the same command.
  • size_hints: A table with size hints of the client: user_position, user_size, program_position, program_size, etc.
  • sticky: Set the client sticky, i.e. available on all tags.
  • modal: Indicate if the client is modal.

Valid XHTML 1.0!