Commit Graph

8914 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 33124d8605 widget: Add a separator widget. 2017-11-06 05:19:17 +01:00
Emmanuel Lepage Vallee 3ffbe4c03b client: Prevent an error when using the "after" mode
Fix: #2101
2017-11-05 20:39:07 +01:00
Stefan Loewen 8ebea11df0 Fix doc: get_clients methods belong to screen (#2099)
not to client
2017-11-03 17:27:17 +01:00
Emmanuel Lepage Vallée 8a498d95b2
Merge pull request #2100 from lePerdu/desktop-unescape
Fix typo: "OnlyShownIn" -> "OnlyShowIn"

Ref:
https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
2017-11-03 17:26:32 +01:00
lePerdu 926c126738 Fix typo: "OnlyShownIn" -> "OnlyShowIn" 2017-11-02 20:08:48 -04:00
Emmanuel Lepage Vallée f3f0f42b24
Merge pull request #2096 from psychon/iconic_state_across_restart
client.c: Set WM_STATE_NORMAL before checking _NET_WM_STATE
2017-10-31 19:20:37 +01:00
Emmanuel Lepage Vallée 5b8e8dbf80
Merge pull request #2094 from psychon/fix_rules_no_such_tag
awful.rules: Handle non-existing tags
2017-10-31 19:20:12 +01:00
Emmanuel Lepage Vallée bc83eb5636
Merge pull request #2097 from psychon/small_doc_fixes
Three small fixes to the client docs
2017-10-31 19:19:51 +01:00
Emmanuel Lepage Vallée 579c8cae10
Merge pull request #2093 from necauqua/master
Add call_now argument to gears.timer
2017-10-31 19:17:15 +01:00
necauqua aa64978c31
Add call_now argument to gears.timer 2017-10-31 18:24:53 +02:00
Daniel Hahler 032f587dd3
Merge pull request #2069 from awesomeWM/doc-theme
doc: new theme
2017-10-31 16:45:13 +01:00
Uli Schlachter cdb95e6633 Three small fixes to the client docs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 15:25:21 +01:00
Uli Schlachter b871c247ba client.c: Set WM_STATE_NORMAL before checking _NET_WM_STATE
_NET_WM_STATE could contain _NET_WM_STATE_HIDDEN, which we interpret as
minimized. Minimized clients have WM_STATE set to WM_STATE_ICONIC, but
the code in client_manage() would later overwrite this to
WM_STATE_NORMAL.

Fix this by setting the initial WM_STATE_NORMAL by doing so before
processing _NET_WM_STATE.

Fixes: https://github.com/awesomeWM/awesome/issues/2095
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 15:20:34 +01:00
Uli Schlachter 7fda5d3273 awful.rules: Handle non-existing tags
If a tag is specified by name, but no such tags exist, awful.rules would
cause an error (attempt to index a nil value). Fix this and add a test
for this case.

Fixes: https://github.com/awesomeWM/awesome/issues/2087
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 13:23:12 +01:00
Daniel Hahler fb93003cc5 docs/ldoc.css: just use system fonts 2017-10-28 00:08:31 +02:00
Daniel Hahler 5c9bc988bb navigation: less margin to the left 2017-10-28 00:08:31 +02:00
Daniel Hahler 102e1046b9 add our logo 2017-10-28 00:08:31 +02:00
Daniel Hahler b291880fa1 add css
Source: https://github.com/stevedonovan/LDoc/pull/287
https://raw.githubusercontent.com/hishamhm/LDoc/7214818f0ff580e5607a4de764340aa7e3b55d1a/ldoc/html/ldoc_new_css.lua
2017-10-28 00:08:28 +02:00
Daniel Hahler 65b6d12b44 Merge pull request #2073 from blueyed/fix-examples
tests: examples: remove caching, add depends for ldoc
2017-10-27 00:21:55 +02:00
Daniel Hahler 678ead2634 Add client.object.immobilized_{horizontal,vertical} (#2066)
ewmh.client_geometry_requests: ignore immobilized clients

Fixes https://github.com/awesomeWM/awesome/issues/1676.
Fixes https://github.com/awesomeWM/awesome/issues/2036.
2017-10-25 15:36:00 +02:00
Daniel Hahler 579159a8cc CMakeLists.txt: check-integration: depend on main target (#2081)
This makes `make check-integration DO_COVERAGE=1` on a clean build work.
2017-10-24 20:59:51 +02:00
Daniel Hahler eb5cab5cfe Travis: codecov: use LUANAME as a flag (#2085) 2017-10-24 20:59:31 +02:00
Daniel Hahler a5e00347e1 tests: tests/run.sh: timeout after 30 seconds (#2083) 2017-10-24 00:29:56 +02:00
Daniel Hahler fbb5766359 Travis: checks: unset set -x (#2084) 2017-10-24 00:29:22 +02:00
Daniel Hahler e9b5e28d15 Makefile: distclean: do not try to rm `awesome` (#2077)
Follow-up to ec51e3f93, where we stopped creating the symlink.

[ci skip]
2017-10-23 22:25:18 +02:00
Daniel Hahler 1ca3fff86c Makefile: fix invoking cmake in the build dir (#2078)
`"(@D)"` is the dir of the target, i.e. "build" for BUILDDIR=build,
which results in calling `cmake build ..`.

cmake appears to ignore the "build" in this case, and works the same way
without it.

Instead of ".." this patch uses `$(CURDIR)`, which is the absolute path
to the source dir, which is relevant in case `BUILDDIR` is not just a
direct subdirectory.
2017-10-23 22:24:58 +02:00
Daniel Hahler 5ac6db5696 Travis: use stable SOURCE_DATE_EPOCH for predictable calendar examples (#2075)
Fixes https://github.com/awesomeWM/awesome/issues/2070.
2017-10-22 18:46:38 +02:00
Daniel Hahler 1ab861ea3a tests: busted: add config file, use --verbose by default (#2076) 2017-10-22 18:05:00 +02:00
Daniel Hahler 288b7030f3 build-utils/dist.sh: remove "-dirty" suffix (#2074)
Calling `make dist` on a dirty tree caused an error when trying to use
`git log` with the `-dirty` suffix.

This patch removes any "-dirty" suffix from the argument.

[ci skip]
2017-10-22 16:34:04 +02:00
Daniel Hahler d1d794ab2d tests/examples/CMakeLists.txt: remove EXAMPLE_DOC_SOURCE_FILES
The caching is not reliable, and cannot be made so easily.
2017-10-22 15:55:50 +02:00
Daniel Hahler 386e74b852 CMakeLists.txt: ldoc: depend on generate-examples 2017-10-22 15:55:50 +02:00
Daniel Hahler f3baf499aa tests/examples/CMakeLists.txt: set env via LUA_COV_RUNNER only (#2072)
LUA_COV_RUNNER is used with `add_custom_command` for the command to
generate the images, and AWESOME_THEMES_PATH should be set there.

Since LUA_COV_RUNNER is used also with `execute_process` there is no
need for `set(ENV …)` anymore.
2017-10-22 15:47:53 +02:00
Daniel Hahler 7117c6a720 Makefile: add explicit rule for Makefile to not "update" it (#2071)
Typically the implicit rule below will trigger a "make -C build
Makefile" run, whenever build/Makefile is newer than our Makefile.

Ref: https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html
2017-10-22 15:32:37 +02:00
Emmanuel Lepage Vallée 57b18df56c Merge pull request #2016 from Elv13/doc_tests_and_notif_p1_6
Improve the `awful` example test tempate
2017-10-21 20:10:14 +02:00
Emmanuel Lepage Vallee 2a506b03ae tests: Port the screen template to wibox.layout.manual
It's more flexible than raw cairo code and it's what it was
originally designed for (see #1153).
2017-10-21 19:34:04 +02:00
Emmanuel Lepage Vallee cedeb2bb5a wibox: Add a `to_widget()` and `save_to_svg()` method.
Take a wibox snapshot as a widget. It also add an helper to save
it to a file. This is useful for debugging when called from
`awesome-client`
2017-10-21 19:34:04 +02:00
Uli Schlachter 1592180c83 textbox: Make some screen arguments optional again (#2057)
Since beautiful.xresources.get_dpi(s) allows nil as argument to query
some "global DPI", the functions to query the size of a textbox also
allowed to use nil as the screen, even though this was never documented
to work. Commit a137655791 broke this by assuming a valid screen
object.

This commit makes a nil argument work again, but will cause a
deprecation warning in awesome 5.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-21 19:32:35 +02:00
Daniel Hahler c362524a5f Merge pull request #2012 from Elv13/doc_tests_and_notif_p1_2
widget: Add a flexible generic constructor
2017-10-21 19:26:49 +02:00
Uli Schlachter c7d75ed119 awful.screen.object.get_dpi: Ignore outputs with size 0 (#2063)
For example, Xephyr reports its output with a size of 0x0. Since a
division by zero is in no one's interest, just ignore such outputs when
trying to compute the DPI value.

Thanks to @timroes for pointing this out:
c8fac753c4 (commitcomment-25072296)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-21 19:23:04 +02:00
Daniel Hahler 03580db5bb Merge pull request #2015 from Elv13/doc_tests_and_notif_p1_5
object: Add support for signal forwarding
2017-10-21 19:20:41 +02:00
Emmanuel Lepage Vallée e6d289841d Merge pull request #2011 from Elv13/doc_tests_and_notif_p1_1
Update the shims
2017-10-21 18:06:14 +02:00
Emmanuel Lepage Vallee 8e87bd7c64 tests: Add some methods to the shims 2017-10-21 17:57:30 +02:00
Emmanuel Lepage Vallee 15b025ff91 tests: Add the theme path ENV variable
That way theme assets can be used by the documentation images
2017-10-21 17:50:38 +02:00
Uli Schlachter c8fac753c4 Merge pull request #2055 - psychon/auto_screen_dpi 2017-10-14 18:26:50 +02:00
Uli Schlachter 74a6cbedce Fix menubar screen handling
Running test-menubar.lua just failed for me locally. The reason was that
the textbox was indexing a nil value when doing 's.dpi'.

This commit fixes the menubar so that its optional screen arguments are
really handled correctly. In fact, a default screen is now chosen way
earlier than before, so that no nil values are used as screens later on.

In other news: I guess test-menubar.lua is not run on any of our Travis
targets...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-08 14:53:58 +02:00
Uli Schlachter d0fbb96d2d screen.dpi: Use RandR for per-screen DPI
This commit makes awesome automatically compute the DPI of a screen
based on its RandR outputs. If multiple outputs exist, the lowest DPI is
used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-08 14:40:20 +02:00
Uli Schlachter a137655791 Add & use a dpi property on screen objects
Once upon a time, beautiful.xresources.get_dpi was added to query
Xft.dpi. That made sense since this queried an xresources property. Over
time, other, non-xresources-based ways to query DPI were added to this
function. Now, it makes no more sense to have this function here.

Also, recently it became possible to add new properties to C objects
from Lua code. Thus, we no longer need to have a get_dpi() function
somewhere, but can add s.dpi directly.

Thus, this commit adds s.dpi and makes everything use it. No functional
changes are intended.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-08 12:30:21 +02:00
Uli Schlachter 7e395e7bc0 Use memory shorter with awful.client.shape (#2051)
To apply the shape of a client, we have to create an image and draw the
shape we want to it. Since clients can be quite large, we have to make
sure that we do not keep this image alive unnecessarily long.

The code in awful.client.shape.get_transformed() however needs another
temporary surface in case the client has its own shape and another one
was set in Lua (side note: currently the code also creates this extra
temporary surface if the client does not have its own shape; that might
be worth fixing). This temporary surface is then used as the source of a
cairo context to draw it to the image that will be used as the client's
final source.

After we are done, the temporary surface is still kept alive since it is
the current source of the cairo context. The cairo context in turn is
only freed when Lua's garbage collector collects it, which may take
quite a while.

Improve this by setting a different source to the cairo context. Thus,
it now releases the temporary surface as soon as possible and it is only
allocated for a short time.

Fixes: https://github.com/awesomeWM/awesome/issues/2050
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-07 18:22:50 +02:00
Daniel Hahler 1ae2268a07 Merge pull request #2049 from reinerh/reproducible
Sort list of files used in generated table
2017-10-07 18:21:48 +02:00
Reiner Herrmann a9b65833e7 Travis: export SOURCE_DATE_EPOCH in one build job 2017-10-07 14:08:26 +02:00