Commit Graph

8979 Commits

Author SHA1 Message Date
Florian Gamböck c296a0b91d Remove obsolete redefinition of popen
With the directory being changed via luafilesystem, there is no need to
redefine internal functions.
2017-08-09 21:44:55 +02:00
Florian Gamböck 8e2d844f60 Use luafilesystem to change directory
In some circumstances, if not every syscall was somehow redefined, the
directory was not changed correctly. With luafilesystem.chdir it is
assured that we are in the wanted directory afterwards.
2017-08-09 21:44:55 +02:00
Florian Gamböck c279dd32ce Make some directories in testing area 2017-08-09 21:44:55 +02:00
Florian Gamböck 13b3a18a75 Extend prefix for local file
Since we want some folders in the testing area, we need to be a bit more
explicit about the file completion.
2017-08-09 21:44:14 +02:00
Florian Gamböck 0bd74b4f72 Append slash on true local directories
A slash must only be added if the current completion item starts with
`./` and is actually a directory.
2017-08-09 21:20:22 +02:00
Florian Gamböck 7c677e01cc Replace os.execute with gfs function 2017-08-09 21:20:22 +02:00
Florian Gamböck e8ad3a32f5 Add string helper function
This function returns true if a string starts with a given prefix.
2017-08-09 21:20:22 +02:00
Florian Gamböck 1802a44018 Import gears.filesystem
This is needed for some future filesystem checks.
2017-08-09 21:20:22 +02:00
Florian Gamböck a68cc783c9 Add function to check file executable bit
This is just a plain copy of the file_readable function, with "read"
replaced with "execute".
2017-08-08 20:33:47 +02:00
José Romildo Malaquias 0def266c84 Add entry for menu font in theme (#1961) 2017-08-07 14:36:40 -04:00
Emmanuel Lepage Vallée 90e8b67d37 Merge pull request #1960 from psychon/fix-some-leaks
Fix some leaks
2017-08-07 14:36:08 -04:00
Jagannathan Tiruvallur Eachambadi c32096a311 tags: specify layout in add_tag doc snippet (#1950)
Adding a tag without layout causes errors while using the tag. For
example resizing with mouse causes indexing a null error.
2017-08-07 14:35:39 -04:00
Daniel Hahler 05bd54bbb7 Merge pull request #1957 from FloGa/FloGa-breaking-true-tests
Set up isolated PATH for completion test suite.
2017-08-07 20:12:23 +02:00
Florian Gamböck 829e887806 Create and destroy temp PATH in tests
Since busted seems to spawn isolated child processes for every test
suite, the temporary PATH directories have to be created at the
beginning and destroyed at the end of a test suite.
2017-08-07 19:44:27 +02:00
Florian Gamböck a716009caa Set up isolated PATH directory for testing
We cannot possibly know what is in the PATH of a user. The completion
test cases however assume that there is nothing else in the PATH that
starts with `true` other than `true` itself.

These two methods create or respectively destroy a temporary PATH
directory especially for testing. We can put commands in there via
symlinks and verify the correct functionality of the complete commands.
The PATH environment variable is set and reset via GLib.
2017-08-07 19:44:27 +02:00
Daniel Hahler 828eefed79 awful.tooltip: border: do not default to border_width (#1955)
Several themes use `dpi(2)` which is quite thick, and it is better to
use the default of 0 here, instead of `beautiful.border_width`, which is
meant for borders on clients.
2017-08-05 16:07:47 +02:00
Uli Schlachter e73eb3ad38 gears.surface.apply_shape_bounding: Finish temporary image
This function draws the wanted shape to a cairo image surface and then
uses it to set the shape of the passed-in object. After this commit,
this temporary image is finished afterwards, making it free most of its
memory immediately instead of only later when the garbage collector
collects the image surface.

Related-to: https://github.com/awesomeWM/awesome/issues/1958
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-04 13:18:01 +02:00
Uli Schlachter 0da790c026 awful.tooltip: Finish temporary image
For setting the shape of the tooltip, this code creates an image surface
describing the wanted shape. After this commit, this image surface is
finished when it is no longer needed. This results in most of the
image's memory to be freed immediately instead of only later when the
garbage collector collects the image surface.

Related-to: https://github.com/awesomeWM/awesome/issues/1958
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-04 13:16:12 +02:00
Uli Schlachter 11216d8ca4 awful.mouse.snap: Finish temporary image
This function creates a temporary image surface to set the shape of a
wibox. After this commit, the image is now finished after use. This
results in most of the image's memory to be freed immediately instead of
waiting for the garbage collected to collect it.

Related-to: https://github.com/awesomeWM/awesome/issues/1958
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-04 13:14:51 +02:00
Uli Schlachter efb8134815 awful.client.shape: Finish the shape image when done with it
This function queries the shape of a client and then does something with
it. This commit makes sure the image is finished afterwards, which means
that most of its memory is released immediately instead of waiting for
the garbage collector to collect it.

Related-to: https://github.com/awesomeWM/awesome/issues/1958
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-04 13:13:22 +02:00
Uli Schlachter 8dfe18a382 Fix wibox to forward shapes directly
When doing w.shape_bounding = foo on a wibox, the code would first read
shape_bounding from the underlying drawin. This would create a
(possibly) huge cairo image surface that just waits to be collected by
the garbage collector, resulting in increased memory usage.

Fix this by checking the force_forward table first. This tables contains
the names of shape properties. Thus, the evaluation of this statement
gets short-circuited and the property is on the drawin is not read.

Helps-with: https://github.com/awesomeWM/awesome/issues/1958
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-04 13:10:14 +02:00
Crazy Lemon 2886095358 Specifies the wibox dependency on the menubar utils (#1953)
Only this particular module is needed
2017-07-30 13:42:20 -04:00
Uli Schlachter 60b5df1308 awful.tag: Apply a default layout to tags (#1952)
Related-to: https://github.com/awesomeWM/awesome/pull/1950
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-29 13:58:45 -04:00
Tomoya Tabuchi 0836cf90c5 Add notification_icon_size as a beautiful variable (#1951) 2017-07-29 15:58:52 +02:00
Daniel Hahler 82fd7ea8e5 Travis: exit with 1 when check-unit-coverage fails (#1944)
Same as done in 1cdd7ef8 already, but missed this one.
2017-07-26 13:04:52 +02:00
Uli Schlachter acc012353d Make keyboardlayout widget more robust (#1941)
I am not sure what exactly goes on in the below bug report, so this will
just paper over the problem. I still think that this patch is a good
idea even when it is not a proper fix, since keyboard layouts are
complicated and so this code should be robust and hard to break.

Fixes: https://github.com/awesomeWM/awesome/issues/1933
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-25 18:17:32 +02:00
Emmanuel Lepage Vallée 4f7444f1f4 Merge pull request #1939 from psychon/tooltip_type
awful.tooltip: Set wibox.type = "tooltip"
2017-07-25 10:20:34 -04:00
Uli Schlachter ee1dc78434 awful.tooltip: Set wibox.type = "tooltip"
Fixes: https://github.com/awesomeWM/awesome/issues/1938
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-24 07:52:55 +02:00
Daniel Hahler 58bb3dde4a Packaging.cmake: cache CPACK_GENERATOR (#1924) 2017-07-21 01:06:59 +02:00
Jan Larres 458981710c Treat certain layouts as single client for gaps (#1914)
When gap_single_client is set to 'false', no gap is used when only one
client is shown in a tag. Since the max layout only ever shows one
client at a time it makes sense to apply this setting for this layout
regardless of the actual number of clients in that tag.

Additionally, if the 'master_fill_policy' property is set to
'master_width_factor', then use a gap even if there is only one client
visible and 'gap_single_client' is false.
2017-07-20 21:21:51 +02:00
Daniel Hahler 140481a3e5 Makefile: do not call check-unit by default (#1931)
It should get run explicitly only.

As for Travis: we run it there initially (when just using `make`, and
later again - at least when using check-unit-coverage).
2017-07-20 01:03:33 +02:00
Emmanuel Lepage Vallée 81398f3d0a Merge pull request #1932 from mqus/patch-1
Fix awful.widget.calendar_popup documentation
2017-07-19 11:43:22 -04:00
mqus bd5f0dd3fc Fix calendar_popup.lua documentation
There were multiple things which stood out to me, as I was trying to setup a simple calendar popup for my textclock:
1.: The functions in https://awesomewm.org/doc/api/classes/awful.widget.calendar_popup.html#Functions were not named correctly (calendar vs calendar_popup) which (naturally) produced an error when used as awful.widget.calendar.month() .
2.: The example for calendar_popup.month() was obviously missing a line (where does the month_calendar come from?) . Resolved by copying the line from the attach-example
3.: The same examples also only refer to the function as calendar.month() which should be changed to awful.widget.calendar_popup.month()
2017-07-19 17:22:31 +02:00
Daniel Hahler cb10a3fe45 Travis: fix gcov (#1930)
codecov-bash runs it by default already, therefore we do not not have to
do so manually before do_codecov_gcov.
And with `do_codecov` itself, it gets disabled using `-X gcov`.
2017-07-18 10:25:34 +02:00
Uli Schlachter d33d7d71d7 tests/examples/CMakeLists.txt: Add a project() call (#1926)
project() automatically sets the PROJECT_NAME variable. Thus, when this
CMake code is run due to being included by awesome, this commit has no
effect.

When this CMake code is run on its own, CMake will no longer check for a
C and C++ compiler.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-17 10:11:52 +02:00
Daniel Hahler a5d6f877c5 cmake: remove unused a_find_library (#1921)
The last usage was removed in ea301194.
2017-07-16 15:25:22 +02:00
Daniel Hahler 02ef4f3ce7 cmake: check (and cache) check of required modules (#1920)
This makes the CMake run much faster in general, and does not re-check
the dependencies every time again (since it gets cached).

There are several reports where the reference to the missing module was
not provided, and they all appear to have happened with CMake 3.6.1.

A missing "foobar" module gets reported there, but if you remove
/usr/lib/pkgconfig/libstartup-notification-1.0.pc, this does not get
reported:

    -- Checking for modules '…'
    --
    CMake Error at /tmp/cmake/share/cmake-3.6/Modules/FindPkgConfig.cmake:424 (message):
      A required package was not found

This apparently affects modules that have version requirements. After
removing that from "libstartup-notification-1.0>=0.10", it gets reported
also: "No package 'libstartup-notification-1.0' found".

The workaround is to require the package without version information
before the requirement with the version information.

This reverts https://github.com/awesomeWM/awesome/pull/1253.
2017-07-16 15:24:40 +02:00
Daniel Hahler 0f5c7b3270 NEWS: fix typos/grammar (#1918)
[ci skip]
2017-07-15 20:19:36 +02:00
Emmanuel Lepage Vallee 20dfff373d release: Change the codename 2017-07-15 15:53:13 +02:00
Emmanuel Lepage Vallee 9724850fb8 release: Update the NEWS 2017-07-15 15:53:13 +02:00
morethanoneanimal 5ddbfe1aa7 Tests for awful.prompt (#1916) 2017-07-14 21:32:21 +02:00
Emmanuel Lepage Vallée bb26c32726 Merge pull request #1901 from actionless/xresources-titlebar-hover-press
feat(beatiful: theme_assets; themes: xresources): recolor titlebar icons for `hover` and `press` states
2017-07-10 10:11:50 -04:00
Emmanuel Lepage Vallée 5f5c0ac05a Merge pull request #1912 from psychon/calendar_style
Calendar stuff
2017-07-10 10:04:47 -04:00
Daniel Hahler fb18a1d159 tests/run.sh: use temporary RC_FILE again (#1910)
This was changed in ec9a981d for no good reason, and using a temporary
file removes the requirement to restore it on exit.
And it is necessary in case the original file is not writable (e.g. in
case of a read-only Docker mount).
2017-07-09 22:29:51 +02:00
Uli Schlachter 07d561ee91 wibox.widget.calendar: Stop using make_widget_declarative
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 19:00:16 +02:00
Uli Schlachter d72893692e calendar_popup: Fix method name entries
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 18:59:17 +02:00
Daniel Hahler fc1ba35366 CMake: only run ldoc with changed input (#1911)
This adds a custom command to build the documentation, where you can
specify the generated output then. "ldoc" then depends on this output.

This way "ldoc" is not being run every time, but only if the input files
have changed.  ldoc's config is added therefore to the list of
dependencies to make config changes trigger a rebuild.
2017-07-09 18:45:14 +02:00
Uli Schlachter 9519d666a3 calendar_popup: Fix style documentation
Fixes: https://github.com/awesomeWM/awesome/issues/1899
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 18:36:04 +02:00
Uli Schlachter 95b412df19 Move project() call to CMakeLists.txt (#1909)
CMake "fakes" a call to "project(Project C CXX)" if it does not see a
project() call in CMakeLists.txt. Since we had this call in a different
file, this default applied. This meant that CMake unnecessarily required
a C++ compiler.

Fix/work-around this by moving the call to project() into CMakeLists.txt

Reference: https://github.com/awesomeWM/awesome/pull/1907#discussion_r125581273
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 16:23:56 +02:00
Daniel Hahler 2f105a405f Improve tests/run.sh (#1904)
- add colors
- count test files
- display error summary
- filter out a_dbus_connect warnings and "Test finished successfully." message
- print current step with VERBOSE=1
- kill clients at the end of tests in an extra step
2017-07-09 14:17:35 +02:00