Commit Graph

7049 Commits

Author SHA1 Message Date
Uli Schlachter e18bece3df Make tests more reliable on "early errors"
When e.g. test-leaks.lua fails, it will cause a Lua error before starting the
test runner. This means that the test will just hang, because nothing causes
awesome to quit.

Handle this by starting a timer when the test runner is loaded and quitting
awesome in there if no test run was started yet. This only works if all tests
load the runner before doing anything that could fail, so the require("_runner")
is moved to the beginning in every test.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 10:20:45 +01:00
Daniel Hahler ab408103ee Merge pull request #734 from blueyed/readme-apidocs
doc: link to automatically built docs for master
2016-03-04 11:25:58 +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 Vallée 9ee69ad8ad Merge pull request #731 from Elv13/fix_awful_place
RFC awful.placement: Use math.ceil()
2016-03-04 04:13:43 -05:00
Emmanuel Lepage Vallée 2de2584094 Merge pull request #738 from awesomeWM/add_transparent
gears.color: Add transparent constant
2016-03-04 04:12:01 -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
Emmanuel Lepage Vallee 167f5e2821 drawin: Use numbers rather than integers
This solve issues when using wibox with `awful.placement`
2016-03-04 02:43:19 -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
Daniel Hahler a256c9676b doc: link to automatically built docs for master
[ci skip]
2016-03-03 22:06:23 +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
Emmanuel Lepage Vallée 97b26ab3ef Merge pull request #727 from psychon/fix-wibox.layout.mirror
Fix the mirror layout
2016-03-01 00:30:10 -05:00
Uli Schlachter b40b69d379 Fix the mirror layout
Issues involve:
- :layout() had the wrong signature and expected a cr argument that was left
  from when this was still the :draw() function.
- horizontal and vertical reflection were mixed up (I guess it has always been
  this way?)
- The return value should be a table of widget placements. Instead it was just a
  single widget placement.

This is broken since commit 85ab3f045b.

Fixes: https://github.com/awesomeWM/awesome/issues/718
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-29 22:50:47 +01:00
Uli Schlachter a189f2b13f Merge branch 'Return-nil-in-xrdb_get_value' of https://github.com/psychon/awesome 2016-02-29 20:59:21 +01:00
Uli Schlachter b8b270a91e Make xrdb_get_value() behave as documented
The documentation states that this function returns nil if the property does not
exist, but it actually returned nothing. And yes, in Lua this is a difference...
2016-02-29 11:13:58 +01:00
Emmanuel Lepage Vallée 512e966be7 Merge pull request #721 from Elv13/fix_awful_screen
awful.screen: Fix regression
2016-02-29 04:29:22 -05:00
Emmanuel Lepage Vallee 924e889271 awful.screen: Fix regression 2016-02-29 04:21:10 -05:00
Emmanuel Lepage Vallée b010849c3c Merge pull request #722 from Elv13/expose_graph
awful.widget.graph: Expose private data
2016-02-29 04:16:17 -05:00
Emmanuel Lepage Vallée 78f93940c7 Merge pull request #720 from Elv13/allow_no_tag
awful.layout: Allow parameters to be called when no tags is selected
2016-02-29 04:10:14 -05:00
Emmanuel Lepage Vallee 19f874a73f awful.widget.graph: Expose private data 2016-02-29 03:12:08 -05:00
Emmanuel Lepage Vallee 07631ccc9a awful.layout: Allow parameters to be called when no tags is selected
There seem to be a little race condition (either in my layout code or
elsewhere) when playing with multiple screens. As most properties do
not depend on the tag, there is no point in returning early anyway.
2016-02-29 02:49:20 -05:00
Daniel Hahler 0278d5f123 Add callback support for client.jumpto
Instead of true/false `merge` can be a callback now, which allows for
more dynamic handling of the client not being visible, e.g. moving it to
the current tag, instead of merging.
2016-02-28 22:45:15 +01:00
Daniel Hahler 9503110e44 Merge pull request #714 from psychon/tooltip-windows
Less tooltip windows
2016-02-28 22:21:18 +01:00
Daniel Hahler 4ba8386f7b Merge pull request #715 from psychon/lazy_border_update
Lazily apply changes to border_width and border_color
2016-02-28 22:16:32 +01:00
Daniel Hahler 87a3233be8 Merge pull request #713 from psychon/no_focus_window
Make client key bindings for e.g. xeyes work again
2016-02-28 22:16:22 +01:00
Daniel Hahler f874b0ad2e Merge pull request #712 from psychon/protected_calls
Protected calls (gears.protected_call)
2016-02-28 22:16:13 +01:00
Daniel Hahler d1f43d895f Merge pull request #710 from psychon/primary-screen
Primary screen
2016-02-28 22:16:03 +01:00
Daniel Hahler 2bcff5af27 Merge pull request #708 from psychon/less_screen_indicies2
Less screen indicies
2016-02-28 22:15:37 +01:00
Daniel Hahler 9205feea5e menubar: rename utils.parse to utils.parse_desktop_file 2016-02-28 22:14:35 +01:00
Daniel Hahler 25eff81878 menubar: look for .desktop files recursively
It was missing apps/entries from /usr/share/applications/kde4.

This patch also makes sure that entries are unique (by Exec/Name).

Closes https://github.com/awesomeWM/awesome/pull/711.
2016-02-28 22:14:08 +01:00
Daniel Hahler b84f214144 Merge pull request #706 from psychon/maximized-workarea-changed
Maximized workarea changed
2016-02-28 22:09:51 +01:00
Daniel Hahler 43f485b6cf Merge pull request #707 from psychon/bullet_proof_transient_for
Bullet proof transient_for
2016-02-28 22:09:04 +01:00
Uli Schlachter b05b699129 gears.wallpaper: Free wallpaper from memory when done
Wallpapers are usually big images that use up a lot of memory. This commit makes
gears.wallpaper call :finish() on all involved surface to make them free their
memory.

This is a lot faster than waiting for the garbage collector to collect these
surfaces. Due to the large size of wallpapers, such a special case makes sense
for this code.

Hopefully-helps: https://github.com/awesomeWM/awesome/issues/368
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 17:24:24 +01:00
Uli Schlachter 2ad147d740 gears.surface: Change the way that caching works
Loading a file normally has the same behaviour as before. First the cache is
checked and if nothing is found, the file is loaded and cached.

This commit changes the behaviour of loading a file uncached. This no longer
removes the file from the cache if it is cached (why should it?) and also does
not put it in the cache.

This means that users of load_uncached and load_uncached_silently can now freely
modify the resulting surface without interfering with other API users.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 17:21:10 +01:00
Uli Schlachter ee7a41370f Lazily apply changes to border_width and border_color
Fixes: https://github.com/awesomeWM/awesome/issues/592
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 16:24:30 +01:00
Uli Schlachter e49b1de0b2 awful.tooltip: Some minor optimizations
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 15:49:50 +01:00
Uli Schlachter b4224a651f awful.tooltip: Create wibox lazily
This makes awful.tooltip create its tooltip lazily when it is first needed
instead of immediately when the tooltip is created.

Fixes: https://github.com/awesomeWM/awesome/issues/591
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 15:49:50 +01:00
Uli Schlachter 1578957355 awful.tooltip: Inline place() into set_geometry()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 14:43:40 +01:00
Uli Schlachter aae960e99e Make client key bindings for e.g. xeyes work again
Instead of focusing the root window, we now create a "focus window" inside of
our frame window. This window is placed so that it is not visible, but we can
grab key bindings on it to simulate the window having the input focus.

Fixes: https://github.com/awesomeWM/awesome/issues/699
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 13:29:25 +01:00
Uli Schlachter f9d15691b8 Merge branch 'new-watch-widget' of https://github.com/actionless/awesome 2016-02-28 13:04:08 +01:00
Uli Schlachter 8560c6d2af Use gears.protected_call where applicable
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:28:55 +01:00
actionless 504c105cba feat(awful: widgets): add 'watch' widget 2016-02-28 12:11:57 +01:00
Uli Schlachter 7bf2f17a8a Make gears.widget.{fit,layout}_widget more robust
This commit makes these methods invoke the method on a widget in a protected
context. Thanks to this, e.g. the wibox and other widgets are protected from
errors in a child widget.

Additionally, fit_widget() now assumes 0 if a widget's :fit() method didn't
provide a number.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:11:36 +01:00
Uli Schlachter 01f11003d6 Add gears.protected_call
This library is a wrapper around pcall() / xpcall() that prints an error message
via gears.debug.print_error() in case of errors.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:07:02 +01:00
Uli Schlachter 2ad49dfd0c Fix some broken documentation in gears.debug
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:05:55 +01:00
Uli Schlachter a78f2359d1 Fix the test case that the previous commit added
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 11:10:46 +01:00