Commit Graph

2127 Commits

Author SHA1 Message Date
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
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 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
ViSaturn 13cd20780e
spelling & grammar issues (#3410)
replace request to requsts & replace futur to future
2021-08-14 23:38:01 -07:00
mergify[bot] 832483dd60
Merge pull request #3362 from actionless/prompt-multibyte-hack
Fix the hack for multibyte characters in prompt (fixes #3308)
2021-07-12 06:07:03 +00:00
basaran f473639c5d
Update focus.lua (#3381)
missing stacked option for global_bydirection
2021-07-06 01:56:34 -07:00
Aire-One 4188d1df1e doc: Move inline usage to example files 2021-06-20 20:50:02 +02:00
Aire-One a3609146aa doc(awful.key) Improve module description 2021-06-20 20:50:02 +02:00
Lucas Schwiderski fcae67cc03
doc: Move inline usage to example files
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-20 13:47:27 +02:00
Lucas Schwiderski dc0d5df4da
doc: Implement review suggetions
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2021-06-20 12:25:11 +02:00
Lucas Schwiderski a6864a3e59
doc(tag): Reword signals documentation
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:32 +02:00
Lucas Schwiderski 7591d5cde3
doc(a.mouse): Fix static field documentation
Fixed incorrect field names and added missing parameter types.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:30 +02:00
Lucas Schwiderski b94cb51770
doc(a.titlebar): Improve titlebar documentation
The constructor's documentation was worded as if it was a getter, which
lead to unexpected behaviour where subsequent calls for the same client
replaced previous titlebars.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:27 +02:00
mergify[bot] f4fb055512
Merge pull request #3363 from sclu1034/issue/keygrabber_timer
Stop timer when stopping keygrabber
2021-06-14 08:13:21 +00:00
Aire-One 8085a508d1 add(awful.key) keygroup enum style table
Replace the `awful.keygroup` property by an table that can be used
as an enum to point to the `awful.keygroups` definitions.

The previous field for `awful.keygroup` was empty (even no-existant),
and was here only to appear in the documentation as a definition for
the valid values to target keygroups.

With this new enum style table, the user can easily refere to keygroups
the same way we did for mouse buttons.
2021-06-12 16:39:24 +02:00
Aire-One 948506cde1 doc(awful.key) Declarative constructor parameters 2021-06-12 14:38:18 +02:00
Lucas Schwiderski 1182552783
bug(a.keygrabber): Stop timer when stopping keygrabber
When stopping a keygrabber with a timeout manually or through the stop
key, the timer would continue and call the stop callback again some time
later.

The error message in `gears.timer:stop` is removed, since there actually
is no harm in just returning immediately. And the timer implementation
itself calls `:stop` in certain places without checking for `.started`,
which lead to a situation where the internal call to `stop` triggered
the error message.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-11 08:59:58 +02:00
actionless bbaccb05bc fix(prompt): handle multibyte character in Backspace, ^h, ^b and ^f 2021-06-11 03:20:32 +02:00
Emmanuel Lepage Vallee 5e5f587bea mouse: Fix the "is button X pressed" properties.
Apparently it never worked.

Fix #3352
2021-05-30 23:56:42 -07:00
Lucas Schwiderski 1b49a20e0d
doc(awful.client): Document special signal semantics
While the documentation already specified the signal via `@emits`, it
did not make it clear that this signal is emitted on a `tag` object,
rather than the `client`.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-05-22 01:24:07 +02:00
Lucas Schwiderski 4f1b308e2b
doc(awful.client): Improve documentation for c:to_selected_tags
The behaviour of `c:to_selected_tags()` does not match what one would
have expected from its short description.
The behaviour also doesn't really match the method's name, but since
this is already in use, I won't change functionality or names here.

Instead this extends the method's documentation to accurately reflect
its implementation and also point users to the functionality that they
were likely looking for based on the method's name.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-05-22 01:08:55 +02:00
actionless 6b93661048 fix(awful: hotkeys_popup: insert_keys): handle case when user actually binded some key like `<` or `>` which require xml escape for pango 2021-04-23 07:52:17 +02:00
Yauhen Kirylau a35acea61a
Merge branch 'master' into hotkeys-popup-better-split-key-labels 2021-04-23 07:23:26 +02:00
Emmanuel Lepage Vallee 90c4c60d2a Add more @supermodule and @hidden 2021-04-02 19:24:07 +02:00
Aire-One 20a8d902c5 doc(@supermodule): Add to awful.widget modules 2021-04-02 19:24:07 +02:00
James R aeb2d85dad
tasklist: Fix documented function names (#3276) 2021-03-22 15:28:53 -07:00
Emmanuel Lepage Vallée d583129eb6
Merge pull request #3143 from Elv13/doc_client_layout
Document the client layout properties
2021-03-22 12:10:36 -07:00
Daniel Hahler dab84c2662
fix(doc): gears.table.keys: s/integer keys/integer/ (#3293) 2021-03-22 12:05:17 -07:00
Emmanuel Lepage Vallee b4cf88f4c0 doc: Fix the titlebars widget constructor doc 2021-03-22 00:56:02 -07:00
Emmanuel Lepage Vallee 31fcce436c doc: Add a client border color example. 2021-03-22 00:56:02 -07:00
Emmanuel Lepage Vallee 8f8d0e7bbf doc: Fix a awful.ewmh->awful.permissions rebase issue 2021-03-22 00:54:00 -07:00
Emmanuel Lepage Vallee 522d628c2c doc: Complete the widget documentation page.
This adds the `awful.widget` content along with some images.
2021-03-22 00:54:00 -07:00
Emmanuel Lepage Vallee 9f50c5e062 doc: Add more tag images. 2021-03-22 00:54:00 -07:00
Emmanuel Lepage Vallee 42a86efa50 doc: Document some of the `tag` properties. 2021-03-21 23:58:05 -07:00
Emmanuel Lepage Vallee 9b4f5b7969 doc: Add an example for mouse `snap` and client edge tiling. 2021-03-21 23:58:05 -07:00
Emmanuel Lepage Vallee d9514820ef mouse: Add an `awful.mouse.snap.aerosnap_distance` global variable.
The distance to snap clients to each other was already something which
could be configured. The distance to enable screen edge wasn't.

Fixes #3025
2021-03-21 23:58:05 -07:00
jpkotta aba1cf398f
fix client:activate action mouse_center (#3257) 2021-02-28 23:03:14 -08:00
Jonta 1c53c36eb7
Grammar 2020-12-05 16:17:45 +01:00
mergify[bot] 6f047e9468
Merge pull request #3125 from actionless/hotkeys-vimdiff
feat(awful: hotkeys_popup: vim): add vimdiff
2020-10-07 15:04:52 +00:00