Commit Graph

3640 Commits

Author SHA1 Message Date
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
Lucas Schwiderski 8fab5aa703
doc(w.w.imagebox): Improve various bits
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-14 23:17:49 +02:00
Lucas Schwiderski 4096c19223
doc(w.l.flex): Add module description
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-14 23:00:31 +02:00
Lucas Schwiderski 4b30158176
doc(w.l.fixed): Improve documentation for spacing properties
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-14 23:00:29 +02:00
Lucas Schwiderski f2c66b006d
doc(w.l.fixed): Add module description
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-13 22:44:50 +02:00
Lucas Schwiderski 08c893fff9
refactor(w.l.fixed): Fix line length
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-13 22:33:32 +02:00
Lucas Schwiderski a938a1b807
refactor(w.l.fixed): Rename abbreviated variables
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-13 22:30:52 +02:00
Lucas Schwiderski c1a3f02c88
doc(w.l.align): Add module description
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-13 20:30:22 +02: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
mergify[bot] d1c3394e40
Merge pull request #3375 from Aire-One/fix/3371
[Fix/3371] wibox.widget.base set opacity emit "widget::redraw_needed"
2021-06-28 05:15:05 +00:00
Aire-One 53a880454f fix(w.widget): signal typo and unit test
This is a combination of 2 commits.
* fix(w.widget): emit signal typo
* add(w.widget.base_spec): Unit test for setters signals emittion
2021-06-26 17:26:21 +02: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 3cefcfffe3
doc(g.timer): Improve documentation for helpers
Clarifies behaviour for the convenience constructor functions.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:29 +02:00
Lucas Schwiderski 33b2fdfbf6
doc: Fix typos
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:28 +02:00
Lucas Schwiderski 16df93370f
doc(g.table): Improve documentation
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:27 +02:00