Pressing CTRL+DELETE removes the visible history entry, if any, then moves to the next history entry (like pressing DOWN would do).
If the last history entry is removed the previous one is shown in the prompt (like pressing UP would do).
CTRL+DELETE works on history entries only: i.e. it has no effect on a command entered but not executed yet.
To implement above behaviour I added saving history table to file on Escape key press.
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of having the C code mess with which tags are selected, we now emit a
signal on the tag that says that something requested it to be selected. Lua can
then handle this by only switching tags on the correct monitor and by updating
the focus history correctly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Ever since commit 6b2e4352b (from 2010!), awesome.spawn() doesn't have a screen
argument anymore and the extra argument from util.spawn was just ignored. Fix
the code and the luadoc for these functions.
Thanks to blueyed for noticing this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit 20afb26080.
The commit caused endless loops with tracebacks like this (shortened):
lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
[C]: in function 'geometry'
lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
[C]: in function 'geometry'
lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
[C]: in function 'geometry'
When a client's geometry changes (and I consider the border width to be part of
the geometry here) and that client is one of fullscreen or
maximized_{horizontally,vertically}, make sure that the geometry as specified by
the state is still obeyed.
This also (accidentally) fixes things when a client gets moved to another
screen!
Signed-off-by: Uli Schlachter <psychon@znc.in>
Due to a copy&paste error, maximized_vertical and maximized_horizontal were
handled the same. Of course, vertical and horizontal aren't the same direction.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When we receive a _NET_ACTIVE_WINDOW request on the root window, we used to just
focus and raise the window. This didn't do much for clients which are on
non-selected tags.
Thus, this commit makes awesome emit request::activate on the client instead.
This is used in awful.ewmh to implement the old behavior again, but with
additionally marking the client as urgent if it isn't visible.
People who don't like this behavior can use client.disconnect_signal to disable
this behavior again. To make this really possible, awful.ewmh becomes a
"non-nil" module.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The default value for the second argument to :find() is 1, so nothing is changed
here. The third arguments disables pattern matching and instead gets us literal
interpretation of strings. This means that pattern characters like e.g. [, ] and
. don't get interpreted.
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
When an area is split in two, for example horizontally, one of the windows
should have height math.floor(previous height / 2) and the other
math.ceil(previous height / 2), to be certain that no gaps are left between the
windows.
For instance, if the first window has height h and the second window has height
math.floor(h / 2), the height of the third window should be math.ceil(h / 2)
instead of the same as for the second window.
So to compute the size of window n + 1 it’s necessary to remember the size of
window n - 1 as well as that of window n.
Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This gets rid of the unused first argument and adds a new second argument that
can influence individual items.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The documentation says that screen, the last argument to viewmore(), is an
optional argument. However, the implementation only treated it as an optional
argument in one place.
Fix this by always setting the screen variable itself to a screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Label of menu entries will be escaped automatically. Doing it manually
in menu:clients() will escape it it twice.
Patch removes the util.escape() call in menu:clients()
Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The activated property was added to tag objects between awesome 3.4 and 3.5.
This is used in the C code to keep tags alive even when nothing else refers to
it and includes a tag e.g. in some root window properties.
Thus, to get rid of a tag and to make the C code drop its reference to it, we
have to set activated to false in this function.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In case loading the theme failed and we don't have fg_normal or bg_normal, add
default values for these properties. All the other colors are only used if they
are defined, but these two always need to be defined.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When awesome restarts because a new screen was added or removed, clients can end
up being on a different screen than before the restart. However, the tags will
be carried across the restart. This means that a client could end up being
tagged with a tag from another screen. This results in weird behavior of tag
switches and confuses users.
To work around this, remove the client from any tags that are on a different
screen during startup. If the client ends up without any tags, it will then be
tagged with the currently selected tags.
Signed-off-by: Uli Schlachter <psychon@znc.in>
I am looking forward to the bug reports requesting awful.client.floating.set(c,
true) to also automatically un-fullscreen the client...
Signed-off-by: Uli Schlachter <psychon@znc.in>
Setting mouse.screen moves the pointer to the top left corner of that screen.
However, the very next line would then move the pointer elsewhere again. Thus,
the first one wasn't needed at all.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Well, whoops. There is no .bg property on wiboxes for quite a while already, it
is now a :set_bg member function.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since commit d8a93dafa3, tags have an "index" property which decides about
the order in which they are displayed in the taglist. If a tag doesn't have this
property set, the next call to awful.tag.gettags() will fix this and "invent" an
index for this new tag.
However, if multiple tags didn't have an "index" property, gettags() would
assign all of them the same index. The following call to table.sort() would then
do random magic to these tags (remember: table.sort() is not a stable sorting
algorithm, so it is allowed to randomly swap around entries which have the same
sorting key).
Fix this by making sure that the new "index" properties are different from each
other.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Thanks to the previous commit, spawn_with_shell() can now easily fix lots of
problems that we previously had with escaping the argument to the shell.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Having this in lua means that size hints are only applied after the client got
resized. The bad side effect of this is some flickering if awesome is being
slow. And apparently, it is slow for way too many people...
Signed-off-by: Uli Schlachter <psychon@znc.in>
If theme.tasklist_plain_task_name is set to true, the various client
state marks will not be prepended to the task name.
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The arguments are optional, making it possible to use a custom function
to create the {tag,task}list layout. The base_widget arguments can be
used to override the base layout of the {tag,task}list widget.
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Centers the middle widget in the align layout in the remaining space
left by the widgets on the sides.
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
No callers expect a nil result from this function. In fact, this broke
awful.tooltip because it tried to get the workarea of screen nil.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The (x,y) position of a client is outside of the border, but the width/height
does not include the border (so the real width is width+2*border).
This means that we have to also subtract 2*border to make sure that the client
including its border really is inside of the expected area.
Signed-off-by: Uli Schlachter <psychon@znc.in>
No clue why this code is here, but it only allowed floating clients to be
resized beyond the edge of their screen. Clients on a floating layout were
forced to stay on their screen. Quite an unintuitive behavior and now this
behavior is gone.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Sticky clients showed up in the tasklist without being minimized when using the minimizedcurrenttags filter.
This patch fixes that.
Signed-off-by: Björn Åström <bjoast@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The modules awful.menu and awful.util were placing variables in the global
environment which is a bad thing. Fix this by adding the right module name
prefixes to these variables.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The current code relied on some widget to cause a redraw when the focus changes.
Obviously, this assumption is wrong.
Instead, the code now uses the proper "focus" and "unfocus" signals for setting
titlebar colors, but it also needs to set these colors when a new titlebar is
created (v1 of this patch forgot that). For this reason, update_colors has to be
saved for when a titlebar's colors are updated.
This commit also reverts the ugly redraw_hook hack from commit a1918b8306.
Signed-off-by: Uli Schlachter <psychon@znc.in>