awesome-www/doc/uicb.mdwn

186 lines
3.5 KiB
Markdown

[[toc levels=2]]
# What are uicb?
In *awesome*, a lot of functions are available. These functions are called **uicb** (User Interface Call Backs). Each function can be bound to a key shortcut or a mouse button.
# Uicb function list
## General
### quit
Syntax: quit
This function quits *awesome*.
### togglebar
Hide or show statusbar.
### spawn
Args: program
Execute an external program.
### exec
Args: program
Replace *awesome* with another window manager.
### reloadconfig
Reload configuration file.
### setstatustext
Args: text
Set status bar text.
## Client
### client_kill
This function closes the focused client.
### client_moveresize
Args: x y width height
This function allows to dynamically move and resize floating windows.
Coordinates can be relative or absolute. Relative values must begin with + or -.
For example, resizing a window to 200x200 without moving it will be done with:
"+0 +0 200 200"
To move a window 10 pixels up:
"+0 +10 +0 +0"
To move a window in the upper left corner and increase its width by 10px:
"0 0 +0 +10"
### client_settrans
Args: float
Set client transparency, number can be a relative or absolute floating number in percentage.
### client_swapnext
Swap window placement with the next displayed window.
### client_swapprev
Swap window placement with the previous displayed window.
### client_focusnext
Focus next window.
### client_focusprev
Focus previous window.
### client_togglemax
Set window fullscreen. Calling this function another time will reset the window to its previous state.
### client_togglehorizontalmax
Set window's horizontal size to display width. Calling this function another time will reset the window to its previous state.
### client_toggleverticalmax
Set window's vertical size to display height. Calling this function another time will reset the window to its previous state.
### client_togglefloating
Set window floating or tiled.
### client_zoom
Set window as master window.
### client_movetoscreen
Args: relative or absolute integer
Move focused window to the nth screen, or next (+1) or previous (-1). If no screen_number
is set, move to the next screen.
### client_tag
Args: tag number
Tag focused window with this tag.
### client_toggletag
Args: tag number
Add or remove tag to focused window.
### client_movemouse
Move client window with mouse.
### client_resizemouse
Resize client window with mouse.
## Tag
### tag_setlayout
Args: relative or absolute integer
Set layout number # or just switch to the next layout for current tag.
### tag_toggleview
Args: tag number
Add windows tagged with tag number to current display.
### tag_view
Args: tag number
View windows tagged with tag number.
### tag_viewnext
Show windows tagged with next tag in list.
### tag_viewprev
Show windows tagged with previous tag in list.
### tag\_viewprev\_selected
Switch back to the previously displayed set of tags.
### tag_setmwfact
Args: relative or absolute float
Set master width factor.
### tag_setncol
Args: relative or absolute integer
Set number of columns for non-master windows.
### tag_setnmaster
Args: relative or absolute integer
Set number of master windows.
## Screen
### screen_focusnext
Focus first window in the next screen and move mouse.
### screen_focusprev
Focus first window in the previous screen and move mouse.
### setborder
Args: relative or absolute integer
Set default border size in pixels for new clients.