Commit Graph

3418 Commits

Author SHA1 Message Date
Mahe 6779a61b40
mouse: respect border width in get_current_widgets (#2990) 2020-02-15 19:27:33 -05:00
Emmanuel Lepage Vallée 59b31e74b3
Merge pull request #2988 from Elv13/notif_rules_groundwork
Fix multiple notifications issue
2020-02-15 17:59:28 -05:00
Emmanuel Lepage Vallée 10e32198e7
Merge pull request #2982 from Elv13/modeline
Support shebangs (#!), modelines, API levels and add more doc.
2020-02-15 17:53:41 -05:00
Uli Schlachter 225bb8a8c6 Consider icon spacing in systray:draw()
When less space is available than was asked, systray:draw() has to
compute the right base size so that all the icons fit into the available
space. This computation so far ignored the icon spacing, resulting in a
too large base size.

Fixes: https://github.com/awesomeWM/awesome/issues/2981
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-02-13 12:11:41 -05:00
mergify[bot] fd237b9cd8
Merge pull request #2991 from psychon/cleanup_tag_history
Cleanup tag history on screen removal
2020-02-13 00:31:04 +00:00
Uli Schlachter 38a2a524a7 Cleanup tag history on screen removal
The tag history kept a strong reference to a screen even after that
screen was removed. This prevented the garbage collector from cleaning
up.

Fix this by getting rid of the tag history on screen removal.

Related-to: https://github.com/awesomeWM/awesome/issues/2983#issuecomment-584249568
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-02-12 20:33:21 +01:00
Emmanuel Lepage Vallee 720bef0b02 naughty.notification: Do not hold a strong reference to the screen.
The screen will leak if there is active notifications when the screen
is removed. Note that as of this commit, it still does, but "less".
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee d60c9ed0dd gears.geometry: Add a `rectangle.is_inside` function. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 9d6ce1d298 doc: Fix gears.geometry doc. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee edbf254c51 naughty.box: Have a better error message when an invalid position is set 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 816188163a naughty: Fix an internal index corruption issue.
Due to some signal callbacks, some notifications could be added twice
to the by-position index.
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 8190ece3b2 placement: Fix a parent geometry bug in `next_to`.
The function returns the geometry of the parent object. As it was used,
it was passed the parent object directly. The means the parent geometry
of the parent object was used instead of the geometry of the parent
object. This worked "fine" as long as the mouse was in the same screen,
but it was just hiding the bug.
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 0703fa2197 naughty.box: Move the notification when a screen is resized. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 207efe318a doc: Upgrade the notification documentation to the latest standards. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee ef7e4ce967 naughty.box: Allow constructor arguments to be passed to `wibox()`.
Because it was using a metatable proxy instead of a full copy,
`pairs()` wasn't working and thus any code based on it was
blind to the `args`.

Fixes #2956
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 21caa19a21 naughty: Add a way to revert to the legacy mode.
When `rc.lua` will use the new notification API by default, we need
a way to revert back to the lagacy mode to be able to test it.
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 9ec11bf1b3 naughty: Fix the screen property for the `box` layout.
The original idea was to decouple the notification and the screens, but
this causes the default `rc.lua` to behave in very unexpected ways.

This commit re-implement the `legacy` logic for the `box` layout.
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee f5b5e6d90d naughty: Add a `request::screen` handler. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 636cc2bf9c naughty.background: Do not use the deprecated `shape_border_width`.
The notification code predates the deprecation, but was merged after
it.
2020-02-10 03:30:21 -05:00
Emmanuel Lepage Vallee e0dac2e901 awful.popup: Replace the deprecated awful.util.table with gears.table.
The popup code is older than the deprecation, but was merged after it.
2020-02-10 03:30:21 -05:00
Emmanuel Lepage Vallee 9cbc8a18c0 rc.lua: Revert moving the sloppy focus to awful.permissions.
This caused a behavior change it wasn't clear how to use the
permission API to change the focus mode.

The change will only take effect if the user override the API
level.
2020-02-08 17:59:16 -05:00
Emmanuel Lepage Vallee e0b982fa1a gears.debug: Use the API level as the source of truth.
Rather than the version.
2020-02-08 17:18:01 -05:00
Emmanuel Lepage Vallee 68a6c978f5 doc: Document that wibox have class-level signals. 2020-02-02 21:07:07 -05:00
Emmanuel Lepage Vallee 973671b081 doc: Document that awful.mouse.resize/move use the permission framework. 2020-02-02 21:07:06 -05:00
Emmanuel Lepage Vallee 44301589c4 wibox: Connect the existing request::geometry signal to an handler.
The signal has been implemented for years, but nothing was connected
to it.
2020-02-02 21:07:04 -05:00
Emmanuel Lepage Vallee 0c08bb4304 widget: Add class-level signal forwarding.
Just like clients and other CAPI classes, it is now possible to
connect to all instance signals. There was already a couple of
`request::geometry`, but no way to forward them, so it was
de-facto broken.
2020-02-02 21:06:19 -05:00
Emmanuel Lepage Vallee 5891783ba9 wibox: Do not overwrite `gears.object` methods.
The next commit will all class level signals. The current design
is used in widgets, but is a bad fit for wiboxes. They should
behave more like client. In v5, setting methods on `wibox` directly
will be deprecated. `wibox.object` is already supported. I don't
think anyone really do that anyway and isn't documented.
2020-02-02 21:06:16 -05:00
Aire-One 02b1a6b633 Fix missing `self` parameter in documentation usage examples. 2020-01-28 10:57:43 +01:00
Emmanuel Lepage Vallée 2f905f2522
Merge pull request #2895 from Elv13/ruled_client
Move `awful.rules` to `ruled.client`.
2020-01-19 20:15:52 -05:00
Uli Schlachter 8df463f971 doc: Improve the client documentation. 2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee cb9c33cda8 "Really" deprecate the client marked and unmarked signals.
The doc said they were deprecated in 4.0, but back then there was
no API to deprecate signals.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 74ba84b299 doc: Make use of the @classsignal tag.
It wasn't doing anything until now.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 575b0f12dc doc: Remove all type aliases.
They render poorly and serve no purpose.

    #!/bin/bash
    for FILE in $(git ls-files | grep -E "\.(h|c|lua)" | grep -v tests | grep -v spec); do
        sed -i 's/^[ ]*--*[ ]*@client /-- @tparam client /g' $FILE
    done
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 5e720c9744 doc: Major client documentation backfill.
This commit mostly rewrite the client documentation and pay the
technical debt accumulated over the years. Most of the client
documentation was still one-liners from the luadoc era. It now
has all the new tags, type. It also has actual description of
what the properties do beyond the name.
2020-01-19 20:11:19 -05:00
Yauhen Kirylau 37aa23be86 fix(gears: string: split): support more delimiters (#2962) 2020-01-19 19:04:28 -05:00
laith-m0 65512b5ea9 Fix prompt navigation (#2970)
1. Open any awful.prompt(mod+r or mod+x)
2. Type ()->
3. Press alt+b two times
2020-01-19 19:00:56 -05:00
Emmanuel Lepage Vallee 20743a9a16 Remove all usage of the now deprecated `awful.rules`. 2020-01-19 02:59:10 -05:00
Emmanuel Lepage Vallee e309059f4c doc: Add more example to awful.client. 2020-01-19 02:58:49 -05:00
Emmanuel Lepage Vallee b1a4b1dd9a doc: Add a flowchart for ruled.client. 2020-01-19 02:58:46 -05:00
Emmanuel Lepage Vallee 71c230035c rules: Move `awful.rules` to `ruled.client`.
From now on, all core object will have their own rules. `awful.rules`
hardcodes some client specific code. All `rules` module have some form
of class specific code. This code will now be part of a new module
called `ruled`. Since a year or so, a lot of work has been done to
refactor the rules on top of the shared `gears.matcher` class. This way
there wont be as much duplication.
2020-01-19 02:58:37 -05:00
Emmanuel Lepage Vallee 39c90b8303 hotkeys: Port away from awful.rules 2020-01-19 02:39:30 -05:00
Emmanuel Lepage Vallee 6ee294fd5a doc: Make sure the ruled module init.lua is ignored.
This has to be in its own commit otherwise Travis will fail. This
is because it will keep the file in the build directory when
iterating all commits. Then `ldoc` will fail because the file doesn't
have documentation. If `config.ld` is updated first, then it will
fail because `ruled/init.lua` doesn't exist yet. When it is done
in a separate commit, then `config.ld` is already updated and comes
with `init.lua`.
2020-01-19 01:55:54 -05:00
Emmanuel Lepage Vallee da8daa8dfc debug: Allow "deprecated_in" for class deprecation. 2020-01-19 01:55:51 -05:00
Emmanuel Lepage Vallée 5ad02d0b8b
Merge pull request #2948 from actionless/vim-keys-add-folds
Vim hotkeys: add folds
2020-01-18 16:56:33 -05:00
Seth Barberee ab6381686e add calendar_popup pic to doc 2020-01-17 16:02:18 -06:00
Emmanuel Lepage Vallee 6ecab5f2f1 doc: Add documentation in each objects which emit request:: signals. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee e77dd01e5a Add more TOVOv5 for unfixable APIs.
Another pull request at some point will add proper API levels,
it will then become possible to fix these without breaking
the API for everybody. However right now there is no way around
the problems.
2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 6b427e73a8 tag: Add a request::layouts signal and append/remove layout. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 668ed6135c client: Add a `:grant()` and `:deny()` method for permissions.
This is a lower level API than what most people will end up using
(the rules), but it is useful enough to expose to the public API.
2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 5818de41ce awful: Rename awful.ewmh to awful.permissions.
It has nothing to do with EWMH since a long time. It was already used
for the requests, so lets formalize this.
2020-01-11 15:43:30 -08:00