Commit Graph

2277 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee cd632e4a84 mouse.dragtotag: Fix and port to the new move API
It wasn't really working as it would in other WM. It might have
been a feature, but I got the behavior in line with KDE and Gnome.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee a62e749216 mouse.snap: Add some configuration options 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e31563b056 mouse.move: Return the corner 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee a39b93f2e3 mouse: Add is_*_mouse_button_pressed helper properties. 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e78ad709e7 doc: Move request:: handler to their own documentation section 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 47fffb5eee mouse: Add current_client property
It is called wibox instead of drawin because from the user
point of view, it will be a wibox anyway.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee fc2d359722 doc: Add a coords example
This forced the `coords()` documentation to be moved to Lua.
Keeping it in the C file caused yet another example CMake hack.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 800b8c7d4a doc: Merge awful.mouse and mouse documentation pages
Just like client, tag and screen, this is to avoid new users some
confusing implementation details.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 0b6cd90dce mouse: Implement the Lua custom property handler 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee f0546b900d tests: Improve the placement compositing tests 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 07e1b975a7 mouse.snap: Use a composed placement function 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 1802e9e2fe awful.placement: Add a `scale` function 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 80ee4e9f5d awful.mouse.snap: Add a visual cue 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 91cdc4a899 awful.mouse.snap: Support windows 7 style screen edges snap 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee baec2efe2d awful.mouse.move: Fix snapping support 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 86ca6222e2 awful.mouse.snap: Add a configurable default distance 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 2624370cc0 awful.mouse: Move snap into a submodule 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee b5a1a8d6e5 layout: Handle tiled client request::geometry 'mouse.move' 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 688021d087 ewmh: Ignore request::geometry for tiled clients
It causes flicker
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee cdcfb913f1 awful.mouse: Move clients using request::geometry 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee c286470c17 awful.placement: Port `under_mouse` to the new argument syntax 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 2f819df7f7 awful.placement: Add 'offset' argument 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee e6a04a5922 awful.placement: Extend the compositing feature
It can now keep the different return values and use them in
later chain nodes.

It also add a "virtual" geometry argument so the geometry is applied
only after the last node is executed.

Finally, it fixes using pretend and a composite chain at the same time.
2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee be455cb140 awful.mouse: Add a request::geometry handler. 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee f8f57fb6b7 awful.mouse: Add a generic mousegrabber
Previously, all layouts had their own mouse grabbing logic. The
new one is based on the client request::geometry feature.
2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee e93e2913b6 awful.placement: Fix a closest_corner corner case
When the mouse was exactly on the right or bottom edge, there was a
rounding error.
2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 7242b30c01 awful.mouse: Deprecate awful.mouse.client.corner 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 75af0a24c7 awful.placement: Add a 'pretend' option 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 75764108e1 awful.placement: Make all functions return the geometry 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 3e7a7f23c2 tests: Test awful.placement.resize_to_mouse 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 5f17f1aa83 resize_to_mouse: Support size_hints 2016-04-30 04:27:33 -04:00
Emmanuel Lepage Vallee 604ea15c45 awful.placement: Add a 'resize_to_mouse' function 2016-04-30 03:34:14 -04:00
Uli Schlachter a1e340d118 Merge branch 'replace-popen-to-async' of https://github.com/actionless/awesome 2016-04-30 09:11:50 +02:00
Uli Schlachter a60b718db2 Merge branch 'placement-fallback-to-screen.workarea' of https://github.com/blueyed/awesome 2016-04-30 09:11:33 +02:00
Uli Schlachter 2da981afdd Merge branch 'screen-gc' of https://github.com/psychon/awesome 2016-04-30 09:10:26 +02:00
Uli Schlachter ede88d8bce Fix awful.screen.getbycoord when no screens exist
When there are no screens, screen[1] causes an error. Thus, this isn't a safe
fallback for these functions. Instead, this commit makes the code prefer the
primary screen, if possible. If no screen exists, then screen.primary will be
nil, but at least it won't throw an error like screen[1] does.

(This also changes the outdated copy of getbycoord that exists in
wibox.drawable)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-28 17:42:15 +02:00
actionless 4eb80853c2 feat(lib: menubar): replace io.popen to lgi 2016-04-28 17:07:24 +02:00
Emmanuel Lepage Vallée 201090100b Merge pull request #854 from actionless/use-gio-in-awful-util-is-dir
refactor(awful: util): use lgi.Gio for is_dir
2016-04-28 00:06:11 -04:00
Emmanuel Lepage Vallee 693a87ef2e mouse: Avoid an error when the client is killed while moving
to reproduce:

1) spawn an xterm
2) enter 'sleep 10 && killall xterm'
3) start moving the terminal

There will be an error

(found by a yet to be commited integration test)
2016-04-27 19:55:39 -04:00
actionless 14f7d20d0f refactor(awful: util): use lgi.Gio for is_dir 2016-04-27 18:30:41 +02:00
Wolfgang Popp 76313263b6 Add clear() function to awful.widget.graph and doc fixes (#847)
* awful.widget.graph: add clear() function.

* awful.widget.graph: doc fixes for add_value.
add_value did not show up in generated luadoc. And the value parameter does not need to be between 0 and 1.

* awful.widget.graph: local functions clear and add_value as methods of graph.
2016-04-26 22:14:09 +02:00
Daniel Hahler ad304a2596 Make awful.client.focus.history.list public (#842)
There used to be `awful.client.data.focus`, which was moved to
`awful.client.focus.history.internal`.
While the former was accessible, the latter is not.

This is useful to get a list of most recently focused clients, without
having to hook into the signal yourself.

Closes https://github.com/awesomeWM/awesome/issues/841.
2016-04-26 10:02:23 +02:00
Uli Schlachter a0d47f8ea5 awful.wibox: Fix some minor things
capi.awesome is unused and capi.screen is unused, but really should be used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-26 09:34:54 +02:00
Uli Schlachter 9b44e9a011 tag:delete(): Allow deletion of the last tag
When a tag is deleted, this code tries to select some other tag. If the tag
which is to delete is the last tag of a screen, this code failed and indexed a
nil value. Fix this with a simple "if".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-26 09:34:54 +02:00
Uli Schlachter 2485d334cf awful.layout.arrange(): Handle screen removal
If a screen is removed while a re-layout is pending, previously this code would
cause errors and problems. Since the screen is gone, there is nothing to arrange
anyway and we can just not do anything.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-26 09:34:54 +02:00
Uli Schlachter fc390ff405 Use weak keys for referring to screens
This commit changes some tables that are used for per-screen stuff to have weak
keys, so that the screens can be garbage-collected, if needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-26 09:34:54 +02:00
Daniel Hahler 02b6f9893d awful.placement.no_overlap: use screen.workarea as fallback
When there is a maximized and floating client,
`awful.placement.no_overlap` would end up with an empty list of areas to
place the client into.

This patch fixes it to use the default `screen.workarea` in that case.

Closes https://github.com/awesomeWM/awesome/issues/813.
2016-04-26 00:48:19 +02:00
actionless cdb5a0f046 fix(awful: rules): floating property 2016-04-25 15:43:14 +02:00
Emmanuel Lepage Vallee 2ccc7c88d6 awful.mouse.snap: Fix invalid fallback 2016-04-23 22:12:28 -04:00
Daniel Hahler 135ff4b0c8 Use gears.protected_call with awful.rules callbacks (#843)
Fixes https://github.com/awesomeWM/awesome/issues/840#issuecomment-211823483.
2016-04-20 22:34:16 +02:00
Emmanuel Lepage Vallée cdc6909bc7 Merge pull request #824 from Elv13/rules_refactor
Rules refactor, part 1

This fix the following awful.rules bugs:

 * **x**: Broken when "border_width" is set or left titlebars are used
 * **y**: Borken when"border_width" is set or top titlebars are used
 * **width**: See above + right litlebar
 * **height**: Same as above
 * **switchtotag**: Have a race with the "manage" -> "tag.withcurrent" code in `awful.tag`
 * **tag**: Had dead code
 * **screen**: Had a race condition with switchtotag
 * **urgent**: Had a race with screen and another with switchtotag+focus
 * **focusable**: Was broken yet again when request::activate was introduced (and also because of FS1098, that I also fixed)
 * **no_overlap**: The "no_overlap" call in rc.lua "manage" section conflict with the geometry rules as the hints are not set (idk why).
 * **size_hints_honor**: If set to false, it would be applied too late, causing height and width offsets due to placement or various geometry related properties
2016-04-20 00:39:45 -04:00
Emmanuel Lepage Vallee a4f1b760bd awful.rules: Apply size_hints_honor early
There is a property race with width, height and geometry
2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee e54387904b client: Add request::geometry
Remove request::fullscreen and request::maximized_* and use
a single request for them. The other client resizing features
will soon also start to use this.
2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee f681ace587 ewmh: Take focusable into account in request::activate 2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee c678a0d426 awful.rules: Apply floating early 2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee 06716df05a awful.rules: Apply border_width early 2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee 89edc92110 awful.rules: Add the 'tags' property
Due to recent changes, it was no longer possible to disable the
default tag selection handler. This commit extend the already
existing request::tag mechanism to let handlers select the tags.
2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee f72dcce4bd titlebars: Use the request system rather than 'manage'.
As awesomerc.lua "manage" section is executed after the rules, using
a 'geometry' or 'placement' property in the rules was broken.
2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee 299e155acc client: Extend request::tag instead of awful.tag.withcurrent
There was a regression when refactoring the API. It was no longer
possible to disable the automatic tag selection.

Due to recent changes, it was no longer possible to disable the
default tag selection handler. This commit extend the already
existing request::tag mechanism to let handlers select the tags.
2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee 7cd76e0529 awful.rules: Add 'placement' property 2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee b0aedcda67 awful.rules: Add `new_tag` property
Create a new dynamic tag for the client.
2016-04-20 00:11:04 -04:00
Emmanuel Lepage Vallee 090f2b83ac awful.rules: Avoid trying to set some properties
This avoid unwanted signals or properties being set twice.
2016-04-20 00:10:42 -04:00
Emmanuel Lepage Vallee ddf14a3ffc awful.rules: Refactor the code to avoid many race conditions.
Testing demonstrated that many rule properties were broken when used
together. This commit try to address this by forcing an execution order
that doesn't trigger the problems.

It is still possible to write broken rules, but it should not happen by
accident anymore. Users should not try to assign the client a tag on
screen 2 and also use screen=screen[1].
2016-04-20 00:08:28 -04:00
Emmanuel Lepage Vallee a2a5448442 awful.rules: Remove dead code
Also change the focus callback signature to match the others
2016-04-20 00:02:38 -04:00
Emmanuel Lepage Vallee 2a8cc08ca1 awful.rules: Make adding new properties easier.
This commit also add a 3 step process to apply rules.

Testing showed that many rules are currently broken because
of execution races.

Create a new dynamic tag for the client.
2016-04-20 00:02:01 -04:00
Daniel Hahler 761e244b32 Handle `awful.util.deprecate('Use …')` style (#837) 2016-04-19 22:37:14 +02:00
Emmanuel Lepage Vallee fe8beaeaac placement: Fix incorect use of the border_width
The code and tests assumed the border was equaly applied around
the geometry while the {x,y} pair of the geometry include the
border.
2016-04-18 23:56:23 -04:00
Emmanuel Lepage Vallee bfc8f35fb9 placement: Support composition.
Multiple placement function can now be daisy chained like
in gears.matrix. This is useful for building rules.
2016-04-18 23:55:52 -04:00
Emmanuel Lepage Vallee 2b5d918a8d awful.placement: Add a memento system.
It is used by the ewmh methods.
2016-04-18 23:55:52 -04:00
Emmanuel Lepage Vallee fcd320c7f6 Make awful.rules mandatory
There was many unfixable race conditions that could only be
solved by better integrating the request:: system and
awful.rules. This has the side effect to make rules mandatory.
2016-04-18 23:55:52 -04:00
Daniel Hahler 473df11e1f Streamline/cleanup util.deprecate calls 2016-04-18 23:20:16 +02:00
Emmanuel Lepage Vallée bc2ddfe82d Merge pull request #820 from Elv13/layout_tests
tests: Test all client layouts
2016-04-18 04:27:11 -04:00
Emmanuel Lepage Vallee 7654abcedc layout.tile: Avoid negative geometries 2016-04-18 04:20:23 -04:00
Emmanuel Lepage Vallee b938a99e1e layout: Avoid creating negative geometries when adding gaps 2016-04-18 04:20:22 -04:00
Daniel Hahler 58068ff538 Merge pull request #831 from psychon/naughty-no-screen
naughty: Print notification content in "no screen" warning
2016-04-18 00:36:17 +02:00
Abdo Roig-Maranges 3c3e2daeb2 fix deprecation warning 2016-04-17 16:35:08 +02:00
Uli Schlachter 76266abcfa naughty: Print notification content in "no screen" warning
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-17 15:21:02 +02:00
Uli Schlachter bf652914dd Merge branch 'rules-screen' of https://github.com/psychon/awesome 2016-04-15 19:35:23 +02:00
Uli Schlachter cd55c57937 Merge branch 'root-size' of https://github.com/psychon/awesome 2016-04-15 19:35:12 +02:00
Uli Schlachter 79e16cf950 awful.rules.execute: Make for loop easier to read
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2016-04-12 09:33:39 +02:00
Uli Schlachter fb8c70b07d awful.rules: Fix switchtotag with tag names
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-12 09:32:32 +02:00
Uli Schlachter 65fa565cef Update awful.rules tag-related examples
Fixes: https://github.com/awesomeWM/awesome/issues/799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-12 09:31:46 +02:00
Uli Schlachter 9cc28a8da5 awful.rules: Allow specifying tags by name
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-12 09:31:46 +02:00
Uli Schlachter 7d5e80a8ee Add awful.tag.find_by_name
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-12 09:30:52 +02:00
Uli Schlachter 53bebfde02 awful.rules: Add support for screen names
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-12 09:27:37 +02:00
Uli Schlachter 2fe9a6dfdf awful.rules: Fix a typo in the docs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-12 09:26:21 +02:00
Emmanuel Lepage Vallee f9add1c49a awful.tag: Rename nmaster to master_count 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee e8908e2c62 awful.tag: Rename mwfact to master_width_factor 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee ff9e74ac0b awful.tag: Remove the old dynamic property system
It is no longer relevant.
2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee dd52f1ce86 awful.tag: Move functions to awful.client and screen 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee 493684a5c0 awful.tag: Merge API documentation with tag 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee eb133175ba awful.screen: Add some client getter properties 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee 00d782f3d3 awful.screen: Deprecate functions, add methods 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee a4bc49b540 awful.screen: Merge screen and awful.screen API doc 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee 16fe91d5f3 awful.client: Add a new section for layout related functions
The new stateful layout system try to avoid coupling and therefor
doesn't use these methods. It is not planned to deprecate the
stateless layout API, so these functions are just kept as-is with
the old naming convention.
2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee d44d83fdb6 awful.client: Refactor all marked function into a property
This is unused internally since Awesome 3.2. There is probably 0 users
of this left, but I don't want to break the API.
2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee 43f1561f26 awful.client: Convert all remaining functions to methods. 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee e15fea6a46 awful.client: Use the explicit @function tag for each helpers
This allow them to be placed in the right category.
2016-04-11 23:54:27 -04:00
Emmanuel Lepage Vallee 0c1e4e3a2b awful.client: Move `urgent` in their own submodule 2016-04-11 23:54:27 -04:00
Emmanuel Lepage Vallee 587fc1fbb4 awful.client.shape: Turn into a client submodule. 2016-04-11 23:54:27 -04:00
Emmanuel Lepage Vallee 608f3eb7cf awful.client: Add an is_fixed property 2016-04-11 23:54:27 -04:00
Emmanuel Lepage Vallee dfdb6aedf7 awful.client: Document the new signals. 2016-04-11 23:54:27 -04:00
Emmanuel Lepage Vallee 9027cabd8c awful.client: Move `dockable` to the property system
Note that the setter is no longer necessary and is implicitly
generated.
2016-04-11 23:54:27 -04:00
Emmanuel Lepage Vallee fad55a868b awful.client: Move the focus related methods into a submodule 2016-04-11 23:54:22 -04:00
Emmanuel Lepage Vallee 29feceb80d documentation: Merge awful.client and client pages
ldoc doesn't allow to specify fields from class "A" into class "B",
so the only solution is to merge the 2.

Also, one of the most common complain on IRC since Awesome 3.0 is
that the client API doc is  confusing since it is in 2 different files.

Also restore the `awful.client` doc link, point to `client`

This will avoid broken links.
2016-04-11 23:46:10 -04:00
Emmanuel Lepage Vallee 82342f055c awful.client: Deprecate .floating.get/set
Begin to formalize the getter/setter syntax into a coherent one
2016-04-11 23:46:10 -04:00
Emmanuel Lepage Vallee 828543c838 gears.object.properties: Support 'obj.is_something'
Used when there a property is set by mutators instead of accessors.
2016-04-11 23:46:10 -04:00
Emmanuel Lepage Vallee 11f0620d7c awful.key: Add a function to execute keybindings 2016-04-11 23:46:10 -04:00
Emmanuel Lepage Vallee 8d95610363 placement: Fix a minor issue with closest_corner
It was using the wrong matrix in 2x2 mode.
2016-04-10 03:27:20 -04:00
Uli Schlachter 7863a5e65b gears.wallpaper: Use root.size()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-09 15:19:46 +02:00
Emmanuel Lepage Vallee 8a0738a4bc gears.screen: Merge into awful.screen
gears modules usually don't depend on Awesome C-API. This code has
been placed there for unclear reasons.

Also, there is ongoing work to unify each "concepts" API into one
single page. Having `gears.screen` go against this effort.
2016-04-06 23:32:44 -04:00
Daniel Hahler c85bbeafdb naughty.notify: handle non-existing screen, print a warning
Ref: https://github.com/awesomeWM/awesome/issues/796
2016-04-05 00:31:45 +02:00
Daniel Hahler 742717ec22 doc: improve doc for awful.screen.focused 2016-04-04 23:49:43 +02:00
Daniel Hahler c86c873779 minor: clarify mod-ctrl-shift-X comment; fix typo 2016-04-04 20:30:48 +02:00
Daniel Hahler df21a85a9a doc: fixes for spawn.with_line_callback 2016-04-04 20:30:48 +02:00
Daniel Hahler 5db280ab73 minor: doc / formatting 2016-04-04 20:30:44 +02:00
Emmanuel Lepage Vallee e24cb901cb Typo: Ajust -> Adjust 2016-04-04 00:56:11 -04:00
Daniel Hahler 3e5b1b3ba9 Merge pull request #782 from psychon/wallpaper-change
Changes to wallpaper change
2016-04-03 18:35:27 +02:00
Daniel Hahler 3ad0a9d8d2 Merge pull request #780 from psychon/screen-add-signal
Add screen add signal
2016-04-03 18:35:08 +02:00
Daniel Hahler 0f615670e3 Merge pull request #787 from awesomeWM/lgi-stream-end
awful.spawn: Reliably detect end-of-file
2016-04-03 18:34:04 +02:00
Emmanuel Lepage Vallee f7b5240571 awful.placement: Improve documentation 2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee 12c80e3977 awful.placement: Add `maximize` aliases
Use the same conventions as `align` and `stretch` aliases
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee 7ab83afbbc tests: Test `awful.placement.maximize` 2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee 59b24cbd35 awful.placement: Add a `maximize` method
It should eventually be re-used by ewmh.lua
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee 19913ba62d awful.placement: Add various `stretch` aliases
Use the same convention as `align` aliases
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee b4d2a5c541 awful.placement: Add a `stretch` method
This will eventually be re-used by `awful.wibox`
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee d85b7eb3e5 awful.placement: Add aliases for the `align` method
This re-use the `align` code for the existing `centered`,
`center_horizontal` and `center_vertical` methods. It also
add all the other edges and corners alias.
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee 456f0bb70c awful.placement: Add `align` method
This allow to place a client, wibox or cursor at the
edges, corners or center of the parent geometry.

This also add code from `awful.wibox` to ajust the workarea.
Future commit will use `awful.placement` to place `awful.wibox`.
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallee 5a5f0167cf awful.placement: Add `closest_corner`
This commit also add many local helper functions. They will be
re-used by the next few commits.
2016-03-31 05:04:24 -04:00
Emmanuel Lepage Vallée b1a93e4540 Merge pull request #773 from Elv13/add_testing_framework
tests: Add a new GUI testing framework
2016-03-31 04:50:32 -04:00
Emmanuel Lepage Vallee c64c223ede tests: Improve wibox.widget.background documentation 2016-03-31 04:45:46 -04:00
Emmanuel Lepage Vallee e7652a053d tests: Add a new testing framework 2016-03-31 04:45:45 -04:00
Emmanuel Lepage Vallee 9da40d010c gears.surface: Add methods to convert widgets to surfaces
It can be saved directly to a PNG or SVG file or used as a cairo
surface or pattern.
2016-03-31 04:45:45 -04:00
Emmanuel Lepage Vallée fdc25bbb99 Merge pull request #789 from aroig/gh/layout-names
fixes to keyboard layout names
2016-03-31 00:30:35 -04:00
Emmanuel Lepage Vallée 0953db56d8 Merge pull request #757 from Elv13/properties
C-API objects properties
2016-03-30 23:32:12 -04:00
Emmanuel Lepage Vallee 3322a17182 screen: Support property fallback 2016-03-30 23:25:44 -04:00
Emmanuel Lepage Vallee 89a1dab845 client: Support property fallback 2016-03-30 23:25:44 -04:00
Emmanuel Lepage Vallee e0897cf170 tag: Support property fallback 2016-03-30 23:25:44 -04:00
Abdo Roig-Maranges cb46f09361 make keyboard layout naming function easily overridable 2016-03-30 15:41:30 +02:00
Abdo Roig-Maranges 1879966556 handle layout names like us(altgr-intl) 2016-03-30 14:45:48 +02:00
Emmanuel Lepage Vallee a77e650c5f gears.object: Add a new "property fallback" object type 2016-03-30 03:27:19 -04:00
Abdo Roig-Maranges af7495de5a fix number check for the screen argument
The check was not done for the elseif case, and caused a comparison
runtime error.
2016-03-29 17:03:07 +02:00
Uli Schlachter c04718a150 Fix awful.spawn to work with more LGI versions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-28 17:53:52 +02:00
Emmanuel Lepage Vallee 995361449a awful.screen: Fix addition between object and number
Fix #784
2016-03-28 04:39:19 -04:00
Uli Schlachter d9c918c14a wibox.drawable: Stop caching the wallpaper
The C code now does this for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 11:45:14 +02:00
Uli Schlachter 3233eb6cce gears.wallpaper: Use connect_for_each_screen()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 10:51:28 +02:00
Uli Schlachter 3f40183177 naughty: Use connect_for_each_screen()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 10:51:28 +02:00
Uli Schlachter 94dede7511 Add functions for calling something for every screen
This adds gears.screen which contains a wrapper around
screen.connect_signal("added", func) that also calls the callback function for
each screen that already exists. This is added in gears.screen so that it can
also be used from e.g. wibox, if needed. Feel free to move this elsewhere if
that's a bad idea (I'm not really convinced of it).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 10:51:28 +02:00
Uli Schlachter 8ef96bcde7 gears.matrix: Remove (now-)unused code
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-26 19:37:21 +01:00
Uli Schlachter 96055fc86b gears.shape: Stop using _call on a matrix
Instead of using a special _call field on gears.matrix instances which has to be
copied around suitably, this commit changes the code so that the magic is
restricted to a single function in gears.shape.transform. With some metatable
magic, suitable redirection to everything is added.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-26 19:33:10 +01:00
Uli Schlachter 19f146de5f Add missing modeline to gears.shape
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-26 19:32:40 +01:00
Emmanuel Lepage Vallée e83832f41a Merge pull request #776 from Elv13/awful_screen_improvments
Awful screen improvements
2016-03-26 03:41:22 -04:00
Emmanuel Lepage Vallée 770cfa4553 Merge pull request #775 from Elv13/margins_redraw
Margins redraw
2016-03-26 03:40:42 -04:00
Emmanuel Lepage Vallee a3542c638a awful.layout: Use awful.screen to compute geometry 2016-03-26 03:37:04 -04:00
Emmanuel Lepage Vallee 83df30d3a4 awful.screen.focused: Fix documentation and make more flexible.
Telling the user a method can be monkeypatched is **not** a good
idea.
2016-03-26 03:37:04 -04:00
Emmanuel Lepage Vallee e66166ccee awful.screen: Add a method to apply various paddings.
This avoid code duplications.
2016-03-26 03:37:04 -04:00
Emmanuel Lepage Vallee 9fd329c449 awful.screen.padding: Always return a valid table.
This also fix a bug when the user edit the table. In that case,
the padding was (accidentally) changed without the correct
signals.
2016-03-26 03:15:00 -04:00
Emmanuel Lepage Vallee 242652be94 awful.screen.padding: Support padding number value 2016-03-26 03:14:42 -04:00
Emmanuel Lepage Vallée b2fabfeea1 Merge pull request #770 from Elv13/background_clip
wibox.background: Add shape clip support
2016-03-26 01:51:17 -04:00
Emmanuel Lepage Vallée 5715acfd18 Merge pull request #767 from Elv13/widget_alias
wibox: Add widget and layout metatable for widget creation
2016-03-26 01:50:00 -04:00
Emmanuel Lepage Vallee 35ece57a78 layout.margin: Fix the documentation 2016-03-26 01:46:47 -04:00
Emmanuel Lepage Vallee 87813a5597 layout.margin: Avoid unneeded redraw 2016-03-26 01:46:30 -04:00
Emmanuel Lepage Vallee d2c5e36294 Fix a documentation typo 2016-03-23 18:12:04 -04:00
Emmanuel Lepage Vallee 2eb085c263 wibox.background: Add shape clip support 2016-03-21 03:30:14 -04:00
Emmanuel Lepage Vallee f1816474df wibox: Add widget and layout metatable for widget creation
Calling wibox.widget.base.make_widget_declarative{} is too long, so this
commit add wibox.widget{} and wibox.layout{} alias.
2016-03-19 17:37:33 -04:00
Emmanuel Lepage Vallee f6556b145f gears.shape: Improve documentation 2016-03-16 18:02:41 -04:00
Emmanuel Lepage Vallee 9bd150f39a shape: Add radial_progress shape 2016-03-16 17:45:11 -04:00
Emmanuel Lepage Vallee 650d8d0cb5 shape: Add partially_rounded_rect shape 2016-03-16 17:44:37 -04:00
Emmanuel Lepage Vallee 57e370700f shape: Add losange shape 2016-03-16 17:44:37 -04:00
Emmanuel Lepage Vallee bc16b75ff5 shape: Add parallelogram shape 2016-03-16 17:44:30 -04:00
Emmanuel Lepage Vallee 7b4109265e shape: Add rectangle shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee 990619db5a shape: Add circle shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee 3b95d2467f shape: Add octogon shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee f0bf642f32 shape: Add cross shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee 5dbffc73c1 shape: Minor fixes 2016-03-16 05:57:44 -04:00
Daniel Hahler 491f17f32b Merge pull request #732 from psychon/nicer-tooltip
Nicer tooltip API
2016-03-16 03:09:56 +01:00
Emmanuel Lepage Vallee dc687c0e31 wibox: Clone missing signals 2016-03-12 21:18:09 -05:00
Emmanuel Lepage Vallee 3d660ba37e awful.tag: Add "volatile" property
Useful when using dynamic tags. The tags will be closed once
it is empty. This was part of Tyrannical for many years, but is
generally useful for other workflows too.

   local t = awful.tag.add("my_tag",{volatile=true, screen=2})
   awful.spawn("ayapp", {tag=t})
2016-03-11 01:10:13 -05:00
Daniel Hahler c5526ca336 Merge pull request #746 from psychon/indexless-screen-iteration
Indexless screen iteration
2016-03-07 00:26:22 +01:00
Daniel Hahler d1e2cfa135 Merge pull request #741 from psychon/systray-screen
Improvements on the systray / default to displaying the systray on the primary screen
2016-03-07 00:25:47 +01:00
Daniel Hahler 8966c73599 Minor doc fixes 2016-03-06 14:46:13 +01:00
Uli Schlachter 95e5bdf5d2 Use the new way to iterate over screens in Lua
This gets us one step closer to removing screen indices.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 14:05:28 +01:00
Uli Schlachter dd78f8e6f2 Remove another useless iteration over screens
Any signal on a screen instance is also emitted on the screen class, so the here
can just connect to the screen class.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:38:52 +01:00
Uli Schlachter 8b65bad3fc Remove useless iteration over screens
Signals on instances are also emitted on the class and thus we can just connect
to the signal on the class here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:37:38 +01:00
Uli Schlachter 8fd801a6f4 awful.util.get_rectangle_in_direction(): Use pairs
This code works just fine with non-integer table keys. Also, this is used by
awful.screen.focus_bydirection() and thus will be used with screen objects
instead of screen indicies when we get rid of screen indicies.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:34:44 +01:00
Uli Schlachter 2e2e3f07e2 systray: Emit layout_changed / redraw_needed where needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:53:38 +01:00
Uli Schlachter a1b20ef6bb Systray: Add settings for which screen to display on
This makes it possible to have the systray only visible on the primary screen,
which is the new default value. This also makes it possible to configure
directly on which screen the systray should be visible.

This breaks the API in the sense that people who use "the old method" to
configure the systray's screen possibly don't have a systray.

Fixes: https://github.com/awesomeWM/awesome/issues/724
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:49:49 +01:00
Uli Schlachter 1e5dd0c782 systray: Add API documentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:39:25 +01:00
Uli Schlachter ea95963726 systray: Turn this into a singleton
There's no point in having multiple instances of this, because there are no
per-instance settings and the systray can only be visible in a single place at a
time anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:17:35 +01:00
Uli Schlachter 7739a6a7ed Add a property::visible signal to tooltips
As requested here:
b4224a651f (commitcomment-16402861)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 12:32:24 +01:00
Uli Schlachter e347f7191c awful.tooltip: Use metatable magic to create wiboxes lazily
This might make the code a bit easier to follow. Unless you want to know where
the wibox is created...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 12:31:03 +01:00
Emmanuel Lepage Vallée 249a3f7ce0 Merge pull request #737 from Elv13/minor_widget_enhancements
wibox.widget: Minor enhancements
2016-03-04 04:24:34 -05:00
Emmanuel Lepage Vallee 78ed3abe1a wibox.widget: Minor enhancements
* Better widget names when using the declarative syntax
 * Add ratio.get_ratio to avoid using the private API
 * Also support `set_widget` when swapping widgets
2016-03-04 04:16:53 -05:00
Emmanuel Lepage Vallee 2aa15c9454 gears.color: Add transparent constant
Avoid repetitive "#00000000" for transparent wiboxes and such
elements.
2016-03-04 03:16:56 -05:00
Daniel Hahler 7c7295a282 Merge pull request #716 from psychon/wallpaper_cleanup
Wallpaper cleanup
2016-03-03 22:16:48 +01:00
Daniel Hahler a1687dc72e Merge pull request #730 from actionless/fix-menubar-pagination-again
fix(lib: menubar): take in account common list padding
2016-03-03 22:15:11 +01:00
Daniel Hahler ef19a8213a awful.client.jumpto: un-minimize clients
Fixes https://github.com/awesomeWM/awesome/issues/472.
Closes https://github.com/awesomeWM/awesome/pull/729.
2016-03-03 22:09:10 +01:00
Emmanuel Lepage Vallée 3be5343e83 Merge pull request #709 from psychon/implement-set-children-sanely
Implement set children sanely
2016-03-03 02:06:58 -05:00
actionless b93d6a4b25 fix(lib: menubar): take in account common list padding 2016-03-02 15:47:50 +01:00
Daniel Hahler 68bde9d584 Merge pull request #717 from blueyed/callback-for-client.jumpto
Add callback support for client.jumpto
2016-03-01 23:01:32 +01:00