Commit Graph

10661 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 2a65d8ade1 tests: Fix the layoutlist popup example.
`gears.table.cycle_value` returns 2 values. That accidentally
passed the second one to `awful.layout.set`, which didn't like
it at all.
2021-10-14 14:09:47 -07:00
Emmanuel Lepage Vallee 213bfbc9bd doc: Fix a syntax issue in the layoutbox doc. 2021-10-14 14:09:47 -07:00
Emmanuel Lepage Vallee 01020a197d layoutlist: Support scrollwheel by default.
It acts like the default `rc.lua` tag/tasklist widgets.

Idea from https://github.com/awesomeWM/awesome/issues/3388
2021-10-14 14:09:47 -07:00
Emmanuel Lepage Vallee 1d5af8e8ad widget.common: Allow buttons to be replaced later.
So far, they could only be set in the constructor.
2021-10-14 14:09:47 -07:00
Emmanuel Lepage Vallee 9c042fcb79 layoutlist: Fix an assert when `buttons` are specified.
Fix #3388
2021-10-14 14:09:47 -07:00
Emmanuel Lepage Vallee cd2e961fcb layoutlist: Remove the duplicate `buttons` property from doc. 2021-10-14 14:09:47 -07:00
Emmanuel Lepage Vallee 187b766cbe tests: Test naughty.notification.ignore_suspend 2021-10-14 14:04:40 -07:00
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 5a27eaa973
Merge pull request #3455 from Elv13/token
ci: Cleanup the previous test commits.
2021-10-14 12:06:09 -07:00
Aire-One 6d569f9e3b fixup! fix(root) copy_to_image_surface parameters 2021-10-12 21:48:56 +02:00
Aire-One cf9d4d382e fix(screen.content) use capi.root 2021-10-12 21:05:41 +02:00
Aire-One 96710a595e fix(root) copy_to_image_surface parameters 2021-10-12 21:05:41 +02:00
Yauhen Kirylau aedcd0c05c
test(screenshots, spawn): require exact major gtk/gdk versions (#3460) 2021-10-09 16:36:17 -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 375738d609 tests: Test `naughty.get_by_id` with invalid ids. 2021-10-05 13:06:26 -07:00
Emmanuel Lepage Vallee d4a41184c4 tests: Test the naughty "suspended" mode. 2021-10-05 13:00:14 -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
Brian Sobulefsky 4f0c3c5d90 Add tests for the new content API. This includes tests for root.content(),
screen.content, and client.content. Run with TESTS_SCREEN_SIZE set equal
to 1280x800. This test suite will be expanded once the more user
friendly awful.screenshot API is merged.

Signed off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-10-04 19:49:22 -07:00
poisson-aerohead 7a786dab1d Update root.c
Remove unnecessary function variables width and height, as they do not add any real value, and rather pass these as all other arguments are (such as the connection), giving the routine a uniform look.

Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
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
poisson-aerohead a9bf812c17 Update screen.c 2021-10-04 19:49:22 -07:00
poisson-aerohead 5f58bc3195 Apply suggestions from code review
Co-authored-by: Aire-One <aireone@aireone.xyz>
2021-10-04 19:49:21 -07:00
Brian Sobulefsky f6eef228e2 Updated API in the same interface as the client.content property to support
screenshots at the root window and screen levels. A call to the
root.content() method will return a screenshot as a Cairo surface of the
entire root window (generally all physical screens). Getting the
screen.content property will return a screenshot as a Cairo surface of the
screen object (generally a physical screen) just as client.content will for
a client object.

Sample usage - the traditional API supported focused client screenshot as:

  c = client.focus
  if c then
    gears.surface(c.content):write_to_png("/path/to/screenshot.png")
  end

Similarly, this API extension adds:

  s = awful.screen.focused()
  if s then
    gears.surface(s.content):write_to_png("/path/to/screenshot.png")
  end

for the screen class and:

  gears.surface(root.content()):write_to_png("/path/to/screenshot.png")

for the root window. Note that the example shows how to get a screenshot
of the focused screen, but this is not a limitation. A lua script could
call it on any screen object.

Signed off by Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-10-04 19:49:21 -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
Lucas Schwiderski d755d9add3 ci: Fix the debug messages. 2021-10-04 18:19:52 -07:00
Emmanuel Lepage Vallee 4ef08f7339 ci: Cleanup the previous test commits. 2021-10-04 14:35:01 -07:00
Emmanuel Lepage Vallée 46ae927951
ci: Fix another branch name issue 2021-10-04 14:24:17 -07:00
Emmanuel Lepage Vallée 3807ed83b0
ci: Change the branch check to see if it fixes the apidoc. (#3453) 2021-10-04 14:11:32 -07:00
Emmanuel Lepage Vallée f3e16e2466
Merge pull request #3452 from Elv13/token
Attempt to fix the APIDOC token
2021-10-04 10:42:18 -07:00
Emmanuel Lepage Vallee 5f321df4cc doc: Fix the image link on the index page. 2021-10-04 10:38:05 -07:00
Emmanuel Lepage Vallee 30eb441f3a ci: Change the API doc token name.
@blueyed added the old token used by Travis and it is called
"AWESOME_ROBOT_TOKEN"
2021-10-04 10:27:55 -07:00
Emmanuel Lepage Vallée 2bca64b89c
Merge pull request #3343 from Elv13/awful_wallpaper
Rewrite the wallpaper API
2021-10-02 13:38:21 -07:00
Emmanuel Lepage Vallee c3fe4c15ed doc: Uncomment the wallpaper `screen` property. 2021-10-01 16:54:22 -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 Vallée 7806763667 Update docs/05-awesomerc.md.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 70cd293839 doc: Integrate `awful.wallpaper` into the guides. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 4a0645e942 doc: Correctly render --DOC_NO_USAGE + --DOC_GEN_OUTPUT.
It was previously merged into a single block.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 1ff860454e theme: Use a SVG wallpaper for the xresources theme.
It uses a stylesheet for the colors. This is not "as good" as the
old one because it only supports 16:9 aspect ratio. However, the
old wallpaper function doesn't fit great in the new model. The
widget doesn't know the screen, so it cannot pass it to a function.
It's possible to stretch the wallpaper.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee bbf1c9270f tests: Test the imagebox DPI and CSS stylesheet. 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