Commit Graph

10162 Commits

Author SHA1 Message Date
Uli Schlachter d8412cb51d Re-add documentation of xproperty API (#1843)
The documentation for awesome.register_xproperty, awesome.get_xproperty
and awesome.set_xproperty were lost in commit 26f15a13f3. This
commit adds them back.

Fixes: https://github.com/awesomeWM/awesome/issues/1817
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-13 21:29:20 +02:00
Uli Schlachter ddc51cf38c Port lgi-check.sh to C
Previously, the lgi check used the normal Lua interpreter to check if
lgi is installed. However, nothing ensures/requires that awesome is
built against the same Lua version as the Lua interpreter. This means
that if lgi is only available for some Lua version, then the check could
succeed even though awesome would later fail to start. Also, the check
might have failed even though awesome would not have any problems
finding lgi.

This commit replaces lgi-check.sh by a small C program which does the
same thing. This ensures that the same Lua version is used as awesome
will be using.

There are some places that still use the Lua interpreter: Example tests
(run through the Lua interpreter directly) and unit tests (run through
busted). For unit tests, this should not make much of a difference and
example tests might later get similar treatment.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-13 15:47:07 +02:00
Uli Schlachter 93d5007c20 .travis.yml: Link Lua 5.3 correctly
This makes sure that the liblua.so that we built actually depends on the
libraries that it needs (libm and libdl). Previously we already tried
this, but specified "-ldl" at the beginning of the command line. Since
nothing needed this library yet, the linker just ignored it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-13 15:47:07 +02:00
Uli Schlachter 26f150a66c Revert "Travis: pin lua-term to 0.4-1 to fix the Lua 5.3 build" (#1841)
This reverts commit ce3e6648ac. lua-term
was fixed in the mean time, we just forgot to unpin it.
2017-06-13 14:43:44 +02:00
Yauhen Kirylau c5e830cd60 fix(awful: hotkeys_popup: keys): require all modules in init.lua 2017-06-12 20:39:46 -04:00
Uli Schlachter bcc3de469e Fix menubar under Lua 5.1 (#1838)
LGI's async support was trying to yield inside a protected call. Lua 5.1
cannot do that. Work around this by reverting to the behaviour before
commit 50cfa6c: Only call the callback in a protected context.

Fixes: https://github.com/awesomeWM/awesome/issues/1837
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-13 01:59:30 +02:00
Emmanuel Lepage Vallée ef1d7d8396 Merge pull request #1647 from Elv13/free_layout
Add a manual (free floating) layout
2017-06-12 19:49:30 -04:00
nahsi d368cee8aa hotkeys-popup: tmux hotkeys
Closes https://github.com/awesomeWM/awesome/pull/1830.
2017-06-12 23:03:43 +02:00
Emmanuel Lepage Vallée e993d7a117 Merge pull request #1689 from getzze/wibox_calendar
Add calendar widgets (wibox and popup)
2017-06-12 03:11:24 -04:00
getzze 15d66167f7 tests: Test the calendar widget 2017-06-12 02:58:06 -04:00
getzze 39efa6bbf9 awful: Add a calendar popup widget 2017-06-12 02:58:06 -04:00
getzze 5b0abb9541 widget: Add a calendar widget 2017-06-12 02:58:06 -04:00
Emmanuel Lepage Vallée 714baacc8c Merge pull request #1833 from Elv13/del_white_space
quality: Remove trailing white spaces
2017-06-11 17:22:51 -04:00
Emmanuel Lepage Vallée 410e1a9969 Merge pull request #1835 from Elv13/fix_1795
doc: Fix a taglist copy/paste oversaw
2017-06-11 17:20:22 -04:00
Emmanuel Lepage Vallée bad2bbfb31 Merge pull request #1831 from Elv13/fix_1493
Fix #1493 and #1651
2017-06-11 17:19:29 -04:00
Emmanuel Lepage Vallee 212cb84782 doc: Fix a taglist copy/paste oversaw
Fix #1795
2017-06-11 01:23:36 -04:00
Emmanuel Lepage Vallee f2b7765355 tests: Test the `manual` layout. 2017-06-11 01:14:10 -04:00
Emmanuel Lepage Vallee 5d46d47ef7 wibox.layout: Add a `manual` layout.
A layout with manual widget positions. It is still useful as it is
manager by the hierarchy and widget position can be functions.
2017-06-11 01:14:10 -04:00
Emmanuel Lepage Vallee 9e01c92ea2 tests: Minor changes to the wibox template. 2017-06-11 01:14:10 -04:00
Emmanuel Lepage Vallee 5d6d8043ec quality: Remove trailing white spaces
Fix #1129
2017-06-11 00:11:48 -04:00
Emmanuel Lepage Vallee 1839c4ecaa tag: Save history after the first iteration
Fix #1651
2017-06-10 23:52:13 -04:00
Emmanuel Lepage Vallee 9c77aa58c5 rules: Replace switchtotag implementation with awful.tag.viewmore.
Fix #1493
2017-06-10 23:50:27 -04:00
Simon Désaulniers ffead7dcda hotkeys_popup: keys for qutebrowser (#1829) 2017-06-11 00:10:42 +02:00
Emmanuel Lepage Vallée 7c44b05deb Merge pull request #1825 from psychon/magnifier-relayout
Re-arrange the magnifier layout on focus changes
2017-06-09 05:24:38 -04:00
Emmanuel Lepage Vallée 1a5d9d09fd wibar: Fix with width and height beautiful properties (#1826)
There was code that always set the values. The fallback was never
executed.

Fix #1824
2017-06-09 05:21:49 -04:00
Uli Schlachter 3bb8efd2db Re-arrange the magnifier layout on focus changes
Just re-arranging on every focus change would cause useless/needless
re-arranges (which have no effect except to waste CPU time). Thus, this
adds a special (undocumented) flag on layouts that makes sure that a
rearrange occurs when the focus changes.

Fixes: https://github.com/awesomeWM/awesome/issues/1799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-09 10:13:14 +02:00
Emmanuel Lepage Vallée 35c3cb7ee0 Merge pull request #1822 from psychon/get_children
Add tests for get_children()
2017-06-08 21:32:40 -04:00
Daniel Hahler 2852ad30f5 Merge pull request #1823 from psychon/dpi
Honor DPI for awful.menu
2017-06-09 01:53:08 +02:00
Uli Schlachter 9b991fb40b awful.menu: DPIfy the default menu size
Related-to: https://github.com/awesomeWM/awesome/issues/1807
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:12:15 +02:00
Uli Schlachter af5d6b683f DPIfy all themes (mostly zenburn)
This makes sure that all sizes that are specified in themes go through
the dpi() function. For most themes this just means that the value 0 is
DPIfied, which should not make much of a difference. However, for
zenburn this actually adds the very first calls to dpi() to this theme.

Fixes: https://github.com/awesomeWM/awesome/issues/1807
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:09:47 +02:00
Uli Schlachter c8dc563ce1 Add tests for get_children of containers
Fixes: https://github.com/awesomeWM/awesome/issues/1672
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:00:44 +02:00
Uli Schlachter 72c2f06c01 Add tests for get_children of layouts
Partially-fixes: https://github.com/awesomeWM/awesome/issues/1672
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:00:44 +02:00
Caleb Maclennan ffca875633 Add aweful.util.pread() so API docs have deprication notice (#1502)
* Add awful.util.pread() so API docs have deprication notice

* Update util.lua

* Update util.lua

* Update util.lua
2017-06-06 00:55:11 +02:00
Uli Schlachter af8288335b Use command line instead of env for passing children
Commit e54361a374 added code so that we pass the list of
currently running children across restart via an environment variable.
As Colin Walters correctly points out, setenv() is not safe in a
multi-threaded processes.

Thus, instead of using the environment, use the command line to pass
this information along.

https://github.com/awesomeWM/awesome/issues/1812
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-04 16:04:44 +02:00
Uli Schlachter d799eea2cf Restart by calling execvp() directly
Before this, we used a_exec() with started a shell and used it to parse
our glued-together command line. That only asks for escaping trouble
(think: Path to the config file is given on the command line and
contains a space), so use execvp() directly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-04 16:04:44 +02:00
Uli Schlachter 84080c64c5 spawn: Use CLOEXEC for pipes (#1811)
Fixes: https://github.com/awesomeWM/awesome/issues/1193#issuecomment-305705724
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-02 10:13:26 +02:00
Emmanuel Lepage Vallée 6254e6b7d3 Merge pull request #1809 from psychon/reap_children
Reap children even across a restart
2017-06-01 22:32:02 -04:00
Daniel Hahler 105638e920 client: update_implicitly_floating on manage (#1803)
Ref: https://github.com/awesomeWM/awesome/pull/1748#issuecomment-304010490
2017-06-01 21:27:53 +02:00
Uli Schlachter e54361a374 Reap children even across a restart
In Unix, so that a process can learn about the exit status of the child
processes that it started, children become zombie processes until the
parents collects their exit information. We use glib both for starting
and for collecting processes. However, when awesome is restarted, the
new instance inherits children, but does not know about them and does
not inherit them.

Fix this by explicitly tracking a list of running child processes and by
serialising them across a restart via an environment variable. The new
awesome instance can then watch for these child processes, but besides
that it ignores them and does not use their exit status in any way.

Thanks to Colin Walters for the hint with serialising the list of processes.

Fixes: https://github.com/awesomeWM/awesome/issues/1193
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-01 15:47:24 +02:00
Emmanuel Lepage Vallée 5544d11405 Merge pull request #1802 from awesomeWM/move-widget-drawing
Move gears.surface.widget_to_svg to wibox.widget.draw_to_svg_file (and widget_to_surface to draw_to_image_surface)
2017-06-01 06:05:21 -04:00
Emmanuel Lepage Vallée a6ec8c0605 Merge pull request #1806 from asmunder/update-porting-tips
Updated porting tips
2017-05-31 03:10:18 -04:00
Åsmund Ervik c172af947e Updated porting tips with new section on how to obtain clean 3.5.9 and 4.0 rc.lua versions to diff existing config with / port into. Fixes issue #1576 2017-05-31 08:51:53 +02:00
Uli Schlachter 5f92eda6bf Makefile: Run cmake less often
Previously, running make in the build/ directory depended on the "cmake"
target which was running the cmake command. This target was phony,
meaning that it was always considered to be out of date and needed to be
re-generated.

Change this so that instead things depend on the CMakeCache.txt file. If
that file is already there, we do not re-run cmake.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:27:30 +02:00
Uli Schlachter 82b51c2715 Makefile: Stop creating .build-* directories, use build directly
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:27:30 +02:00
Uli Schlachter 9bf50beab0 Makefile: Add a hint that cmake can be used directly
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:27:30 +02:00
Uli Schlachter 801a1f0a89 Deprecate widget-drawing functions in gears.surface
This marks the functions gears.surface.widget_to_svg() and
gears.surface.widget_to_surface() as deprecated in awesome 5. This means
that by the time that awesome 6 becomes a thing, we can finally remove
these...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 0abfed54de example tests: Switch to new API
This makes the templates used by the example tests use the new API added
in the previous commit.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 6de6419180 Add functions to draw widgets to a cairo surface
These are supposed to eventually replace the already-existing functions
in gears.surface which have a similar signature

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 0707f52ebf Get rid of broken hint in the readme (#1801)
luaL_dostring(L, s) is a macro that expands to
luaL_loadstring(L,s)||lua_pcall(L,0,LUA_MULTRET,0). Then,
lua_pcall(L,n,r,f) sometimes (since Lua 5.3?) is a macro that expands to
lua_pcallk(L,n,r,f,0,NULL), but can sometimes also just be a function.

Explaining all the above would make this section more complicated and
apparently no one uses this hint anyway, because no one told us yet that
this hint does not work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 10:28:44 +02:00
Uli Schlachter b5cdd06a78 Emit wallpaper_changed less often (#1800)
Commit 222f0a133c optimised the case where we change the wallpaper
so that we can give the new wallpaper to Lua faster. However, contrary
to what was intended, it also caused another wallpaper update later when
the server told us that the wallpaper actually changed. This was because
the juggling with multiple X11 connections went wrong.

Fix this by using the right connection to actually change the wallpaper.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-29 20:08:56 +02:00