When windows are set as "above", they will basically behave as "ontop"
(under normal circumstances) and therefore an indicator is useful to get
displayed in that case, too.
Closes https://github.com/awesomeWM/awesome/pull/325.
color_strip_alpha was used to insert colors into Pango markup, but it
did not correctly check for valid Pango colors. ensure_pango_color
checks if the color is valid in Pango, and returns a placeholder if it
is not.
In ed09d8e this was changed accidentally, while only `request::focus`
should have been changed:
- c:emit_signal('request::activate',"rules")
+ c:emit_signal('request::activate', "rules", false)
Currently `taglist_update` gets triggered often, because it listens to
a lot of signals.
This patch makes it only call the last one through `timer.delayed_call`.
Currently `tasklist_update` gets triggered often, because it listens to
a lot of signals.
This patch makes it only call the last one through `timer.delayed_call`.
In #152 I've changed the autofocus handler to emit the request::activate
signal, instead of setting client.focus only.
This is wrong IMHO, and can be annoying:
If you have two floating clients above a tiled / maximized one, and
close one of the floating ones, with the tiled one being the one
selected by autofocus, it will be raised above the other floating
client.
This is changed now to use the new `request::focus` signal instead.
This basically reverts 20cdb5d (#152), but allows for customizing this
behavior, by overriding the default `request::focus` handler
(`ewmh.focus`).
It would be nice if there was a helper to check if a window's content
isn't visible at all (i.e. covered by other windows), and that could be
used then by the (new) default handler for request::focus - raising the
client only, if it's completely covered by another window.
Fixes https://github.com/awesomeWM/awesome/issues/217
This still does `client.focus = c` by default, but allows to customize
it.
This was initially suggested in #194, but by using `request::activate`
instead, which would not be the same. Therefore a new signal is being
used instead.
Helped-by: Samir Benmendil <samir.benmendil@gmail.com>
This way "that other widget" doesn't prevent the current widget from being
garbage collected.
Please note that this in all of these cases the widget under consideration does
have a strong reference to the callback function. This means that the callback
cannot be garbage collected until "this widget" itself is collected. Thanks to
this, this change is safe.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Connecting to a signal weakly has the same effect as connecting to it strongly,
but it allows the garbage collector to disconnect the signal in case nothing
else references this function.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In commit 3cbdc2a79f, the argument order for awful.layout.inc was changed
from (layouts, i, s) to (i, s, layouts), so that layouts can become an optional
parameter. However, this change (obviously) breaks user configs.
To hide this breakage, we assume the old argument order if the number i is a
table. This cannot break anything, since the operator "+" will error out on
tables anyway. :-)
Signed-off-by: Uli Schlachter <psychon@znc.in>
I doubt that this makes much of a difference since lgi surely caches things, but
this still seems nicer to me.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since commit 52ec0ebd93, layouts should return the geometries to their caller
instead of setting them directly. The caller will also fix up the geometries for
border width.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds an optional `filter` arg to awful.client.focus.history.get,
and uses `awful.client.focus.filter` from the autofocus module.
This improves the behaviour when manually setting clients as
non-focusable (#237), and is considered to be the desired behaviour in
general.
Closes https://github.com/awesomeWM/awesome/pull/242.
Sometimes is a good idea to check if notifications are suspended,
for example, for changing the icon. This function just returns the value
of suspended.
Closes https://github.com/awesomeWM/awesome/pull/222.
Define @classmod wibox.widget.keyboardlayout, otherwise ldoc fails to
find the base class:
> module(...) name deduction failed: base .../src/build/docs/capi/ .../src/build/lib/awful/widget/keyboardlayout.lua
Fixes https://github.com/awesomeWM/awesome/pull/149#issuecomment-94014438
Widget shows current keyboard layout short name (usually two letters,
for example 'us', 'de'). Indicator will be hidden if only one layout
configured. Layout can be switched either by clicking on widget or by
function keyboardlayout.next_layout()
When moving a fullscreen/maximized client to a smaller screen or with
different Y offset etc, its offset was not handled properly.
This moves it first into the new area, and then makes sure that its not
off-screen. The latter should not happen, because the width/height is
adjusted before.
Enables users to replace text and reset expiration timeouts of existing
notifications, which is necessary for OSD creation by means of naughty.
Signed-off-by: taptap <alexey.e.egorov@gmail.com>
This moves all of the documentation into a separate folder, which keeps
everything in one place and avoids unnecessary clutter.
This will pay off when proper guides are written for various aspects of
using awesome or contributing to it.
This also updates the building system, so that the docs are properly
generated with new directories.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Reorganise the config table, so that we have a single table and the
fields are nested.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
This is basically an initial stab for some modules and some
experimenting with the `@classmod` directive.
For most of the docs only basic transforming was done.
At the moment the tooltip module looks the best.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
This converts the old documentation style into the new one to use
markdown instead of HTML in bigger doc blocks. Also, we can use block
comments, which means that writting documentation (and indenting code
blocks) easier.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
After a client gets unmanaged, the newly focused client might not be
visible / raised above other windows.
Using the `request::activate` signal makes the autofocus handler more
flexible, and will raise the focused client by default.
This avoids awful.autofocus to kick in, focusing some other client in
between (where a focused signal would get emitted for, although the
intermediate client was never meant to have focus).
This is the traceback:
stack traceback:
/home/user/.config/awesome/cyclefocus/init.lua:199: in function 'add'
/home/user/.config/awesome/cyclefocus/init.lua:309: in function </home/user/.config/awesome/cyclefocus/init.lua:304>
[C]: ?
/usr/local/share/awesome/lib/awful/autofocus.lua:22: in function 'check_focus'
/usr/local/share/awesome/lib/awful/autofocus.lua:31: in function </usr/local/share/awesome/lib/awful/autofocus.lua:28>
[C]: ?
/usr/local/share/awesome/lib/awful/tag.lua:517: in function 'viewonly'
/usr/local/share/awesome/lib/awful/client.lua:69: in function 'jumpto'
/home/user/.config/awesome/rc.lua:1188: in function 'client_run_or_raise'
/home/user/.config/awesome/rc.lua:1217: in function 'run_or_raise'
/home/user/.config/awesome/rc.lua:1243: in function 'press'
/usr/local/share/awesome/lib/awful/key.lua:42: in function </usr/local/share/awesome/lib/awful/key.lua:42>
Ref: https://github.com/awesomeWM/awesome/pull/19
This supersedes https://github.com/awesomeWM/awesome/pull/107.
If a client's width/height is larger than the screen's geometry, align
it at the screen's x/y offset.
Test case with gvim, from a maximized terminal on a floating tag:
% gvim -u NONE -N --cmd "set lines=$((LINES + 5))"
Without this patch the top of the window is off-screen, but the bottom
should be. Fixing it using a number of lines that fit the screen should
display the window completely.
The 'request::activate' signal should be sent and handled immediately,
and not delayed. It was too much of a hack to work around the client
not being visible.
Instead, the "is visible" constraint on `capi.client.focus` will be
removed.
This reverts commit 6963ede3dc.
This gets rid of awful.util.unittest and instead creates an automatic test for
it under spec/awful/util_spec.lua. In the process, it also fixes the test to
actually test the right thing and I took the liberty to add some more tests.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fix two things:
(1) Clients asking to be urgent while focussed, this have been reported
a few time for urxvt and I usually link a patch that fix this. This may
not be considered a bug by some, but I think it is.
(2) Add the ability to stop noisy clients from setting the urgent state
themselves.
This made it easier to figure out where a file causing an error was
coming from, but I could imagine that this could become too noisy, and
that there is/should probably be a more streamlined way to enable more
verbose logging / error output.
When loading persistent properties for a client, the loop value wasn't used,
but the original/requested property. This would only get triggered when
using more than one persistent client property (the default is one,
"floating").
That commit made awful.tag use timer.delayed_call() to call withcurrent() during
the manage signal. The idea was "if nothing else assigns any tags until the end,
apply some default ones".
However, the C core refuses to set the input focus to an unviewable client and
thus this means that setting the input focus during manage failed. So, instead
of using the delayed_call(), just call withcurrent() directly, like we did
before.
However, some part of that commit is still left: Awful.rules no longer
disconnects the withcurrent() callback from the "manage" signal. This was
originally added in commit 5e7ddd1efa, because it clients flickered otherwise if
they were moved to some unselected tag during "manage". This happened because
the C code unbanned the client when it got assigned the input focus and only
later did some other code move it to some unselected tag.
However, this flickering will no longer occur, because commit 3dbf89c990 added
lazy focus setting. Thanks to this, setting the focus no longer unbans a client
as a side-effect. Thus, if you focus a client and then remove it from all
selected tags, nothing will be visible on-screen.
To make a long story short: This commit reverts the part of commit 90fde1393f
which caused side effects. The part that wasn't necessary any more is left in.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This way this function runs after everything else did its job. The client will
only get assigned a tag after everything else had a chance to do so.
Thanks to this, awful.rules no longer has to disconnect the call to withcurrent.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Let's just quote a mail I received from Rastislav Barlik:
I tried to make use of awful.mouse.finder but I found out that it's not working
as supporting functions rounded_corners were removed with commit
03e0ee53d2.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Apparently I still had an old naughty.lua laying around in build/lib and thus
this new code wasn't actually tested. It's a miracle that it works so well
besides this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The new notification action code tried to emit dbus signals even if awesome was
build without notification support. Fix this by adding the necessary "if".
(This also removes an unused return value which wasn't marked as "local" and
thus triggered my "complain if something messes with the global env"-script)
Signed-off-by: Uli Schlachter <psychon@znc.in>
The whole point of this pcall() is that we do not have unprotected Lua errors,
because those kill awesome. So instead of assert()ing, let's just print a
message.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The desktop notification specification says that a notification can have
different actions. These actions allow the user to interact with the client
application and should be displayed by the notification server.
* Add function to emit a DBus signal
* Notifications : emit NotificationClosed signal when closing notification
* Notifications: use constant for notification closed reasons
* notifications: Implement notifications actions
This is just a basic implementation to display the actions send with the
notifications. The actions should be displayed differently
* Notifications: add support for default action
* Move the "index" setting burden to individual functions
instead of gettags().
* Add some properties earlier so the signal hooks will be called
with valid data.