Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 14ddd56d862578ec5414194daf5682dc > files > 252

awesome-3.4.15-1.fc18.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->

<h1>Modules</h1>
<ul>

	<li>
		<a href="../modules/awesome.html">awesome</a>
	</li>

	<li>
		<a href="../modules/awful.html">awful</a>
	</li>

	<li>
		<a href="../modules/awful.autofocus.html">awful.autofocus</a>
	</li>

	<li>
		<a href="../modules/awful.button.html">awful.button</a>
	</li>

	<li>
		<a href="../modules/awful.client.html">awful.client</a>
	</li>

	<li>
		<a href="../modules/awful.completion.html">awful.completion</a>
	</li>

	<li>
		<a href="../modules/awful.dbus.html">awful.dbus</a>
	</li>

	<li>
		<a href="../modules/awful.hooks.html">awful.hooks</a>
	</li>

	<li>
		<a href="../modules/awful.key.html">awful.key</a>
	</li>

	<li>
		<a href="../modules/awful.layout.html">awful.layout</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.html">awful.layout.suit</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.fair.html">awful.layout.suit.fair</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.floating.html">awful.layout.suit.floating</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.magnifier.html">awful.layout.suit.magnifier</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.max.html">awful.layout.suit.max</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.spiral.html">awful.layout.suit.spiral</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.tile.html">awful.layout.suit.tile</a>
	</li>

	<li>
		<a href="../modules/awful.menu.html">awful.menu</a>
	</li>

	<li>
		<a href="../modules/awful.mouse.html">awful.mouse</a>
	</li>

	<li>
		<a href="../modules/awful.mouse.finder.html">awful.mouse.finder</a>
	</li>

	<li>
		<a href="../modules/awful.placement.html">awful.placement</a>
	</li>

	<li>
		<a href="../modules/awful.prompt.html">awful.prompt</a>
	</li>

	<li>
		<a href="../modules/awful.remote.html">awful.remote</a>
	</li>

	<li>
		<a href="../modules/awful.rules.html">awful.rules</a>
	</li>

	<li>
		<a href="../modules/awful.screen.html">awful.screen</a>
	</li>

	<li>
		<a href="../modules/awful.startup_notification.html">awful.startup_notification</a>
	</li>

	<li>
		<a href="../modules/awful.tag.html">awful.tag</a>
	</li>

	<li>
		<a href="../modules/awful.titlebar.html">awful.titlebar</a>
	</li>

	<li>
		<a href="../modules/awful.tooltip.html">awful.tooltip</a>
	</li>

	<li>
		<a href="../modules/awful.util.html">awful.util</a>
	</li>

	<li>
		<a href="../modules/awful.wibox.html">awful.wibox</a>
	</li>

	<li>
		<a href="../modules/awful.widget.html">awful.widget</a>
	</li>

	<li>
		<a href="../modules/awful.widget.button.html">awful.widget.button</a>
	</li>

	<li>
		<a href="../modules/awful.widget.common.html">awful.widget.common</a>
	</li>

	<li>
		<a href="../modules/awful.widget.graph.html">awful.widget.graph</a>
	</li>

	<li>
		<a href="../modules/awful.widget.launcher.html">awful.widget.launcher</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.html">awful.widget.layout</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.default.html">awful.widget.layout.default</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.horizontal.html">awful.widget.layout.horizontal</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.vertical.html">awful.widget.layout.vertical</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layoutbox.html">awful.widget.layoutbox</a>
	</li>

	<li>
		<a href="../modules/awful.widget.progressbar.html">awful.widget.progressbar</a>
	</li>

	<li>
		<a href="../modules/awful.widget.prompt.html">awful.widget.prompt</a>
	</li>

	<li>
		<a href="../modules/awful.widget.taglist.html">awful.widget.taglist</a>
	</li>

	<li>
		<a href="../modules/awful.widget.tasklist.html">awful.widget.tasklist</a>
	</li>

	<li>
		<a href="../modules/awful.widget.textclock.html">awful.widget.textclock</a>
	</li>

	<li>
		<a href="../modules/beautiful.html">beautiful</a>
	</li>

	<li>
		<a href="../modules/button.html">button</a>
	</li>

	<li>
		<a href="../modules/client.html">client</a>
	</li>

	<li>
		<a href="../modules/dbus.html">dbus</a>
	</li>

	<li>
		<a href="../modules/image.html">image</a>
	</li>

	<li>
		<a href="../modules/key.html">key</a>
	</li>

	<li>
		<a href="../modules/keygrabber.html">keygrabber</a>
	</li>

	<li>
		<a href="../modules/mouse.html">mouse</a>
	</li>

	<li>
		<a href="../modules/mousegrabber.html">mousegrabber</a>
	</li>

	<li><strong>naughty</strong></li>
	
	<li>
		<a href="../modules/root.html">root</a>
	</li>

	<li>
		<a href="../modules/screen.html">screen</a>
	</li>

	<li>
		<a href="../modules/selection.html">selection</a>
	</li>

	<li>
		<a href="../modules/tag.html">tag</a>
	</li>

	<li>
		<a href="../modules/timer.html">timer</a>
	</li>

	<li>
		<a href="../modules/wibox.html">wibox</a>
	</li>

	<li>
		<a href="../modules/widget.html">widget</a>
	</li>

</ul>



<!-- File list -->






</div><!-- id="navigation" -->

<div id="content">

<h1>Module <code>naughty</code></h1>

<p>Notification library</p>

<p><b>Author:</b>
<table class="authors_list">

	<tr><td class="name">koniu &lt;gkusnierz@gmail.com&gt;</td></tr>

</table>
</p>


<p>Copyright&copy; 2008 koniu</p>


<p><small><b>Release:</b> v3.4.15 </small></p>



<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#destroy">destroy</a>&nbsp;(notification)</td>
	<td class="summary">Destroy notification by notification object </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#notify">notify</a>&nbsp;(args, text, title, timeout, hover_timeout, screen, position, ontop, height, width, font, icon, icon_size, fg, bg, border_width, border_color, run, preset, replaces_id, callback)</td>
	<td class="summary">Create notification.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#resume">resume</a>&nbsp;()</td>
	<td class="summary">Resume notifications </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#suspend">suspend</a>&nbsp;()</td>
	<td class="summary">Suspend notifications </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#toggle">toggle</a>&nbsp;()</td>
	<td class="summary">Toggle notification state </td>
	</tr>

</table>




<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#config">config</a></td>
	<td class="summary">Naughty configuration - a table containing common popup settings.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#config.presets">config.presets</a></td>
	<td class="summary">Notification Presets - a table containing presets for different purposes Preset is a table of any parameters available to notify() You have to pass a reference of a preset in your notify() call to use the preset At least the default preset named "normal" has to be defined The presets "low", "normal" and "critical" are used for notifications over DBUS </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#notifications[screen][position]">notifications[screen][position]</a></td>
	<td class="summary">Index of notifications.</td>
	</tr>

</table>



<br/>
<br/>



<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="destroy"></a><strong>destroy</strong>&nbsp;(notification)</dt>
<dd>
Destroy notification by notification object


<h3>Parameters</h3>
<ul>
	
	<li>
	  notification: Notification object to be destroyed
	</li>
	
</ul>






<h3>Return value:</h3>
True if the popup was successfully destroyed, nil otherwise



</dd>




<dt><a name="notify"></a><strong>notify</strong>&nbsp;(args, text, title, timeout, hover_timeout, screen, position, ontop, height, width, font, icon, icon_size, fg, bg, border_width, border_color, run, preset, replaces_id, callback)</dt>
<dd>
Create notification. args is a dictionary of (optional) arguments.


<h3>Parameters</h3>
<ul>
	
	<li>
	  args: 
	</li>
	
	<li>
	  text: Text of the notification. Default: ''
	</li>
	
	<li>
	  title: Title of the notification. Default: nil
	</li>
	
	<li>
	  timeout: Time in seconds after which popup expires. Set 0 for no timeout. Default: 5
	</li>
	
	<li>
	  hover_timeout: Delay in seconds after which hovered popup disappears. Default: nil
	</li>
	
	<li>
	  screen: Target screen for the notification. Default: 1
	</li>
	
	<li>
	  position: Corner of the workarea displaying the popups. Values: "top_right" (default), "top_left", "bottom_left", "bottom_right".
	</li>
	
	<li>
	  ontop: Boolean forcing popups to display on top. Default: true
	</li>
	
	<li>
	  height: Popup height. Default: nil (auto)
	</li>
	
	<li>
	  width: Popup width. Default: nil (auto)
	</li>
	
	<li>
	  font: Notification font. Default: beautiful.font or awesome.font
	</li>
	
	<li>
	  icon: Path to icon. Default: nil
	</li>
	
	<li>
	  icon_size: Desired icon size in px. Default: nil
	</li>
	
	<li>
	  fg: Foreground color. Default: beautiful.fg_focus or '#ffffff'
	</li>
	
	<li>
	  bg: Background color. Default: beautiful.bg_focus or '#535d6c'
	</li>
	
	<li>
	  border_width: Border width. Default: 1
	</li>
	
	<li>
	  border_color: Border color. Default: beautiful.border_focus or '#535d6c'
	</li>
	
	<li>
	  run: Function to run on left click. Default: nil
	</li>
	
	<li>
	  preset: Table with any of the above parameters. Note: Any parameters specified directly in args will override ones defined in the preset.
	</li>
	
	<li>
	  replaces_id: Replace the notification with the given ID
	</li>
	
	<li>
	  callback: function that will be called with all arguments the notification will only be displayed if the function returns true note: this function is only relevant to notifications sent via dbus
	</li>
	
</ul>




<h3>Usage:</h3>
naughty.notify({ title = "Achtung!", text = "You're idling", timeout = 0 })



<h3>Return value:</h3>
The notification object



</dd>




<dt><a name="resume"></a><strong>resume</strong>&nbsp;()</dt>
<dd>
Resume notifications









</dd>




<dt><a name="suspend"></a><strong>suspend</strong>&nbsp;()</dt>
<dd>
Suspend notifications









</dd>




<dt><a name="toggle"></a><strong>toggle</strong>&nbsp;()</dt>
<dd>
Toggle notification state









</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="config"></a><strong>config</strong></dt>
<dd>Naughty configuration - a table containing common popup settings.


<em>Fields</em>
<ul>
	
	<li>
	  padding: Space between popups and edge of the workarea. Default: 4
	</li>
	
	<li>
	  spacing: Spacing between popups. Default: 1
	</li>
	
	<li>
	  icon_dirs: List of directories that will be checked by getIcon() Default: { "/usr/share/pixmaps/", }
	</li>
	
	<li>
	  icon_formats: List of formats that will be checked by getIcon() Default: { "png", "gif" }
	</li>
	
	<li>
	  default_preset: Preset to be used by default. Default: config.presets.normal
	</li>
	
	<li>
	  notify_callback: Callback used to modify or reject notifications. Default: nil Example: naughty.config.notify_callback = function(args) args.text = 'prefix: ' .. args.text return args end
	</li>
	
</ul>


</dd>


<dt><a name="config.presets"></a><strong>config.presets</strong></dt>
<dd>Notification Presets - a table containing presets for different purposes Preset is a table of any parameters available to notify() You have to pass a reference of a preset in your notify() call to use the preset At least the default preset named "normal" has to be defined The presets "low", "normal" and "critical" are used for notifications over DBUS


<em>Fields</em>
<ul>
	
	<li>
	  low: The preset for notifications with low urgency level
	</li>
	
	<li>
	  normal: The default preset for every notification without a preset that will also be used for normal urgency level
	</li>
	
	<li>
	  critical: The preset for notifications with a critical urgency level
	</li>
	
</ul>


</dd>


<dt><a name="notifications[screen][position]"></a><strong>notifications[screen][position]</strong></dt>
<dd>Index of notifications. See config table for valid 'position' values. Each element is a table consisting of:


<em>Fields</em>
<ul>
	
	<li>
	  box: Wibox object containing the popup
	</li>
	
	<li>
	  height: Popup height
	</li>
	
	<li>
	  width: Popup width
	</li>
	
	<li>
	  die: Function to be executed on timeout
	</li>
	
	<li>
	  id: Unique notification id based on a counter
	</li>
	
</ul>


</dd>


</dl>



</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>