Commit Graph

97 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee c88c51f74d layout: Fix delayed arrange regression 2015-02-22 22:32:16 +00:00
Daniel Hahler d1984a7a1f Merge pull request #95 from blueyed/signal-client-property-screen-old
Send old_screen with "property::screen" client signal
2015-02-20 23:25:38 +01:00
Emmanuel Lepage Vallée aa0b9becf7 Merge pull request #101 from silverhammermba/drylayouts
DRY off layout code
2015-02-19 19:33:36 +00:00
Max 52ec0ebd93 Don't create borders/set client geometry in layouts
Instead, layouts simply store client geometries in a table.
awful.layout.arrange corrects these for border widths and applies them.
2015-02-15 11:25:11 -05:00
Daniel Hahler 5140ef1764 Send old_screen with "property::screen" client signal
This should improve layout re-arranging with 2+ screens.
2015-02-15 13:26:46 +01:00
Daniel Hahler 17776051ec layout.arrange: delay a call per screen
This is a followup / fix for 7410646, which did not handle multiple
arrange calls to different screens per main lopp.
2015-02-15 12:09:16 +01:00
Daniel Hahler 74106462ac Do layout.arrange only once per main loop
This uses timer.delayed_call to arrange the layouts only once per main
loop.
2015-02-14 15:10:31 +01:00
Robert Siska 8d7b0feedd Layouts can define their own resizing handler (FS#1267) 2014-10-23 01:30:19 +02:00
Emmanuel Lepage Vallee 4120e00649 layouts: Allow layouts to be invoked with fake data
This patch allows 2 things to be done:

* Write unit test to validate layouts using fake clients and tags
* Query the current layout geometry from another tag

The advantages of the former are clear and simple. Those of the later include:

* Creating a screenshot of another layout
* Display the layout wireframe in the tag list (like KDE2-3, Gnome2)
* Having and 'ALT-tab' like visual popup for tags
2014-10-13 15:07:31 -04:00
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