Commit Graph

101 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée d9998dedd2
Fix an `rc.lua` comment typo. (#2974)
I don't know how it got there. Either copy/paste or find and replace
mistake.
2020-01-25 18:20:30 -05:00
Emmanuel Lepage Vallee b8fbeb95c6 rc.lua: Switch from `awful.rules` to `ruled.client`.
It's the same module, but with a new name. The commit also switches
from the "one off" rule write to the incremental and signal based one.

This allows modules to add their own rules without having a race
condition against `rc.lua` and other modules. Previously, if a module
wasn't designed to prevent it, rules got destroyed each time.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage Vallee efc42b1be1 autofocus: Modify `awful.autofocus` to be a request::.
This also pulls in part of the permission framework to ensure
backward compatibility is kept.

`awful.autofocus` was always weird. It is a module part of `awful`,
but it was never part of `awful` `init.lua`. Rather, `rc.lua` was
the sole place it was used. It behave exactly like a request, but
predate them by years. As I cleanup the request:: API before the
permissions API gets formalized, this has to be fixed now.

It isn't deprecated in this commit because it makes too many tests
fail. Another pull request will solve that by adding the "API level"
concept to AwesomeWM so I can change the behavior without breaking
existing configs. With that, the behavior of `autofocus` will be
enabled by default with the permissions to disable it.
2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 5ad0856fee layout: Add a `request::default_layouts` to fill the list of layouts.
This will allow the default client layout list to be manipulated by
modules without the risk of overwriting each other.

The commit also add a new `--{{{ Tag --}}}` section to `rc.lua`. It will
be expanded once the tag rules get merged.
2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 04c757322c client: Turn `rc.lua` logic into a new `request::border` signal.
The default `rc.lua` was using the focus/unfocus signals to set
the border color along with `awful.rules`. This logic block was
no longer aligned with the rest of `rc.lua` since it was
the only place where `beautiful` variables where only used by
`rc.lua`.

On top of this, the new request handler also has extra contexts
for the urgent and floating/maximixed use cases. So it can be used
by themes to implement much smarter borders than just focus based
ones. They were previously limited by the fact most of the
(un-monkey-patchable) logic was in `rc.lua`.

Note that this commit also shuffle the awful.rules order between
the titlebar and the border and changes the tests accordignly.
After some consideration, I came to the conclusion the previous
behavior was bogus and the fact that the placement tests required
to know about the titlebar height is simply a proof of that. The
change was required in this commit because since the border is no
longer in the default rules, a new buggy edge case surfaced.
2020-01-11 15:43:11 -08:00
Emmanuel Lepage Vallee 067bcaca60 client: Rename the `manage` and `unmanage` signals.
They currently fit the general concept of a `request::` in the sense
that they are not property related and have "request handlers".

The commit also add deprecation for signals.

The reason for this fits within the larger standardization project.
Non-namespaced signals will eventually be renamed. This has started
a long time ago.

What is old is new again. Once upon a time, there was a `startup`
parameter to the `manage` signal. It is now back in the form of
a context.

Finally, this commit removes the `manage` section of `rc.lua`. It no
longer did anything worthy of being in the config. Each of its
important parts have been moved out over the years and the last
remaining bit is always required anyway. The code has been moved
to `client.lua`.
2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee 1434ea4c8b rc.lua: Get rid of the focus related imperative logic. 2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee 5713a19602 rc.lua: Move the taglist and tasklist button to the request:: section.
While this is a bit more memory intensive because it created the objects
per screen, it is more self contained. If the objective is to have well
defined sections that can be cut/pasted into new files, this change is
a net win.
2019-12-05 22:50:02 -05:00
Emmanuel Lepage Vallee ba1d5bf712 rc.lua: Stop hardcoding the client keys.
Just like the previous commit for the client buttons, this allows
modules to manipulate the keys independently of `rc.lua`.
2019-12-05 22:50:02 -05:00
Emmanuel Lepage Vallee 767a8e4f6d rc.lua: Do not hardcode the default client buttons.
This commit moves the previously hardcoded client button list
to the `awful.client` default button set. This will allow modules
to add their own buttons.

In later commit, those default buttons will also be added dynamically
to existing clients.
2019-12-05 22:50:02 -05:00
Emmanuel Lepage Vallee 1921d54528 rc.lua: Remove the numkey loop and use the awful.key keygroup.
The result is the same. One less imperative construct in `rc.lua`.
2019-12-05 22:48:56 -05:00
Emmanuel Lepage Vallee 3b5db8a9be rc.lua: Add root keys and buttons instead of setting the list.
As visible in various modules and even built-in components like
`awful.keygrabber`, it was previously necessary to work around the
fact that keybindings could not be added later without using some
low level API hacks.

From now on, `rc.lua` will be a good citizen and use the same APIs as
the module to manage keybindings.
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee f4a0e1fc39 rc.lua: Use `.widget =` instead of `:setup()`.
More work on the property vs. r/w methods standardization.
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 48ac59c0b6 rc.lua: Use the new keys API for the global keys. 2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 965d7c1b47 rc.lua: Use the new API to set the client keys 2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 4617365ee2 rc.lua: Use the new client API for the titlebar buttons. 2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 5f829171c4 rc.lua: Use the new API for the client buttons 2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 951b774a70 rc.lua: Use the new API for root.buttons 2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 8eda69adbe rc.lua: Use the modern layoutbox constructor 2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 56b242906d rc.lua: Use the buttons property instead of method for the tag/tasklist
Begin to bring consistency to these ancient components.
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallée 6dd8daa2ce
doc: Add bacj an accidently removed section. (#2885)
This was probably due to copy pasting from the preprocessed file
back to the raw file.

Fix #2882
2019-10-01 12:49:28 -04:00
Emmanuel Lepage Vallee b9d19988b9 rc.lua: Replace the error handling code with request::display_error.
It is easier to understand, shorter and more modular.
2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee c97c17600e rc.lua: Use the new screen requests instead of connect_for_each_screen
This will allow themes to better define their capabilities instead
of having to rely on the `rc.lua` `set_wallpaper` black box function.
2019-04-15 15:26:50 -04:00
Emmanuel Lepage Vallee 1b567cc06a notification: Rename text to message
There is many "text" and the default text is the title, not the body.
2019-02-16 15:26:38 -05:00
Emmanuel Lepage Vallee 9df77e5c76 naughty: Move the notification object into its own file.
Mostly for the documentation, but also as the new base upon which
to build the modular notification GUI.
2019-02-16 15:25:10 -05:00
Sorky bf62695f76 awful.menu: Move code from rc.lua to awful.menu
Fixes: #2524
2019-01-26 12:19:05 -05:00
Daniel Hahler 81a0a8cc48 awesomerc.lua: fix sloppy focus: do not raise
Fixes https://github.com/awesomeWM/awesome/issues/2594.
2019-01-19 09:48:01 +01:00
Sorky fec7aaa569 Unify the myawesomemenu style 2019-01-13 23:52:21 -05:00
Sorky cf5b0b51ef Update awesomerc.lua
Alternative fix for hotkey_popup via awful menu showing on wrong screen
2019-01-13 23:50:58 -05:00
ArenaL5 5268a89262
Add files via upload
Sorting list of clients and adding comment to Tor Browser's entry, [as requested.](https://github.com/awesomeWM/awesome/pull/2505)
2018-12-27 15:53:46 +00:00
ArenaL5 4c45d292dd
Making Tor Browser a floating window by default.
Responding to issue #2504 at awesomeWM/awesome
2018-12-23 17:39:12 +00:00
legion151 f1541a87b8 Update awesomerc.lua (#2451)
* Update awesomerc.lua
2018-12-17 09:40:04 -05:00
Uli Schlachter 45430daf7f rc.lua: Move Motif hints example to generated docs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-26 19:26:19 +02:00
Uli Schlachter 9d41488e43 awesomerc: Add comment mentioning c.requests_no_titlebar
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-22 14:29:44 +02:00
Emmanuel Lepage Vallee e0d1b404c5 rc.lua: Use request::activate instead of client.focus.
For a long time, it was deemed overkill and made rc.lua less readable
without the documentation.

However it is now clear that it's handling of unfocusable clients and
general bypassing of both `awful.client.focus.filter` and
`awful.ewmh.activate` filters causes bugs. Fixing them individually
in each instance of `rc.lua` `client.focus = c` would add so much code
that all the clarity provided by not using request::activate would be
burried in boilerplate code.

Fix #2328
2018-07-29 18:22:48 -04:00
Piotr Śliwka dc8229fd5a Default config: Unify mouse dragging behavior (#2278)
* Default config: Unify mouse dragging behavior

When moving or resizing a client by dragging its titlebar with mouse,
the client is automatically focused and raised. However, this behavior
is not replicated by tne other dragging method, i.e. grabbing it with
mouse while pressing the modkey. Sometimes, this causes a client to
disappear below another one while moving.

This commit unifies handling of dragging clients with mouse, by ensuring
that the client is focused and raised, whichever dragging method is
used. The fix applies both to moving and resizing clients.

Signed-off-by: Piotr Śliwka <contact@psliwka.info>

* Default config: Fix clientbuttons style

This commit unifies code style of click handling functions defined in
`clientbuttons` table, to match the style introduced in a228696.

Signed-off-by: Piotr Śliwka <contact@psliwka.info>
2018-06-10 01:35:08 +02:00
Uli Schlachter 3fe913f17a Default config: Align up a series of conditions (#2215)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-03-12 22:53:44 -04:00
Emmanuel Lepage Vallee b59495e1e7 tag/tasklist: Update rc.lua
And the tests to avoid some deprecation warnings
2017-12-02 16:33:06 -05:00
Daniel Hahler 69d06f7e3a default config: improve floating windows (#2023)
* default config: floating windows: fix pinentry-gtk-2

We have class "pinentry" there already, but it seems to have changed to
"Pinentry"?!  This uses "instance" instead, which hopefully works in the
old case also.

pinentry 1.0.0-1, gnupg 2.1.23-1

Also adds Blueman-manager and ConfigManager.
2017-08-28 10:55:56 +02:00
Uli Schlachter 202be62157 Automatically make LuaRocks modules available in awesome (#1999)
Running eval $(luarocks path --bin) before running awesome is not all
that easy. It's a lot easier to do the equivalent for this in rc.lua.
Plus, if LuaRocks is not installed, this will silently do nothing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 23:32:04 +02:00
Yauhen Kirylau c5e830cd60 fix(awful: hotkeys_popup: keys): require all modules in init.lua 2017-06-12 20:39:46 -04:00
ReVMatthias 9016a9296f Fix comment typo in default config file (#1796)
[ci skip]
2017-05-26 15:35:39 +02:00
Kevin Zander 6cb2e0fa82 Fix some deprecated calls in code and docs
Add missing newline in test runner
2017-03-30 21:26:50 -05:00
Kevin Zander c3461b535c gears: Move awful.util.table to gears.table (#1641)
* Move table functions out of awful.util into new gears.table

* travis: Use v9999 prefix for full requests

Make sure no newly deprecated functions are used

* Move all `awful.util.table.*` calls to `gears.table.*` calls
Move table test functions from awful/util_spec to new gears/table_spec
Change awful.util.subsets call to gears.math.subsets in awful/key.lua
2017-03-08 15:18:33 -05:00
Daniel Hahler f3f6a69dda config: add bindings to (un)maximize horizontally/vertically 2017-02-15 23:35:04 +01:00
Yauhen Kirylau c1cd968803 import vim hotkeys from user config, not hotkeys_popup module (#1432) 2017-02-07 13:50:52 +01:00
VincentWo 6a91dce425 Fix typo in awesomerc.lua (#1325) 2016-12-29 04:01:21 +01:00
Uli Schlachter 329a302164 Remove the executable bit from ewmh.c and awesomerc.lua
These files do not need to be executable and the commits which made
these executable apparently only did so accidentally (Commits
37684abe33 and bfc6065ad9).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-14 11:44:59 +01:00
Daniel Hahler 71259748d2 Minor doc and code style fixes
Closes https://github.com/awesomeWM/awesome/pull/1215.
2016-11-21 22:38:40 +01:00
Yauhen Kirylau 70f9999a06 fix(rc.lua): don't pass arguments to awesome.quit from menu
Closes #1197
2016-10-29 21:14:52 +02:00