Commit Graph

3660 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 0b075761e3 naughty: Fix the `ignore_suspend` property.
By fixing some suspend bugs a few weeks ago, I "regressed" this
a little. By that, I mean there were bugs in the suspend code
which caused `ignore_suspend` to work simply because suspend
globally failed rather than `ignore_suspend` being implemented
correctly.

Fix #3465
2021-10-14 14:03:39 -07:00
Emmanuel Lepage Vallée d487d1010e
Merge pull request #3443 from Elv13/fix_3396
Improve suspending the notifications
2021-10-09 12:58:11 -07:00
Emmanuel Lepage Vallée 1f84dbef18
Merge pull request #3451 from Elv13/screenshot
Copy of  "Content (Screenshot) API Expansion"
2021-10-07 14:03:57 -07:00
Emmanuel Lepage Vallee 9c22b029eb naughty.layout.box: Make sure discarded boxes don't come back to life.
Previously, when resuming a notification for which the popup was closed,
it would re-appear.
2021-10-05 13:00:14 -07:00
Emmanuel Lepage Vallee 3458c89040 naughty: Suspend existing notifications.
Previously, it would just suspend new notification, but do nothing
about the existing ones.
2021-10-05 13:00:14 -07:00
Emmanuel Lepage Vallee 075935fd37 naughty: Do not call `request::display` when suspended.
Fix #3396
2021-10-05 12:59:39 -07:00
Emmanuel Lepage Vallee 0d1e977917 naughty: Fix getting a notification by id.
There is more into that table than just screens. If `get_by_id` was
called with an invalid notification (or a "future" one in case of
suspended / do_not_disturb), it would explode.
2021-10-05 12:59:39 -07:00
Elyes HAOUAS f81723733c
lib/naughty/init.lua: Fix typo on "screen" (#3456)
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-05 12:13:33 -07:00
Aire-One eb89c3688c Update screen.lua 2021-10-04 19:49:22 -07:00
poisson-aerohead 02e12f4cb4 Update screen.lua
Add DOC comments to the new screen.object.get_content property in lib/awful/screen.lua.

Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-10-04 19:49:22 -07:00
poisson-aerohead b4cb3eae7b Debug the suggested changes to lib/awful/screen.lua per the discussion
thread at PR 3448. PR 3448 involves changes to expand the content
(screenshot) API. Originally, I added both root.content() and and
screen.content to the C source, as client.content has always been
handled. However, screen.content in effect takes a root screenshot and
returns a crop of it. This can just as easily be done through Lua.

When this quick update was implemented in github, the code added to
awful.screen.lua was not quite correct. These changes represent the
debugged version. Users can now call s.content for a screen object, s,
and the screenshot will work transparently.

Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-10-04 19:49:22 -07:00
Elyes HAOUAS 54a5a7dce5
Fix some spelling errors (#3450)
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-04 19:20:03 -07:00
Emmanuel Lepage Vallée eb07ca4c47 Update lib/awful/wallpaper.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2021-10-01 16:26:33 -07:00
Emmanuel Lepage Vallee 546ac6aec9 container.tile: Correctly transfer the Cairo source to the tile. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallée 01ae508899 Update lib/awful/wallpaper.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallée 7b8426bd24 Update lib/wibox/widget/imagebox.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee d8bc791818 imagebox: Add DPI and CSS Stylesheet properties for SVG images.
This exposes the `librsvg` DPI and Stylesheet properties. This
is a groundwork commit to port the xresources theme to use a SVG
wallpaper instead of hardcoded Cairo code to generate the colorfar
logo.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee ddccddb6dc imagebox: Allow to load SVG data without saving it. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 3f2db184ad gears.wallpaper: Deprecate. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee b0a2d82d8f compat: Do not require to pass pattern._native to the wallpaper.
It makes the shims impossible to implement without a double free,
a memory leak or a crash. Using `capi` should not require to
destroy the LGI wrappers.

Another example, not fixed in this commit, are the client shapes.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 98dd78b777 awful: Add a wallpaper module.
`gears.wallpaper` is a flat API (that doesn't even belong in gears) and
is neither well integrated with the other AwesomeWM concepts, nor well
documented or easy to understand for newcomers.

This module adds an object oriented, declarative, module with properties
for the most common wallpaper types. It also integrates with
`awful.placement` and the `wibox` module.

The design attempts to make the wallpaper a "wibox like" object like
the titlebars. It is non-interactive, but still allows the widgets. Note
that this is slow and should be avoided for dynamic content. It is why
the widgets are never updated unless manually reloaded. The objects also
attempt to be disposable rather than persistent. Thus they are immutable
by default to prevent accidental abuse.

Fix #3428 #2596
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 5212f0634a imagebox: Add a `downscale` and `upscale` property.
Previously, it was really hard to get the image to do one *or* the
other. The `resize` property set both at the same time.

While it could, this does not deprecate the old `resize` property
since 99% of the user wan't to lock both.
2021-09-24 08:38:13 -07:00
Emmanuel Lepage Vallee cefd4f843e gears.filesystem: Improve get_random_file_from_dir.
Previously, only a filename was returned. Getting the path was
inconvinient when used within a declarative construct.

It was also misbehaving then the directory didn't exist. Finally,
the extention list now accept extension names starting with a dot.
2021-09-24 08:38:13 -07:00
Emmanuel Lepage Vallee b038463e22 naughty.legacy: Handle broken configs betters.
If a config with naughty.layouts.box crashes at startup and the
fallback config uses naughty.layouts.legaxy, it is possible their
will be some lookup for an object which isn't tracked by the legacy
module.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee bd8f2f936b naughty: Fix a memory leak related to suspended notifications. 2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 9336b62f80 ruled.notification: Handle legacy presets.
This is deprecated, but some modules like `lain` use them, so it
must still minimally work for backward compatibility.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee e752943b98 notification: Correctly handle `screen` set in the presets.
It was setting directly to `_private`, which both didn't work
and caused a memory leak.

Fix #3428
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 21a111d154 naughty: Allow to set the message from the presets again.
This was never really supported and is really not what the presets
were event meant to be used for. But it worked and `lain` used it.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 89c84caee4 naughty.legacy: Explicitly remove the screen.
Do not rely on the GC. It isn't reliable with Luajit.
2021-09-22 13:39:58 -07:00
poisson-aerohead 87e09f81ab
Correction of error message in awful.keygrabber.run_with_keybindings (#3445)
Two calls to gdebug.print_warning() in run_with_keybindings use an
argument that concatenates a fixed string with the result returned by a
call to gdebug.dump(). gdebug.dump() is the debug library function for
immediate printing. It has no return value. This causes the correct
message in print_warning to not be printed, and also causes a
naughty.notify box to appear warning of an attempt to concatenate to an
empty variable.

The call to gdebug.print_warning should have an argument made by
concatenating to gdebug.dump_return(). Incidentally, this is in fact the
function used internally by gdebug.print().

Signed off by: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-09-21 08:34:46 -07:00
Emmanuel Lepage Vallée 5ca16ae8a0
Merge pull request #3364 from Aire-One/fix/awful.key-constructor
[doc] awful.key contructor and general improvements
2021-09-20 11:39:41 -07:00
Emmanuel Lepage Vallée c3a508a886
Merge pull request #3386 from Elv13/awful_wibar
Fix some wibar bugs, polish the API a bit and add some doc.
2021-09-19 13:05:11 -07:00
Emmanuel Lepage Vallee e27b908ca0 doc: Document the naughty.action "invoked" signal. 2021-09-16 17:25:46 -07:00
Emmanuel Lepage Vallee 17bd5fb036 naughty: Pass the notification object to the action "invoked" signal.
Fix #3384
2021-09-16 17:22:33 -07:00
Emmanuel Lepage Vallée 73e908ed95 Apply suggestions from code review
Co-authored-by: Lucas Schwiderski <4508454+sclu1034@users.noreply.github.com>
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallée 6ad693eff0 Apply suggestions from code review
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee d5d74e44de doc: Document the wibar module. 2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee b883855272 wibar: Allow to configure how conflicts between wibars are resolved.
Previously, the horizontal wibars would always get priority. Now,
this can be configured.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee 529a6c2a8d wibar: Expose update_workarea.
It is now possible to create wibars which are not changing the
tiled area.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee 67dc363437 wibar: Modernize the module structure.
Move the burdensome legacy code into local function so the normal
`gears.table.crush` module setup can be used. This fixes a couple
monior issues where `args` would be ignored.

This also makes a minor change to the logic. Changing the position
always moves to wibar to the end of the stack. Previously, there
was a minor case where it would not. There was also the case when
setting the same position twice would move the wibar, which was a bug.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee dab767af3e wibar: Restore the ability to align a wibar.
This was lost in 3.5->4.0 update, but still had some references in
the code and doc. At the time, the plan was to add it back
"shortly after" based on the `awful.placement` code, but it was
never merged.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee b62f343409 wibar: Add margins.
This is a feature request from Reddit. With this commit, the
awful.placement margins are exposed to the wibar API.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee ab977b2358 placement: Fix the struts size when margins are present.
Previously, it only added 1 of the 2 sides of the relevant margins
to the struct size. For example, if the position was "top", then
only the top margin was added, not the bottom one.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee d9f27bdf4b placement: Do not leak the composed placement "override" in the args.
Without this change, if a composed placement was used, it would leak
the "override_geometry" in the args, which would be kept cached during
the next composed node. If that node had no override of its own, it
would use the previous one by accident.

In practice, it means it was impossible to resize a `wibar` manually.
The `wibar` would always restore itself to the height (or width, for
vertical ones) it previously had.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee 4b606fb3d7 notification: Fix rendering during early screen creation.
If the problem happens early enough, it was possible that the
screen arrway wasn't initialized yet. In that case, the notification
would fail to render.
2021-09-12 01:59:48 -07:00
mergify[bot] 7ae6d26363
Merge pull request #3387 from mattplm/master
Stop using fixed row number in calendars
2021-09-07 23:51:38 +00:00
mattplm 97726e8f38 Stop using fixed row number 2021-08-28 23:10:40 +02:00
ViSaturn 13cd20780e
spelling & grammar issues (#3410)
replace request to requsts & replace futur to future
2021-08-14 23:38:01 -07:00
aflorea-2k 260f6dbe97
doc(wibox.widget.textbox.html): fixed pango links (#3401)
Links to gnome's pango webpage
(https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) were
broken. They now all point to docs.gtk.org .
2021-08-03 20:02:25 +02:00
Lucas Schwiderski c689af64d5
doc(w.w.textbox): Improve ellipsize documentation
The list of possible values was missing one. Additionally, this adds an
example to visualize the available options.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-31 15:05:09 +02:00