File awful/widget.lua
Author:
Julien Danjou <julien@danjou.info> |
Copyright ©2008 Julien Danjou
Release: v3.1.2
Functions
button (args) | Create a button widget. |
launcher (args) | Create a button widget which will launch a command. |
taglist.label.all (t, args) | Return labels for a taglist widget with all tag from screen. |
taglist.label.noempty (t, args) | Return labels for a taglist widget with all *non empty* tags from screen. |
taglist.new (screen, label, buttons) | Create a new taglist widget. |
tasklist.label.allscreen (c, screen, args) | Return labels for a tasklist widget with clients from all tags and screen. |
tasklist.label.alltags (c, screen, args) | Return labels for a tasklist widget with clients from all tags. |
tasklist.label.currenttags (c, screen, args) | Return labels for a tasklist widget with clients from currently selected tags. |
tasklist.new (label, buttons) | Create a new tasklist widget. |
Functions
- button (args)
-
Create a button widget. When clicked, the image is deplaced to make it like a real button.
Parameters
- args: Standard widget table arguments, plus image for the image path.
Return value:
A textbox widget configured as a button. - launcher (args)
-
Create a button widget which will launch a command.
Parameters
- args: Standard widget table arguments, plus image for the image path and command for the command to run on click, or either menu to create menu.
Return value:
A launcher widget. - taglist.label.all (t, args)
-
Return labels for a taglist widget with all tag from screen. It returns the tag name and set a special foreground and background color for selected tags.
Parameters
- t: The tag.
- args: The arguments table. bg_focus The background color for selected tag. fg_focus The foreground color for selected tag. bg_urgent The background color for urgent tags. fg_urgent The foreground color for urgent tags. squares_sel Optional: a user provided image for selected squares. squares_unsel Optional: a user provided image for unselected squares. squares_resize Optional: true or false to resize squares.
Return value:
A string to print. - taglist.label.noempty (t, args)
-
Return labels for a taglist widget with all *non empty* tags from screen. It returns the tag name and set a special foreground and background color for selected tags.
Parameters
- t: The tag.
- args: The arguments table. bg_focus The background color for selected tag. fg_focus The foreground color for selected tag. bg_urgent The background color for urgent tags. fg_urgent The foreground color for urgent tags.
Return value:
A string to print. - taglist.new (screen, label, buttons)
-
Create a new taglist widget.
Parameters
- screen: The screen to draw tag list for.
- label: Label function to use.
- buttons: A table with buttons binding to set.
- tasklist.label.allscreen (c, screen, args)
-
Return labels for a tasklist widget with clients from all tags and screen. It returns the client name and set a special foreground and background color for focused client. It also puts a special icon for floating windows.
Parameters
- c: The client.
- screen: The screen we are drawing on.
- args: The arguments table. bg_focus The background color for focused client. fg_focus The foreground color for focused client. bg_urgent The background color for urgent clients. fg_urgent The foreground color for urgent clients.
Return value:
A string to print. - tasklist.label.alltags (c, screen, args)
-
Return labels for a tasklist widget with clients from all tags. It returns the client name and set a special foreground and background color for focused client. It also puts a special icon for floating windows.
Parameters
- c: The client.
- screen: The screen we are drawing on.
- args: The arguments table. bg_focus The background color for focused client. fg_focus The foreground color for focused client. bg_urgent The background color for urgent clients. fg_urgent The foreground color for urgent clients.
Return value:
A string to print. - tasklist.label.currenttags (c, screen, args)
-
Return labels for a tasklist widget with clients from currently selected tags. It returns the client name and set a special foreground and background color for focused client. It also puts a special icon for floating windows.
Parameters
- c: The client.
- screen: The screen we are drawing on.
- args: The arguments table. bg_focus The background color for focused client. fg_focus The foreground color for focused client. bg_urgent The background color for urgent clients. fg_urgent The foreground color for urgent clients.
Return value:
A string to print. - tasklist.new (label, buttons)
-
Create a new tasklist widget.
Parameters
- label: Label function to use.
- buttons: A table with buttons binding to set.