Commit Graph

9390 Commits

Author SHA1 Message Date
Aire-One bc822c0af7 Add all parameters from awful.prompt to awful.widget.prompt constructor. 2018-10-31 11:35:56 +01:00
Aire-One d5f20a7e0b Add `done_callback` parameter to awful.widget.prompt constructor. 2018-10-31 09:00:18 +01:00
Emmanuel Lepage Vallée 2458f127f3
Merge pull request #2360 from Elv13/add_awful_tag_layouts
awful.tag: Add awful tag layouts
2018-10-22 14:40:16 -04:00
Daniel Hahler da585439ff docs: update URL for vicious (#2446)
It has been turned into an organization [1].

1: https://github.com/vicious-widgets/vicious/issues/60

[ci skip]
2018-10-20 15:15:01 -04:00
Uli Schlachter ccd5be68f0 Merge branch 'mergify' of https://github.com/jd/awesome 2018-10-20 13:35:15 +02:00
mergify[bot] 99fbe2ae7b
Merge pull request #2441 from Elv13/spawn_tests
tests: Fix a "rare" build failure
2018-10-17 01:13:39 +00:00
Emmanuel Lepage Vallee fded6acf97 tests: Fix a race condition in the spawn test.
To happen, both of these races have to be lost by client3

 * client2 have to take more time to `:kill()` than client3 take
   to be spawned.
 * client4 have to start faster than client3

It is very unlikely to happen on normal systems, but on server it
happens. Some factor that may or may not be involved

 * The scheduler assigned client2 on a very busy CPU and client 3
   on a CPU still busy while some other CPUs are idle
 * Linux is bad at scheduling hyper-threading
 * The system is NUMA and the memory bandwidth is lacking on a core
 * There is some "Z" memory compression or drive based swap
 * Extreme bad luck

Fix #2424
2018-10-16 12:35:18 -04:00
Uli Schlachter 4744a744f0 gears.table.join: Ignore nil arguments (#2440)
When calling join with e.g. arguments (nil, {"a"}), then everything past
the nil was ignored, because the code internally used ipairs() to
iterate over the arguments and this stops at the first nil it
encounters.

Fix this by using select() to iterate over the arguments.

This also adds a unit test for this problem.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-16 10:17:45 -04:00
Emmanuel Lepage Vallée aa16d77d15
Merge pull request #2423 from Elv13/better_rules_doc
Better awful.rules doc
2018-10-16 08:44:58 -04:00
Emmanuel Lepage Vallée 35130169c9
keygrabber: Rename release_event to stop_event (#2422)
In the earlier revision of the keygrabber PR, there was a `release_key`
and it was suggested to rename it `stop_key`. However its sibling
`release_event` wasn't, so it is now confusing.

The commit adds a mild deprecation codepath to avoid breaking configs
based on git-master. However it isn't a "long term" deprecation notice
and the code can probably be removed in 5.0 without further delay.
2018-10-16 08:42:56 -04:00
Emmanuel Lepage Vallee 23c122e89a tests: Test awful.tag.object.set_layouts 2018-10-15 16:10:18 -04:00
Emmanuel Lepage Vallee 990b1ddb9d awful.tag: Add a "tag centric" way to manage a layout list.
Previously, the layout list was global. However it wasn't covering all
possible use cases and make using `awful.widget.layoutlist` hard since
a layout could be excluded from the `awful.layout.layouts` but still
used for a tag (by setting it explicitly).
2018-10-15 16:10:18 -04:00
Emmanuel Lepage Vallee ae5fc042ae layout: Add a get_tag_layout_index function.
It helps check of the current tag layout is part of

    awful.layout.layouts
2018-10-15 14:21:24 -04:00
Julien Danjou b07c5dab37 Migrate Mergify configuration to v2
This just convert the file to the new configuration format.
The action "delete_head_branch" is added to clean up branches after they are
merged.
2018-10-15 16:00:34 +02:00
mergify[bot] 0475ff12c9
Merge pull request #2432 from actionless/dont-raise-on-startup
fix(awful: rules): don't raise every focusable client on awesome startup
2018-10-15 12:43:33 +00:00
actionless 3cef72bb30 fix(awful: rules): don't raise every focusable client on awesome startup
re #2095
2018-10-14 20:41:45 +02:00
Emmanuel Lepage Vallee bb357dd33e doc: Restore the example width limit to fit in 1024x768.
The old stylesheet did this and it forced the examples to be smaller.

This commit restore this limit.
2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee 43a82f34f0 doc: Add more examples about the spawn.easy_async
Ref #1373
Ref https://stackoverflow.com/questions/52634985/awesome-wm-os-execute-vs-afwul-spawn
2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee cd6979618f doc: Update the CSS to support our custom table class
Other change:

 * Use GitHub style <code> border
 * Add support for HTML <kbd> tags
2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee 845b9a930c doc: Refactor awful.spawn doc to have a property list. 2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee b4e0363ac3 doc: Move the awful.rules to the header.
It's easier to find.
2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee b49f7e22dd doc: Add an index of valid properties to awful.spawn and awful.rules. 2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee 62c95d5fe6 build: Move the meta file parser to an helper module
The commit also re-work the build target so if the file are deleted,
then they are created again. Using `file(COPY ...)` and
`file(MAKE_DIRECTORY ...)` as done previously caused some file to be out
of date or not being regenerated at all.

This commit also fixes some broken target that depended on `file(` and
`configure_file` CMake command not being part of any target.

Fix #2342
2018-10-12 14:18:32 -04:00
Emmanuel Lepage Vallee 6ac8f30d62 build: Add more dependencies to the ldoc target
Right now it was possible to modify `rc.lua` without the doc being
aware of it.
2018-10-12 14:03:33 -04:00
Emmanuel Lepage Vallee 90b17bdc09 awful.rules: Add proper documentation to the extra client properties.
Until now there wasn't much documentation available about how to use
these properties. With the new work on `awful.spawn` that rely more and
more on `awful.rules` integration, it is worth fixing.

This commit add a new documentation section and a future commit will
aggregate them to generate an index.
2018-10-10 01:58:18 -04:00
mergify[bot] 7020a9707f
Merge pull request #2421 from Elv13/fix_2419
Fix 2419
2018-10-08 16:46:46 +00:00
gabriel klawitter 7519c6966a dbus: fix nil notifications (#2180)
When mangling notifications via naughty.config.notify_callback it is
advised (1) to return nil to reject a notification. The underlaying dbus
library tries to access a field of that notification table and fails.

(1) https://awesomewm.org/doc/api/libraries/naughty.html
2018-10-07 16:09:12 +02:00
Uli Schlachter 75fc93d9c1 Merge branch 'more_gravity' of https://github.com/psychon/awesome 2018-10-07 13:45:50 +02:00
mergify[bot] 2f70fd6cce
Merge pull request #2409 from Elv13/spawn_once
A better run_or_raise/spawn.once/singleton API
2018-10-07 11:35:11 +00:00
Emmanuel Lepage Vallée 768184d152
Merge pull request #2368 from psychon/motif_hints
Add c.requests_no_titlebar based on motif hints
2018-10-06 22:00:03 -04:00
mergify[bot] 7ca8f3618c
Merge pull request #2420 from blueyed/void
signal_child: use "(void) res" to silence compiler warning
2018-10-06 22:59:18 +00:00
Emmanuel Lepage Vallee 6229783e16 tests: Add a titlebar integration suite
It doesn't do all that much, but will prevent #2419 from regressing
2018-10-06 18:57:27 -04:00
Emmanuel Lepage Vallee 789cf11d8d titlebar: Emit `request::titlebars` from `awful.titlebar`.
The toggle/show/hide function were incompatible with the current
`rc.lua` is `titlebars_enabled` was removed from the rules because
they were never created. This has always been the case but the
introduction os `request::titlebars` in Awesome 4.0 allows to solve
this longstanding issue. However until now it didn't.

Fix #2419
2018-10-06 18:46:50 -04:00
Alyssa Ross ee9670b1ea Gracefully fail when history file is inaccessible (#2410)
If the history file (or its parents) can't be created, running a command
will fail entirely. Since saving command history is not an integral part
of running a command, it would be nicer if it carried on, just without
saving history. This is what shells usually do.

This patch removes assertions in the history saving function and
instead adds an early return, so if the history isn't saved the command
invocation simply carries on.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
2018-10-06 22:53:48 +02:00
Daniel Hahler aaed083755 signal_child: use "(void) res" to silence compiler warning
Fixes https://github.com/awesomeWM/awesome/issues/2418.
2018-10-06 22:49:29 +02:00
Emmanuel Lepage Vallee 4c7bcf044c tests: Add more spawn tests 2018-10-05 10:57:55 -04:00
Daniel Hahler c21e8b980a
minor: spawn_child_exited: use "signal" for signals in warning (#2417) 2018-10-04 19:09:01 +02:00
Emmanuel Lepage Vallee 021a1feec8 awful.spawn: Add a `raise_or_spawn` method. 2018-10-04 09:16:00 -04:00
Emmanuel Lepage Vallee 0ac99a5dc5 awful.rules: Rename switchtotag to switch_to_tags.
First of all, it select many tags, so there is an "s". Also, Awesome
standardised naming to snake case in v4.0, but this was missed.
2018-10-04 09:16:00 -04:00
Emmanuel Lepage Vallee 927e7b2796 awful.spawn: Add an `once` and `single_instance` methods.
This commit adds a way to leverage the xproperty and startup_id APIs
to persist an execution token across restarts. It allows to use
`awful.rules` on clients that were executed by a previous Awesome
instance.

The main limitations of these methods is the lack of entropy used to
build the token. If the command is the same in multiple
`awful.spawn.once`, then it will not work as expected. To mitigate this
issue, the system try to concatenate the `awful.rules` table after the
command and hash the resulting string. Given rules are a table, it can
have loops and/or issues with keys ordering. The hash function sort and
limite recursion to prevent a stack overflow. Another issue is the
unreliability of startup notifications.
2018-10-04 09:16:00 -04:00
mergify[bot] 622a330e63
Merge pull request #2412 from blueyed/deprecate-raw
themes/xresources/assets.lua: use raw=true with deprecation
2018-10-03 23:42:18 +00:00
Daniel Hahler 03b8a35c5c themes/xresources/assets.lua: use raw=true with deprecation 2018-10-03 17:37:35 +02:00
Emmanuel Lepage Vallee 9250610a77 activate: Add `switch_tag_tag` and `switch_to_tags`.
Also bring some consistency with `awful.rules` naming. A future commit
will add a `TODO v5` to resolve this naming issue.
2018-10-03 08:38:12 -04:00
Emmanuel Lepage Vallee 9e45e016e9 tag.viewmore: Add an optional limit to the number of selection. 2018-10-03 08:38:12 -04:00
Emmanuel Lepage Vallee da68b3cbaf table.join: Make deterministic.
`pairs` order isn't defined and `{...}` will always be ordered.
There is no reason to have random behavior where it can be
predicted at no additional cost.
2018-10-01 14:57:55 -04:00
Yauhen Kirylau 3931ae370c feat(menubar): expose menubar styling to beautiful (#2375) 2018-09-28 00:35:10 -04:00
mergify[bot] bed42a10ed
Merge pull request #2401 from psychon/fix_doc_names
Fix incorrect @name annotation in gears.string
2018-09-26 19:18:10 +00:00
Uli Schlachter 3927dbcf02 Fix incorrect @name annotation in gears.string
gears.string.xml_escape was annotated with "@name escape" and
gears.string.xml_unescape was annotated with "@name unescape".

Reference: https://github.com/awesomeWM/awesome/issues/2397#issuecomment-424630100
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-09-26 10:37:59 +02:00
mergify[bot] 68e4dd430f
Merge pull request #2388 from sigprof/fix-awful-placement
Fix awful.placement.no_overlap + awful.placement.no_offscreen
2018-09-13 07:38:17 +00:00
Sergey Vlasov 16b5803fda Add a test for awful.placement.no_overlap+awful.placement.no_offscreen
Test that the placement function used in the default configuration
behaves as intended.  This test was failing before the no_overlap and
no_offscreen fixes in two previous commits.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-09-13 08:23:36 +03:00