When not including standard::type in the query for children of a file then Gio
may not look up this information. This might work on some file systems (e.g.
ext4), but other (apparently XFS) do not provide the needed file type
information (see man readdir on the d_type field). The result was that the
menubar contained no entries because no .desktop files were identified as
regular files and thus read.
Fix this by including standard::type in the queries.
Also, this commit makes the code use some pre-defined string constants from Gio
to make "double sure" that typos are caught.
Thanks to @Jajauma for doing the hard part on debugging this.
Fixes: https://github.com/awesomeWM/awesome/issues/863
Signed-off-by: Uli Schlachter <psychon@znc.in>
It can now keep the different return values and use them in
later chain nodes.
It also add a "virtual" geometry argument so the geometry is applied
only after the last node is executed.
Finally, it fixes using pretend and a composite chain at the same time.
When there are no screens, screen[1] causes an error. Thus, this isn't a safe
fallback for these functions. Instead, this commit makes the code prefer the
primary screen, if possible. If no screen exists, then screen.primary will be
nil, but at least it won't throw an error like screen[1] does.
(This also changes the outdated copy of getbycoord that exists in
wibox.drawable)
Signed-off-by: Uli Schlachter <psychon@znc.in>
to reproduce:
1) spawn an xterm
2) enter 'sleep 10 && killall xterm'
3) start moving the terminal
There will be an error
(found by a yet to be commited integration test)
* awful.widget.graph: add clear() function.
* awful.widget.graph: doc fixes for add_value.
add_value did not show up in generated luadoc. And the value parameter does not need to be between 0 and 1.
* awful.widget.graph: local functions clear and add_value as methods of graph.
There used to be `awful.client.data.focus`, which was moved to
`awful.client.focus.history.internal`.
While the former was accessible, the latter is not.
This is useful to get a list of most recently focused clients, without
having to hook into the signal yourself.
Closes https://github.com/awesomeWM/awesome/issues/841.
When a tag is deleted, this code tries to select some other tag. If the tag
which is to delete is the last tag of a screen, this code failed and indexed a
nil value. Fix this with a simple "if".
Signed-off-by: Uli Schlachter <psychon@znc.in>
If a screen is removed while a re-layout is pending, previously this code would
cause errors and problems. Since the screen is gone, there is nothing to arrange
anyway and we can just not do anything.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit changes some tables that are used for per-screen stuff to have weak
keys, so that the screens can be garbage-collected, if needed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When there is a maximized and floating client,
`awful.placement.no_overlap` would end up with an empty list of areas to
place the client into.
This patch fixes it to use the default `screen.workarea` in that case.
Closes https://github.com/awesomeWM/awesome/issues/813.
Rules refactor, part 1
This fix the following awful.rules bugs:
* **x**: Broken when "border_width" is set or left titlebars are used
* **y**: Borken when"border_width" is set or top titlebars are used
* **width**: See above + right litlebar
* **height**: Same as above
* **switchtotag**: Have a race with the "manage" -> "tag.withcurrent" code in `awful.tag`
* **tag**: Had dead code
* **screen**: Had a race condition with switchtotag
* **urgent**: Had a race with screen and another with switchtotag+focus
* **focusable**: Was broken yet again when request::activate was introduced (and also because of FS1098, that I also fixed)
* **no_overlap**: The "no_overlap" call in rc.lua "manage" section conflict with the geometry rules as the hints are not set (idk why).
* **size_hints_honor**: If set to false, it would be applied too late, causing height and width offsets due to placement or various geometry related properties
Remove request::fullscreen and request::maximized_* and use
a single request for them. The other client resizing features
will soon also start to use this.
Due to recent changes, it was no longer possible to disable the
default tag selection handler. This commit extend the already
existing request::tag mechanism to let handlers select the tags.
There was a regression when refactoring the API. It was no longer
possible to disable the automatic tag selection.
Due to recent changes, it was no longer possible to disable the
default tag selection handler. This commit extend the already
existing request::tag mechanism to let handlers select the tags.
Testing demonstrated that many rule properties were broken when used
together. This commit try to address this by forcing an execution order
that doesn't trigger the problems.
It is still possible to write broken rules, but it should not happen by
accident anymore. Users should not try to assign the client a tag on
screen 2 and also use screen=screen[1].
This commit also add a 3 step process to apply rules.
Testing showed that many rules are currently broken because
of execution races.
Create a new dynamic tag for the client.
There was many unfixable race conditions that could only be
solved by better integrating the request:: system and
awful.rules. This has the side effect to make rules mandatory.
The new stateful layout system try to avoid coupling and therefor
doesn't use these methods. It is not planned to deprecate the
stateless layout API, so these functions are just kept as-is with
the old naming convention.