Class wibox - awesome API documentation

# Class `wibox`

### Info:

- Copyright: 2010 Uli Schlachter
- Author: Uli Schlachter

## Functions

.wibox ([args=nil]) | Create a wibox.

## Object properties

border_width | Border width.
border_color | Border color.
ontop | On top of other windows.
cursor | The mouse cursor.
visible | Visibility.
opacity | The opacity of the wibox, between 0 and 1.
type | The window type (desktop, normal, dock, ...).
x | The x coordinates.
y | The y coordinates.
width | The width of the wibox.
height | The height of the wibox.
screen | The wibox screen.
drawable | The wibox's drawable.
widget | The widget that the wibox displays.
window | The X window id.
shape_bounding | The wibox's bounding shape as a (native) cairo surface.
shape_clip | The wibox's clip shape as a (native) cairo surface.
shape_input | The wibox's input shape as a (native) cairo surface.
shape | The wibar's shape.
input_passthrough | Forward the inputs to the client below the wibox.
bg | The background of the wibox.
bgimage | The background image of the drawable.
fg | The foreground (text) of the wibox.

## Theme variables

beautiful.bg_normal | The default background color.
beautiful.fg_normal | The default foreground (text) color.

## Methods

wibox:buttons (buttons_table) | Get or set mouse buttons bindings to a wibox.
wibox:geometry (A) | Get or set wibox geometry.
wibox:struts (strut) | Get or set wibox struts.
wibox:setup (args) | Set a declarative widget hierarchy description.
wibox:find_widgets (x, y) | Find a widget by a point.
wibox:to_widget () | Create a widget that reflects the current state of this wibox.
wibox:save_to_svg (path[, context=nil]) | Save a screenshot of the wibox to `path`.
wibox:draw (wibox) | Redraw a wibox.

## Functions

Methods

.wibox ([args=nil])
  Create a wibox.
  - args
    - border_width integer Border width.
    - border_color string Border color.
    - ontop boolean On top of other windows. (default false)
    - cursor string The mouse cursor.
    - visible boolean Visibility.
    - opacity number The opacity, between 0 and 1. (default 1)
    - type string The window type (desktop, normal, dock, …).
    - x integer The x coordinates.
    - y integer The y coordinates.
    - width integer The width.
    - height integer The height.
    - screen screen The wibox screen.
    - widget wibox.widget The widget that the wibox displays.
    - shape_bounding The wibox’s bounding shape as a (native) cairo surface.
    - shape_clip The wibox’s clip shape as a (native) cairo surface.
    - shape_input The wibox’s input shape as a (native) cairo surface.
    - bg color The background.
    - bgimage surface The background image of the drawable.
    - fg color The foreground (text) color.
    - shape gears.shape The shape.
    - input_passthrough boolean If the inputs are forward to the element below. (default false)

  ### Returns:

  wibox The new wibox

## Object properties

border_width

  Border width.

  Signal:

  - *property::border_width*

  ### Type:

  - integer
border_color

  Border color.

  Please note that this property only support string based 24 bit or 32 bit colors:

      Red Blue
       _|  _|
      #FF00FF
         T‾
       Green

      Red Blue
       _|  _|
      #FF00FF00
         T‾  ‾T
      Green   Alpha

  Signal:

  - *property::border_color*

  ### Type:

  - string
ontop

  On top of other windows.

  Signal:

  - property::ontop

  ### Type:

  - boolean
cursor

  The mouse cursor.

  Signal:

  - property::cursor

  ### Type:

  - string

  ### See also:

  mouse
visible

  Visibility.

  Signal:

  - property::visible

  ### Type:

  - boolean
opacity

  The opacity of the wibox, between 0 and 1.

  Signal:

  - property::opacity

  ### Type:

  - opacity number (between 0 and 1)
type

  The window type (desktop, normal, dock, ...).

  Signal:

  - property::type

  ### Type:

  - string

  ### See also:

  client.type
x

  The x coordinates.

  Signal:

  - property::x

  ### Type:

  - integer
y

  The y coordinates.

  Signal:

  - property::y

  ### Type:

  - integer
width

  The width of the wibox.

  Signal:

  - property::width

  ### Type:

  - width
height

  The height of the wibox.

  Signal:

  - property::height

  ### Type:

  - height
screen
  The wibox screen.

  ### Type:

  - screen
drawable

  The wibox's drawable.

  Signal:

  - property::drawable

  ### Type:

  - drawable drawable
widget
  The widget that the wibox displays.

  ### Type:

  - widget
window

  The X window id.

  Signal:

  - property::window

  ### Type:

  - string

  ### See also:

  client.window
shape_bounding

  The wibox's bounding shape as a (native) cairo surface.

  Signal:

  - *property::shape_bounding*
shape_clip

  The wibox's clip shape as a (native) cairo surface.

  Signal:

  - *property::shape_clip*
shape_input

  The wibox's input shape as a (native) cairo surface.

  Signal:

  - *property::shape_input*
shape

  The wibar's shape.

  Signal:

  - property::shape

  ### Type:

  - shape gears.shape
input_passthrough

  Forward the inputs to the client below the wibox.

  This replace the shape_input mask with an empty area. All mouse and keyboard events are sent to the object (such as a client) positioned below this wibox. When used alongside compositing, it allows, for example, to have a subtle transparent wibox on top a fullscreen client to display important data such as a low battery warning.

  Signal:

  - *property::input_passthrough*

  ### Type:

  - boolean (default false)

  ### See also:

  wibox.shape_input
bg
  The background of the wibox.

  ### Type:

  - c The background to use. This must either be a cairo pattern object, nil or a string that gears.color() understands.

  ### See also:

  gears.color
bgimage
  The background image of the drawable. If `image` is a function, it will be called with `(context, cr, width, height)` as arguments. Any other arguments passed to this method will be appended.

  ### Type:

  - image A background image or a function

  ### See also:

  gears.surface
fg
  The foreground (text) of the wibox.

  ### Type:

  - c The foreground to use. This must either be a cairo pattern object, nil or a string that gears.color() understands.

  ### See also:

  gears.color

## Theme variables

beautiful.bg_normal
  The default background color.

  ### See also:

  wibox.bg
beautiful.fg_normal
  The default foreground (text) color.

  ### See also:

  wibox.fg

## Methods

wibox:buttons (buttons_table)
  Get or set mouse buttons bindings to a wibox.
  - buttons_table A table of buttons objects, or nothing.
wibox:geometry (A)
  Get or set wibox geometry. That's the same as accessing or setting the x, y, width or height properties of a wibox.
  - A table with coordinates to modify.

  ### Returns:

  A table with wibox coordinates and geometry.
wibox:struts (strut)
  Get or set wibox struts.
  - strut A table with new strut, or nothing

  ### Returns:

  The wibox strut in a table.

  ### See also:

  client.struts
wibox:setup (args)
  Set a declarative widget hierarchy description. See The declarative layout system
  - args An array containing the widgets disposition
wibox:find_widgets (x, y)
  Find a widget by a point. The wibox must have drawn itself at least once for this to work.
  - x number X coordinate of the point
  - y number Y coordinate of the point

  ### Returns:

  table A sorted table of widgets positions. The first element is the biggest container while the last is the topmost widget. The table contains x, y, width, height and widget.
wibox:to_widget ()
  Create a widget that reflects the current state of this wibox.

  ### Returns:

  wibox.widget A new widget.
wibox:save_to_svg (path[, context=nil])
  Save a screenshot of the wibox to `path`.
  - path string The path.
  - context table A widget context. (default nil)
wibox:draw (wibox)
  Redraw a wibox. You should never have to call this explicitely because it is automatically called when needed.
  - wibox

generated by LDoc 1.5.0 Last updated 2024-12-21 21:41:42