Commit Graph

8816 Commits

Author SHA1 Message Date
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
Reiner Herrmann 9d7eaf020d Use reproducible timestamp during build
During build svg images of the calendar widget are generated, which
differ based on the current date.
By honouring the environment variable SOURCE_DATE_EPOCH, which is
set by distributions during build, a deterministic date can be used
at build time while keeping the normal behaviour during runtime.

See also: https://reproducible-builds.org/specs/source-date-epoch/
2017-10-07 13:58:35 +02:00
Reiner Herrmann cce65aa6d3 Sort list of files used in generated table 2017-10-07 13:58:35 +02:00
Uli Schlachter 4e42996d9a naughty: Fix replaces_id + changing colors (#2041)
This fixes a regression introduced in be29ee6768. This commit changed
naughty to reuse an already-existing wibox when replaces_id is used,
instead of creating a new wibox. However, some of the properties that
are set only when creating a wibox were ignored due to this.

Fixes: https://github.com/awesomeWM/awesome/issues/2040
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-09-30 21:37:33 +02:00
Reiner Herrmann a6613c08a9 Typo in manpage (#2048) 2017-09-29 17:45:11 +02:00
Zach Peltzer 013abf5a39 Display desktop entries with no categories (#2039) 2017-09-28 22:58:14 +02:00
Zach Peltzer 8d34201ec3 Unescape strings when parsing desktop entries (#2043)
* Unescape strings when parsing desktop entries

* Fix unused value warning in menubar/utils.lua

* Move menubar.utils.unescape() tests

* Clean up menubar.utils.unescape() function

* Fix warning for using "_" in a non-local context

* Do not ignore trailing whitespace in menubar.utils.parse_list()
2017-09-28 22:57:39 +02:00
Uli Schlachter 55dee1ea87 magnifier layout: Never manage floating windows (#2046)
The magnifier layout handles the currently focused client specially.
However, if the currently floating client is floating, it should not be
handled by the layout at all. A bug caused the magnifier layout to
handle a focused and floating client anyway if it was the only tiled
client.

Fix this by removing the '#cls > 0'-case. If #cls == 0, then no client
is available to be managed. Thus, cls[1] will be nil, which is fine
since, well, no client is available to be managed. This only made a
difference in the specific bug that I described above. Thus, drop this
case.

Fixes: https://github.com/awesomeWM/awesome/issues/2045
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-09-28 22:56:41 +02:00
Daniel Hahler 790a669029 cmake: add strict mode for ldoc, based on STRICT_TESTS (#2035)
This allows for building the docs with an older ldoc version, and it
makes sense in general to make warnings not fatal by default.

Ref: https://github.com/awesomeWM/awesome/pull/2027#issuecomment-328354095
2017-09-11 14:20:43 +02:00
Uli Schlachter b04b1b27af Add a force_update() method to the textclock (#2034)
Reference: https://github.com/awesomeWM/awesome/issues/344
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-09-10 20:12:25 +02:00
Yauhen Kirylau ebcc19844e fix(awful: placement: no_overlap): use new placement infrastructure (#2032)
Fixes #2030
2017-09-09 16:26:54 -04:00
Uli Schlachter 43e268373d Mention minimum ldoc version in the readme (#2027)
See commit 2c741f8e1d which introduced this dependency.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-09-09 05:14:41 +02:00
Daniel Hahler 66c4e55511 Merge pull request #2029 from actionless/calendar-fix-click-hide
Calendar popup click/hover fix
2017-09-09 05:14:02 +02:00
getzze 35432e9f21 Avoid skipping a month if the day is 31 (#2028) 2017-09-08 22:08:47 +02:00
actionless c9fbecd1e8 refactor(awful: widget: calendar_popup): s/_calendar_clicked/_calendar_clicked_on/ 2017-09-01 22:43:57 +02:00
actionless 23613bac05 fix(awful: widget: calendar_popup): hover was not working anymore if hiding popup by clicking on it 2017-09-01 22:43:07 +02:00
Daniel Hahler 02f894ce0c Improve tests/examples: generate deps for output files (#1962)
This still runs all the tests in the configure phase, since the tests
report back what output file (png/svg/none) will be generated.. :/

This could be improved by having this table in CMakeLists directly, or
by having a callback into the tests that only reports back that
information.  The latter would still execute all the tests (via a Lua
process).

Adds an explicit check-examples target.
2017-08-31 21:21:19 +02:00
Daniel Hahler cc2d4e9189 build-utils/dist.sh: reproducible builds (fixes shellcheck issues, adds usage) (#1983) 2017-08-31 21:20:08 +02:00
Daniel Hahler 8923df4a5f build: make DO_COVERAGE a CMake variable
Travis: remove CXXFLAGS (not used), LDFLAGS (typo, not used)

Closes https://github.com/awesomeWM/awesome/pull/2001.
2017-08-29 22:24:12 +02:00
Daniel Hahler 69d06f7e3a default config: improve floating windows (#2023)
* default config: floating windows: fix pinentry-gtk-2

We have class "pinentry" there already, but it seems to have changed to
"Pinentry"?!  This uses "instance" instead, which hopefully works in the
old case also.

pinentry 1.0.0-1, gnupg 2.1.23-1

Also adds Blueman-manager and ConfigManager.
2017-08-28 10:55:56 +02:00
Yauhen Kirylau 9e4446060e feat(awful: widget: calendar_popup: attach): implement 'on_hover' option (#2008)
* feat(awful: widget: calendar_popup: attach): implement 'on_hover' option

* feat(awful: widget: calendar_popup): smarter handling of click and hover at the same time
2017-08-27 21:01:24 +02:00
Yauhen Kirylau fd66d12a4b feat(awful: widget: calendar_popup): implement 'margin' widget property (#2010) 2017-08-27 14:23:43 +02:00
Emmanuel Lepage Vallée ec08af4e76 clienticon: add a client setter (#2018)
It's required to work with the declarative syntax and be used
in the tasklist due to its limitations.
2017-08-27 14:23:06 +02:00
Daniel Hahler 78686166b2 Merge pull request #2009 from actionless/fail-on-more-errors
fix(tests: run.sh): add one more error log pattern
2017-08-27 12:06:37 +02:00
actionless 596b7443e7 feat(tests: run.sh): treat luaA_panic as an error 2017-08-24 23:16:53 +02:00
actionless 162cf1854c fix(tests: run.sh): add one more error log pattern 2017-08-24 23:16:53 +02:00
Daniel Hahler 6e53143401 tests/themes/run.sh: whitespace: sw=4 2017-08-24 23:16:53 +02:00
Daniel Hahler e1da4b030f tests/themes/run.sh: use themes from build dir 2017-08-24 23:16:53 +02:00
actionless 0a75f09d1d fix(menubar: utils: parse_dir): print to log the current failed directory instead of the root one 2017-08-24 23:06:16 +02:00
actionless 960f59b228 fix(menubar: utils: parse_dir): print warning instead of error if directory can't be opened 2017-08-24 23:06:16 +02:00
Uli Schlachter 98e762e5f7 fix(tests: menubar): ignore warning about opening applications dir in /dev/null 2017-08-24 23:06:15 +02:00
Emmanuel Lepage Vallée 25dea5bd2a drawin: add a `get()` function. (#2013)
Identical to `client.get()`. Same use cases.
2017-08-21 21:15:18 +02:00
Daniel Hahler aa1ff23b19 Merge pull request #1992 from Veratil/string-funcs
Add two new gears.string functions: startswith, endswith.
2017-08-21 21:11:25 +02:00
Emmanuel Lepage Vallée fd2307afd0 grid: fix an unavoidable assert (#2017)
`:add()` was called with the optional `...` arguments, but the
function required at least one argument.
2017-08-21 21:10:43 +02:00
Uli Schlachter e7bf8de081 Add tests for gears.string.startswith and endswith
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2017-08-21 09:05:37 +02:00
Daniel Hahler cdd58cc355 luacheck: enable cache (#2004)
* luacheck: enable cache

* Cleanup .gitignore: remove .build* and awesome

We only use the "build" dir by now, where also the "awesome" binary gets
created.
2017-08-20 22:50:30 +02:00
Daniel Hahler 784472f212 doc: improve/fix doc for awful.rules (#2005) 2017-08-20 13:37:03 -04:00
Emmanuel Lepage Vallée a1911b5a23 Merge pull request #2014 from Elv13/doc_tests_and_notif_p1_4
mouse: Fix a bad refactoring
2017-08-20 13:35:09 -04:00
Emmanuel Lepage Vallee 2303e31355 mouse: Fix a bad refactoring
The `wibox_under_mouse` property was renamed `current_wibox` but
a call wasn't updated.
2017-08-19 22:50:17 -04:00
SpiritCroc a20dd4ad61 KeyboardLayout widget: add EurKey (#2003) 2017-08-17 17:21:40 +02:00
Uli Schlachter 202be62157 Automatically make LuaRocks modules available in awesome (#1999)
Running eval $(luarocks path --bin) before running awesome is not all
that easy. It's a lot easier to do the equivalent for this in rc.lua.
Plus, if LuaRocks is not installed, this will silently do nothing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 23:32:04 +02:00
Luke Bonham 4fc3108e0f Fix doc typos and optimised PNGs (#2000) 2017-08-16 20:07:08 +02:00
Daniel Hahler 2c741f8e1d build: use --fatalwarnings with ldoc, remove check-ldoc-warnings (#1963)
Instead of having a custom target with redirection magic, just use
`--fatalwarnings` with ldoc.  This requires ldoc 1.4.5.
2017-08-16 19:23:10 +02:00
Daniel Hahler 4604ce705d Merge pull request #1979 from psychon/spawn_env
Allow setting environment vars for spawned processes
2017-08-16 13:37:57 +02:00
Uli Schlachter 12bb7f5a9e Improve docs for emit_signal_recursive (#1998)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:37:14 +02:00
Daniel Hahler ef04fa688e tests/themes/run.sh: use themes from source dir (#1994)
This makes it easier to track their coverage.
2017-08-16 13:27:49 +02:00
Uli Schlachter a222e5c0af spawn: Fix some comments and messages
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00