Module awful.tooltip
Info:
- Release: v3.5.5
- Author: Sébastien Gross <seb•ɱɩɲʋʃ•awesome•ɑƬ•chezwam•ɖɵʈ•org>
- Copyright: 2009 Sébastien Gross
Functions
set_text (self, text) | Change displayed text. |
set_markup (self, text) | Change displayed text. |
set_timeout (self, timeout) | Change the tooltip's update interval. |
add_to_object (self, object) | Add tooltip to an object. |
remove_from_object (self, object) | Remove tooltip from an object. |
new (args) | Create a new tooltip and link it to a widget. |
Tables
tooltip | Tooltip module for awesome objects. |
tooltip | Tooltip object definition. |
Functions
- set_text (self, text)
-
Change displayed text.
Parameters:
- self The tooltip object.
- text New tooltip text.
- set_markup (self, text)
-
Change displayed text.
Parameters:
- self The tooltip object.
- text New tooltip text, including pango markup.
- set_timeout (self, timeout)
-
Change the tooltip's update interval.
Parameters:
- self A tooltip object.
- timeout The timeout value.
- add_to_object (self, object)
-
Add tooltip to an object.
Parameters:
- self The tooltip.
- object An object.
- remove_from_object (self, object)
-
Remove tooltip from an object.
Parameters:
- self The tooltip.
- object An object.
- new (args)
-
Create a new tooltip and link it to a widget.
timeout
: The timeout value for update_func.
timer_function
: A function to dynamically change the tooltip text.
objects
: A list of objects linked to the tooltip.
Parameters:
- args
Arguments for tooltip creation may containt:
Returns:
-
The created tooltip.
see also:
- args
Arguments for tooltip creation may containt:
Tables
- tooltip
-
Tooltip module for awesome objects.
A tooltip is a small hint displayed when the mouse cursor
hovers a specific item.
In awesome, a tooltip can be linked with almost any
object having a
connect_signal()
method and receivingmouse::enter
andmouse::leave
signals.How to create a tooltip?
myclock = awful.widget.textclock({}, "%T", 1)
myclock_t = awful.tooltip({
objects = { myclock },
timer_function = function()
return os.date("Today is %A %B %d %Y\nThe time is %T")
end,
})
How to add the same tooltip to several objects?
myclock_t:add_to_object(obj1)
Now the same tooltip is attached to
myclock_t:add_to_object(obj2)
myclock
,obj1
,obj2
.
How to remove tooltip from many objects?
awful.tooltip
myclock_t:remove_from_object(obj1)
Now the same tooltip is only attached to
myclock_t:remove_from_object(obj2)
myclock
.
Fields:
- mt
- tooltip
-
Tooltip object definition.
Fields:
- wibox The wibox displaying the tooltip.
- visible True if tooltip is visible.