For example, the rightmost pixel of a border-less graph wasn't draw and all
drawing was shifted one pixel to the left.
Signed-off-by: Uli Schlachter <psychon@znc.in>
behavior before: draw fg color everywhere and draw each value inverted as bg color.
if not enough values available "remove" the free area (draw a big rectangle with bg color over it).
behavior now: draw each value onto background as fg stroke.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Many themes have prerendered icons of different sizes stored in
subdirectories named as '<size>x<size>'. By looking in these directories
when a specific icon size is specified, we can support themes in a
rather straightforward way.
Signed-off-by: Uli Schlachter <psychon@znc.in>
For example, I have some lua code which sets the border width based on the
number of visible clients. When just a single client is visible, the border
width is 0, else it's what the theme says.
Previously, this caused visible "glitches" for fullscreen'd and maximized
clients. This patch fixes that and updates the client's geometry and
border width appropriately.
This has a slight chance of going into an endless loop if someone sets a
fullscreen'd clients border width from its property::border_width signal.
Just don't do that!
Thanks to Arvydas Sidorenko for finding this issue.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Patterns like
if condition then
return true
else
return false
end
could be simplified to
return condition
Signed-off-by: Felix <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
In commit "awful.client.setslave: Fix for not-visible clients", I copied some
code from awful.client.visible(). However, I missed that I where supposed to
change something in the code that I had copied. Whoops.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, setslave() put a client only at the end of the list of visible
clients. Obviously this means that it didn't do anything helpful if the target
client was not visible.
Fix this by iterating over all clients on the target screen instead of just the
visible ones.
Signed-off-by: Uli Schlachter <psychon@znc.in>
this makes the use of cur_menu obsolete because now every menu and submenu gets its own keygrabber. there is no need anymore to track the latest opened menu globaly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit adds a new {bg,fg}_occupied option to the taglist. These control the
background and foreground color that unselected but occupied tags get in the
taglist. Occupied here means that at least one client is tagged with that tag.
Thanks to NougatRillettes for submitting this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The only caller of focus.history.add() should be the "focus" signal, so at that
time the unfocusable client already does have the focus. At that point, there is
no reason why this shouldn't be recorded in the focus history.
(And yes, unfocusable clients can be focused. Don't ask.)
This should hopefully fix FS#778.
Signed-off-by: Uli Schlachter <psychon@znc.in>
To avoid collision and confusion with other methods having the same name. So,
awful.client.cycle -> awful.client.iterate (renamed)
awful.util.table.cycle -> awful.util.table.iterate (renamed)
These methods were added in commit "add awful.client.cycle", and "add
awful.util.table.cycle".
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
I simply moved out the code to 'jumpto' a client from
`awful.client.urgent.jumpto` into a separate function of its own so that it can
be reused.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
changed_callback allows to execute arbitrary code any time the
command string changes.
keypressed_callback allows to intercept keypresses before
awful.prompt.run code handles them and run arbitrary code depending on
the key pressed and modificators.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Returning true from the callback to `keygrabber` is no longer necessary to
continue grabbing the keyboard.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Returning true from the callback to `keygrabber` is no longer necessary to
continue grabbing the keyboard.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This was broken since 014d191f66 (which made this kind of stuff mandatory,
because 'return false' is ignored now). Whoops.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Fix this function so that it respects the recent changes in the ewmh.lua
code. It also incorporates some additional logic to respect the
border-width.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously we were not taking into account the border-width of the
client which we ought to as otherwise the client goes of the screen by
several pixels. It's slightly more ugly when we have several screens
connected.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes awful not to overwrite the saved geometry by just storing the
two geometries in separate places.
Signed-off-by: Uli Schlachter <psychon@znc.in>
I don't see why people would not want keyboard-enabled-menu by default.
Without it, you can't even use 'Escape' to quit the menu or press 'Enter' to
execute an entry. But instead of just enabling keyboard support by default, we
remove the option of disabling keyboard support altogether, which also
simplifies the implementation a bit.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
add awful.client.cycle to iterate through clients that match a given condition
A common use case is to cycle through clients that match a given rule and take
certain action on them: raise, set or get property, etc.; see usage example in
the docs.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
add awful.util.table.cycle to iterate through elements that match given
condition
This will help writing concise code when one wants to apply a function to
(read, take some action) on a select list of elements in a table (of say,
clients and tags).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Replaced all references to image_surface_create_from_png to
awesome.load_image
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
So the utility of `awful.placement` is not merely limited to client objects,
but also to wiboxes.
[us: use appropriate naming convention; catch misplaced statement]
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Given an object's coordinates, `awful.screen.getbycoord` can be used to
determine the screen than the object is, or should be attached to.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The `screen` property on wibox (drawin) was removed in the commit - 'drawin:
Remove screen property'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Symbols (or, visual hints) used to indicate that a client is: 'ontop' or
'floating' or 'maximized_horizontal' or 'maximized_vertical', can now be
defined in the theme, or passed to awful.widget.tasklist() as the last, 'style'
argument (see docs).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Most probably, the original author chose to use 'K' first, switched to
'myclock' later, and forgot to update remaining occurrences of 'K'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before this commit, a submenu was border_width pixels lower than its parent menu
entry. Fix this by not adding the border_width to the submenu's position.
We still have to add the border_width to the parent menu's width so that the
border of the submenu entry doesn't overlap the content of its parent menu (the
borders of the two menus do overlap!).
Signed-off-by: Uli Schlachter <psychon@znc.in>
Initializing the client property "floating_geometry" on the
property::geometry signal is problematic since this is emitted before
client_set_border_width(), causing the internal client geometry to get
stored and later passed to client:geometry() which assumes it includes
titlebar and borders.
Signed-off-by: Corey Thompson <cmtptr@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
If the first argument to cycle must be > 1 or else return nil
immediately.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>