Commit Graph

88 Commits

Author SHA1 Message Date
Uli Schlachter dcc348d75e Fix some random ldoc warnings
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-13 18:06:49 +02:00
Uli Schlachter 271f084735 screen: Turn into proper lua object
This makes the screen objects use our existing infrastructure for implementing
classes and objects with lua instead of hand-rolling an own version.

This results in some small API change: Screen objects no longer have an
add_signal() function and instead this function exists on the parent screen
class.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-30 16:37:19 +02:00
Uli Schlachter 3cbdc2a79f Use awful.layout.layouts for implementing optional parameters
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-28 13:29:16 +01:00
Emmanuel Lepage Vallee bfc6065ad9 Make 'layouts' global 2014-03-28 13:24:04 +01:00
Daniel Hahler fc9284fc53 Drop focus:raise() in magnifier.arrange
This is a useful fix in general, but especially after commit 620732a
(Remove raise call from mouse.client.move).

Ref: https://github.com/awesomeWM/awesome/pull/9#issuecomment-37736135
2014-03-24 17:20:49 +01:00
Daniel Hahler a15e53deec Minor doc fixes 2014-03-15 08:52:14 +01:00
Daniel Hahler 31e3399abe Fallback to comparing layout names in awful.layout.inc
This helps in cases where you have accidentally cloned an entry from
`layouts`.

Previously, no current index would be found and the function would
silently fail.

Signed-off-by: Daniel Hahler <git@thequod.de>
2014-03-14 20:37:24 +01:00
Fabienne Ducroquet 94a8c72596 layouts: spiral: Avoid gaps between windows
When an area is split in two, for example horizontally, one of the windows
should have height math.floor(previous height / 2) and the other
math.ceil(previous height / 2), to be certain that no gaps are left between the
windows.

For instance, if the first window has height h and the second window has height
math.floor(h / 2), the height of the third window should be math.ceil(h / 2)
instead of the same as for the second window.

So to compute the size of window n + 1 it’s necessary to remember the size of
window n - 1 as well as that of window n.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-23 18:39:52 +01:00
Poggles bd05219a72 Make awful.layout.inc() accept a screen number
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-02-19 19:49:07 +01:00
Felix Bier e4be0017ff Incorrect calculation of unused size (FS#1108)
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-02-11 16:10:48 +01:00
Uli Schlachter d13b825c36 Fix warnings from LDoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 15:35:32 +01:00
Uli Schlachter 96e03cb45d Lots of random documentation fixes
This is mostly about mis-named parameters, but also other small things.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 14:09:10 +01:00
Josh Komoroske 8e35e1a6a9 Fixed window gaps in the "fair" tiling mode.
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-10 21:48:46 +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 5d95559977 layout: Remove duplicate capi definition (FS#1032)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-24 21:57:10 +02:00
Uli Schlachter b552000bd9 More fixes for the recent module() removal
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-17 15:24:01 +02:00
Arvydas Sidorenko b18b504fdf Ported awful.layout.suit to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 4ca0298564 Ported awful.layout to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:

    #!/bin/ksh

    git ls-tree -r HEAD | cut -f2 | while read f; do
        egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
        sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
        mv /tmp/foo $f
    done

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-11 17:34:09 +02:00
Uli Schlachter 1ce0b7915b Use signal emitions on classes
Since 3fbb5f1535 "luaobject: emit signals on class too" when a signal
is emitted on some object, it will also be emitted on the class. This means that
we don't have to connect our signals via the "new" signal anymore, but can
instead connect to the signal on the class.

(Of course, the signal on the class gets as first argument the object on which
the signal was emitted)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-26 18:31:06 +02:00
Uli Schlachter ab4c151ed8 Add signals before using them
This commit makes it an error if an unknown signal is connected, disconnected or
emitted. All signals have to be added before they can be used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-25 23:00:36 +02:00
Julien Danjou 6d332f07a0 lua{class,object}: rename signals functions
I knew this was wrong at the beginning, f*ck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:28:20 +02:00
Gregor Best f890aa392c layouts/tile: completely fix client borders
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 10:53:47 +02:00
Gregor Best 752f0225d2 layouts: let client sizing honor the border width
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 20:39:56 +02:00
Julien Danjou 64becbc047 awful.layout: emit arrange signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-06 12:40:13 +01:00
Julien Danjou 371ee3e8cc titlebar: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Gregor Best 851889f2b7 awful.screen: fix padding
Signed-off-by: Gregor Best <gbe@intepi.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-09 20:05:42 +02:00
Julien Danjou 9c651933a4 Revert "awful.layout.suit.magnifier: simplify"
This reverts commit f3c57faf1d.
2009-09-28 14:41:54 +02:00
Julien Danjou f3c57faf1d awful.layout.suit.magnifier: simplify
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-18 13:40:29 +02:00
Julien Danjou 9c21ce8907 awful.layout: listen to geometry signal and lock arrange (FS#625)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-18 11:31:49 +02:00
Julien Danjou 35ff4203d8 magnifier: fix then no tiled client
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:32:53 +02:00
Julien Danjou 26e2e2f375 awful.layout: use attached_add_signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou ef588bf8b8 awful.layout: listen for workarea size changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou d6fd7f1116 awful.wibox: update strut on wibox attachement
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 65825bdd22 awful: move hooks to signals
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou fc035005ba client: emit signal on list changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Fabienne Ducroquet 391e3ea954 layout: spiral: remove useless local variables
Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-19 21:55:58 +02:00
Fabienne Ducroquet 7ae072b791 layout: spiral: test spiral rather than dwindle
Since all the tests are now "not dwindle".

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-19 21:55:57 +02:00
Fabienne Ducroquet d716476872 layout: spiral: refactoring
Look at the problem as "in which cases do we add or remove nw or nh?"
rather than "what do we do when k = ...?".

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-19 21:55:57 +02:00
Fabienne Ducroquet 034a93d691 layout: spiral: remove size check
This is already done by the C code.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-19 21:55:56 +02:00
Fabienne Ducroquet 46f5476e20 layout: spiral: remove the variable i
We have i == k - 1 and k is unused.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-19 21:55:54 +02:00
Julien Danjou cb2cad6b09 client: emit class signal on focus
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-19 16:05:59 +02:00
Julien Danjou 5a70fb6395 awful.layout: do not pass specific param in arrange (FS#541)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-07 15:51:32 +02:00
Gregor Best 7a73227108 awful.layout: fix call to :isvisible()
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-15 09:40:44 +02:00
Uli Schlachter cd862e80cd Add fibanocci layouts ported from the C version
This is based on the C code from commit b9320be372.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-13 11:36:15 +02:00
Gregor Best c0f7c38237 awful.layout: also arrange on client tag change
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-13 11:23:07 +02:00
Julien Danjou 3926f62ea3 hooks: remove arrange
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:44:00 +02:00
Julien Danjou 2b80d94453 awful.layout: register layout property change
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:43:37 +02:00
Julien Danjou 5922eb1fc1 awful.client: register property windowfact and floating for arrange
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:43:29 +02:00
Julien Danjou ef2b18949c awful.tag: call property hooks on properties changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:43:08 +02:00