Commit Graph

6877 Commits

Author SHA1 Message Date
Uli Schlachter 051d0de85f Replace many pushnumber calls with pushinteger
The only remaining calls are for a window's opacity and in the DBus type
handling. Everything else wants integers, not something with a comma.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-06 13:46:46 +01:00
Emmanuel Lepage Vallée 720768330c Merge pull request #664 from Elv13/background_border
widget.background: Add shape border support
2016-02-06 03:48:13 -05:00
Emmanuel Lepage Vallee 33c943d9b8 widget.background: Add shape border support 2016-02-06 03:43:42 -05:00
Emmanuel Lepage Vallée 8e6de49dbd Merge pull request #665 from actionless/hotkeys-merge-descriptions
feat(awful: hotkeys widget): merge hotkeys with the same modifiers and descriptions
2016-02-05 21:12:57 -05:00
Daniel Hahler 213b4d52aa Merge pull request #657 from baguette/master
Add `screen::change` signal for Xrandr output change notification events
2016-02-05 00:13:21 +01:00
Uli Schlachter cd63cabadd Always send ConfigureNotifies
ICCCM specifies when the WM has to send a ConfigureNotify. Java does not care
and wants one all the time. Meh.

Fixes: #248
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-04 18:21:25 +01:00
actionless 8a9ae1a073 feat(awful: hotkeys widget): merge hotkeys with the same modifiers and descriptions 2016-02-04 13:14:45 +01:00
Emmanuel Lepage Vallée 19437930a2 Merge pull request #630 from Elv13/upstream_dynamic_p5
Multiple `wibox.layout` enhancements
2016-02-04 03:09:38 -05:00
Emmanuel Lepage Vallee 1f5dae8c18 awful.tag: Fix mistakes from cd0503f55 2016-02-04 00:14:51 -05:00
Emmanuel Lepage Vallee e615173552 layout.fixed: Add methods to manipulate the layout after creation
Until now, this layout was "append only". There was no official
APIs to remove, replace, insert and swap widgets. This is fine
for the usual wibox + sensors widget used by the majority of
users, but lack flexibility necessary to use the layout system
to place dynamic elements such as clients.

The methods introduced by this commit are also recursive. This
allow widgets to be decorated, wrapped and splitted without
having to add boilerplate code everywhere.
2016-02-03 04:01:38 -05:00
Emmanuel Lepage Vallee 330c8d97e1 layout.flex: Base on layout.fixed rather than widget.base
This remove duplicated code and will allow more "collection"
style layouts to be implemented without logic duplication.

This commit also do some small cleanup to remove duplicated
code now present in `awful.util`.

Fixes https://github.com/awesomeWM/awesome/issues/617
2016-02-03 04:00:56 -05:00
Emmanuel Lepage Vallee b2d121aa18 widget.base: Add ':index(w, r)' method
This function is optionally recursive. This allow to manipulate
abstract layouts without really having to care about the exact
hierarchy.
2016-02-03 04:00:56 -05:00
Emmanuel Lepage Vallee 8da5c79bb8 wibox.widget: Add new `get_children(recursive)` method to all widgets 2016-02-03 04:00:42 -05:00
Emmanuel Lepage Vallee 7a7f9f2b64 awful.util: Make 'util.table.merge' return the table
This avoid having to add a temporary variable when returning
from functions. Qt does the same.
2016-02-02 21:32:01 -05:00
Emmanuel Lepage Vallee 4556728b99 util: Add util.table.from_sparse
Go around a limitation of the lua language spec. The return value
of this method guaranteed `ipairs()` correctness.

Please note that both the official Lua and Luajit implementation
provide a sparse table compatible `ipairs()` and __len implementation
by default.
2016-02-02 21:31:56 -05:00
Emmanuel Lepage Vallee 3d2b31bbb9 util: Add awful.util.table.crush
Allow to replace copy pasted code used to apply class heritage in
much of wibox.widget
2016-02-02 21:31:24 -05:00
Emmanuel Lepage Vallée 502c3631d2 Merge pull request #655 from Elv13/upstream_shape_api_p3
Add various methods to improve the new shape API
2016-02-02 04:06:31 -05:00
Emmanuel Lepage Vallee 348cd3a590 gears.shape: Add isosceles_triangle shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 0bf76dc984 gears.shape: Add powerline shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 4a44b0dc81 gears.shape: Add hexagon shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee a89b21ba2f gears.shape: Add arrow shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 1060a3487e gears.shape: Add rectangular_tag shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee a49b259c7f gears.shape: Add infobubble shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 704c028621 gears.surface: Add a method to create a surface from a shape
Useful for icons
2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 1d1e487d19 wibox.imagebox: Add a `clip` method based on the `gears.shape` API 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 98d8b8a199 gears.shape: Add a transformation mechanism
This allow to take a generic shape and transform it into a more
custom one without bloating the shape code.
2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee a3b31089b1 gears.matrix: Add ability to attach a function
It is an internal API and is used by `gears.shape`, `gears.pattern`
and `gears.composition` only.

This commit also add `:rotate_at` and `:copy` methods.
2016-02-02 00:21:18 -05:00
Cory Burgett 5d27aa812c Add signal emission for monitor connect/disconnect 2016-01-30 12:22:03 -05:00
Uli Schlachter 4c8128eaa9 Make errors from LDoc fatal
Via this commit, any warnings from LDoc are fatal and make "make" fail. The
intention is to cause failures on Travis for PRs that introduce broken
documentation.

Closes: https://github.com/awesomeWM/awesome/issues/643

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-30 10:43:58 +01:00
Uli Schlachter ad4c62e639 Fix warnings from ldoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-30 10:43:41 +01:00
Uli Schlachter 6479baf0ba Travis: also run against Lua 5.3
This also removes some obsolete dependencies and it also and creates
`/usr/bin/lua` even when using luajit.  Without this, our lgi-check.sh
script complains about a missing lgi installation because it cannot find
a lua binary.

Closes https://github.com/awesomeWM/awesome/pull/652.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-29 23:57:52 +01:00
Uli Schlachter 44fcfa2d48 Remove prototype of xutil_lock_mask_get()
This function was removed in 4ad516c63a, but I forgot to also remove it
from header. Whoops...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-23 17:12:10 +01:00
Uli Schlachter a98fc92b81 Move handling of MappingNotify to xkb.c
A quote from the XKeyboard specification:

  The server notifies interested clients of keyboard map changes in one of two
  ways. It sends XkbMapNotify to clients that have explicitly selected them and
  core protocol MappingNotify events to clients that have not. Once a client
  requests XkbMapNotify events, the server stops sending it MappingNotify events
  to inform it of keyboard changes.

This commit moves the code that we had for handling MappingNotify events to the
place where we handle XkbMapNotify events. This might even fix some bugs where
parts of awesome continued to use old key binding "stuff"!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-23 17:03:29 +01:00
Emmanuel Lepage Vallee dc432eb7a6 widget.background: Fix error introduced in d01c1d2d6
Fix a copy/paste mistake.
2016-01-21 22:53:21 -05:00
Daniel Hahler 3cffeb3f53 Merge pull request #636 from psychon/fix-integration-tests
test/run.sh: Handle updated beauitful.init call in default config
2016-01-20 00:01:21 +01:00
Daniel Hahler cb267e56d5 Merge pull request #637 from psychon/set_markup
Make wibox.widget.textbox:set_markup() throw Lua errors less often
2016-01-20 00:01:09 +01:00
Emmanuel Lepage Vallée 7ffb238ae8 Merge pull request #633 from Elv13/upstream_dynamic_p4
layout: Support layout with a constructor
2016-01-18 22:47:56 -05:00
Emmanuel Lepage Vallée 2736c75e43 Merge pull request #632 from Elv13/upstream_dynamic_p3
awful.layout: Split the layout parameters computation from 'arrange'
2016-01-18 22:46:59 -05:00
Emmanuel Lepage Vallee 67132e904d awful.layout: Split the layout parameters computation from 'arrange'
It is necessary to have it beforehand when creating layout objects
for unselected layouts.

In the current layout system, there is no layout object, but to allow
tabs and dynamic tagging features like ion3, layouts cannot be stateless.
2016-01-18 22:44:22 -05:00
Emmanuel Lepage Vallée 123c3d4114 Merge pull request #631 from Elv13/upstream_dynamic_p2
tag: Refactor awful.tag.setproperty to call setters
2016-01-18 22:41:15 -05:00
Emmanuel Lepage Vallée 72d3065937 Merge pull request #638 from Elv13/upstream_shape_api
Upstream shape api
2016-01-18 17:51:58 -05:00
Emmanuel Lepage Vallée cbd366d1a1 Merge pull request #612 from Elv13/fix_awful.client_idx
awful.client.idx: Avoid error when called with a floating client
2016-01-18 17:39:43 -05:00
Emmanuel Lepage Vallee 81019487f0 awful.client.idx: Avoid error when called with a floating client
Before, it was the caller job to make sure the client wasn't floating.

This limitation is unecessary. awful.client.idx now return nil instead
of an error. awful.rules setting the master width factor are now
foolproof.
2016-01-18 17:35:33 -05:00
Emmanuel Lepage Vallee d01c1d2d6d widget.background: Allow background to have a shape 2016-01-18 17:22:49 -05:00
Emmanuel Lepage Vallee dd93418afb gears.surface: Add an helper to set a shape to drawable 2016-01-18 17:22:44 -05:00
Emmanuel Lepage Vallee fb0c82a798 gears.shape: Add a new module to make it easier to use shapes
This code is imported from Elv13 config and make it very easy
to create shaped objects.

If accepted upstream, other shapes, such as arrow and powerline
will also be added. This commit introsuce the 2 most common
shapes, rounded rectangle and rounded bar.
2016-01-18 17:20:32 -05:00
Emmanuel Lepage Vallée d202c1f1c2 Merge pull request #629 from Elv13/upstream_dynamic_p1
client: Add swapped, raised and lowered signals
2016-01-18 16:40:07 -05:00
Emmanuel Lepage Vallee b74b8ea0cd margin: Add an option to :fit() -> 0,0 when the content is empty
Make it easier to write "optional" widgets, like empty textbox
that can be filled only in certain scenarios.
2016-01-18 03:38:46 -05:00
Emmanuel Lepage Vallee cd0503f552 layout: Support layout with a constructor
This allow the most basic kind of stateful layouts to be created.
It is now possible to have layout instances instead of global
stateless layout arrange functions.
2016-01-18 02:12:19 -05:00
Emmanuel Lepage Vallee 55190646c4 client: Add swapped, raised and lowered signals
This allow layout "arrange" to be called less often and react on
the cause of the change itself rather than it's consequences
(usually, the "focus" signal).

Previously, the layout were re-arranged everytime the focus changed.
Now, with "raised" and "lowered", it require less "arrange".

"swapped" allow smarted layouts. Currently, swapped cause a full
re-arrange. It re-read the "index" list from scratch and create
a "new" layout. With "swapped", incremental layout changes are
possible.

Fixes https://github.com/awesomeWM/awesome/issues/616
2016-01-18 01:29:31 -05:00