Commit Graph

47 Commits

Author SHA1 Message Date
Uli Schlachter a6fb932bbc awesome: Add get_* and set_xproperty
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-23 18:23:34 +01:00
Uli Schlachter 4d35f430dc Add awesome.startup
This boolean describes if we are still in startup or if our main loop is already
running.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-16 20:09:43 +01:00
Emmanuel Lepage Vallee d6e06450d3 Add end to end support for spawning tracking using startup notifications
This allow to spawn something, then apply some properties or rules when
the client show up ("manage").

This commit add:
 * "startup_id" property for all clients object (immutable, can be nil)
 * Second return value to awful.util.spawn() with the startup_id
 * Update the documentation

Example:

  local wait_for_it = {}

  local pid,snid = awful.util.spawn("urxvtc")
  wait_for_it[snid] = {ontop=true,sticky=false,
     tag = awful.tag.gettags(mouse.screen)[1] }

  client.connect_signal("manage", function (c, startup)
     if c.startup_id and wait_for_it[c.startup_id] then
        for k,v in pairs(wait_for_it[c.startup_id]) do
           c[k] = v
        end
        if wait_for_it[c.startup_id].tag then
           c:tags({wait_for_it[c.startup_id].tag})
        end
     end
  end)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-15 23:14:02 +01:00
Daniel Hahler ac45dc9f59 Add client.maximized (a shortcut for ~_horizontal and ~_vertical)
This also adds the signals `property::maximized`.

Signed-off-by: Daniel Hahler <git@thequod.de>
2014-03-15 08:49:43 +01:00
Uli Schlachter 1b21dce46c Revert "client: Add c.blob property"
This reverts commit a54636751b.

We now have the new xproperty API which does the same thing in a much nicer way.
Thanks to Elv13 for the idea!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-07 16:21:11 +01:00
Uli Schlachter 62e2dee4ba Add awesome.register_xproperty (FS#1212)
This commits adds awesome.register_xproperty(). This allows lua code to register
arbitrary X11 properties with awesome which will then watch these properties.
Whenever such a property is changed on a client or drawin, we will emit the
xproperty::name signal.

This also adds window:get_xproperty(name) and window:set_xproperty(name, value)
which allows to mess with properties.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-07 16:17:40 +01:00
Uli Schlachter 2f3998639e Update the luadoc for the C API
Thanks to blueyed for noticing that awesome.font doesn't exist any more!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-01 19:28:06 +01:00
Uli Schlachter a54636751b client: Add c.blob property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-02-23 12:26:13 +01:00
Uli Schlachter 360e1a5f92 Add awesome.composite_manager_running
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-02-23 12:14:50 +01:00
Uli Schlachter 56c5797905 Finish C-side support for window shapes (FS#1051)
A drawin's and a client's bounding and clip shape can now be queried and is
returned as a cairo surface.  Also, a client window's shape (e.g. xeyes setting
its own shape) can be queried via c.shape_client_bounding and
c.shape_client_clip.  All of these properties now emit signals when changed.

(This also silently fixes a bug in luaA_drawin_set_shape_bounding() which forgot
to include the drawin's border in its size calculation)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-03 17:01:43 +01:00
Uli Schlachter 29ecc6095f luadoc: Document screen outputs
This was introduced in 2009, commits 9393b2d1 and c08b9034.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-10-31 10:31:54 +01:00
Uli Schlachter 5b5dd0a198 luadoc: Clients have a leader_window, not leader_id
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-06-19 19:15:02 +02:00
Uli Schlachter 3c40d6b470 awesome.spawn: Accept tables as arguments
With this change, awesome.spawn() can be called with a table as its command line
argument. This gets rid of lots of problems with escaping the arguments. For
example, the following call is now possible:

  awesome.spawn({ "bash", "-c", "echo \"foo\"" })

Thanks to Ignas Anikevičius for inspiring me to this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 14:54:58 +01:00
Uli Schlachter dbf20000a5 luadoc: Fix a typo for awesome.release
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 18:56:46 +01:00
Uli Schlachter 43c02c61c5 luadoc/: Remove luadoc hacks
LDoc doesn't need any of this and actually breaks due to it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 14:55:57 +01:00
Uli Schlachter c18f5f22f9 client: Re-add shape support
Same reasoning as for the recent commit which adds these to drawins.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-06 20:51:54 +01:00
Uli Schlachter 37d074f881 Drawin: Re-add shape support
Commit 03e0ee53d2 removed window shapes, because at the time I was too
lazy to port them from the old image system to oocairo.

This commit re-adds them, but for now only as a way to set the shape.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-05 18:11:16 +01:00
Uli Schlachter 8348d44444 Tags: Remove screen property
A tag's screen is now implemented purely in lua and it is no longer C's
business.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-23 10:05:34 +02:00
Uli Schlachter f0512eeaab Introduce drawables
A drawable is something that you can draw to, just like a drawin. However, a
drawable isn't necessarily its own windows. This will later on be used to
implement titlebars where the titlebars are drawables.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:54 +02:00
Sébastien Luttringer 4d5f001887 Add mousegrabber and keygrabber isrunning luadoc
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-12 13:21:07 +02:00
Uli Schlachter 2853d58f52 root: Add a wallpaper setter
This allows lua code to set a wallpaper directly instead of having to spawn some
external tools which possibly aren't installed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-29 15:32:04 +02:00
Uli Schlachter 4f30dfd198 Switch from oocairo to lgi.cairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 19:20:34 +02:00
Uli Schlachter f9d7ac595c Add root.wallpaper() for querying the wallpaper
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-07 21:32:45 +02:00
Anurag Priyam 014d191f66 keygrabber: continue grabbing till keygrabber.stop is explicitly called
Returning true from the callback just to signal keygrabber to continue grabbing
felt redundant (and silly :|).

This will break old code that relied on returning false to stop grabbing,
instead of calling keygrabber.stop.

And fix keygrabber docs.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-29 20:46:42 +01:00
Uli Schlachter 9451fec6f1 Add awesome.load_image()
This uses imlib2 for loading the image and thus supports more image formats than
just PNG.

Almost fixes: FS#958

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-29 14:08:57 +01:00
Julien Danjou 2e8a4fafbc Fix mousegrabber run documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-12-22 10:23:42 +01:00
Anurag Priyam 1d42fd9697 add usage example for keygrabber API
To demonstrate keygrabber API usage, I added a small function to the
docs that can be bound to a key and used to resize clients using
keyboard.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-16 20:20:44 +01:00
Uli Schlachter 97d62c86ac Remove outdated luadoc for widgets
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-08 17:21:39 +02:00
Uli Schlachter 82ef539513 Luadoc: Fixage for the wibox -> drawin move
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:49:30 +02:00
Uli Schlachter db3b1fe431 Image: Remove
Everything now uses oocairo instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 19:36:58 +02:00
Uli Schlachter 787bdbe468 Work around for luadoc bugs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-28 11:12:02 +02:00
Uli Schlachter 8701295e6c Track the number of objects
With this patch, we track the number of objects that are alive for any class.
This information can be accessed via class.instances()

For example:

  print("wiboxes", wibox.instances())
  print("widgets", widget.instances())

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-17 17:39:41 +02:00
Uli Schlachter 03e0ee53d2 Wibox: Remove shape support
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-30 10:22:50 +02:00
Uli Schlachter 8a5f59a31c Fix luadoc for the previous commit
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-25 20:37:49 +02:00
Uli Schlachter 6b2e4352bb Remove globalconf.xinerama_is_active
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 14:20:45 +02:00
Uli Schlachter 544fa215ea Add "focusable" property to client objects
If this property is true, setting "client.focus" to this client might have some
effect. If it is false, setting "client.focus" will be ignored completely.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 13:08:55 +02:00
Uli Schlachter 6cb7d27860 Update API docs for recent change to spawn
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-03 10:14:54 +02:00
Julien Danjou ce5b460f24 dbus: fix D-Bus documentation typo
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-01 10:05:54 +01:00
Julien Danjou 6ee5122462 client: remove redraw()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 13:02:45 +01:00
Julien Danjou d79acb3da9 mouse: coords() get silent parameter
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-06 11:05:07 +01:00
Julien Danjou 371ee3e8cc titlebar: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou d49756c252 luadoc: add awesome.spawn documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-28 11:44:19 +02:00
koniu 06f4a30d5a luadoc: remove module name from functions in client.lua
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-02 12:04:43 +02:00
Brian Gianforcaro b5cef4c1e0 Fix spelling errors in luadoc
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:39:09 +02:00
Julien Danjou ee171f89db luadoc: add selection documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-28 15:42:11 +02:00
Julien Danjou ac7ede50a2 luadoc: add timer documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-28 12:05:38 +02:00
Julien Danjou a9880a6c89 readd proper C API documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00