We were looking for programs called cat, ln, grep and lua, but didn't ever use
the result of any of these searches. So let's just not search at all.
Signed-off-by: Uli Schlachter <psychon@znc.in>
maximized() used to align the image with (0,0) so that it is shifted to the right or bottom. Most wallpapers are designed from the center, so this behavior is not desired usually. With this commit the wallpaper is centered when no offset is set. To get the old behavior use {x=0, y=0} for the offset parameter.
Use lua's *integer instead of *number functions, because we are dealing with
integers. That is, "numbers which do not have a fractional part".
Also some minor fixup for some comments.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This function was accidentally setting the global variable "icontypes". Fix this
by adding the needed "local" and also localize some more variables for
consistency.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When we get an event due to a previous GrabButtons call, we have to continue
normal event processing again, because the server froze the input device for us.
Without this, everything appears to freeze.
Signed-off-by: Uli Schlachter <psychon@znc.in>
`client.property.persist` can be used to make properties persistent
across restarts. This works by backing them up via X properties (using
the `awful.client.property.` prefix).
`client.property.persist(c, "floating", "boolean")` is used to make the
floating property persistent by default.
Based on a patch from Uli, source: https://gist.github.com/psychon/10320743
doc, only set current prop in 'persist'
Fix xprop/prop mixup in 'persist'
Only call set for non-nil values
This new awful module reacts to shapes that a client sets on itself and sets the
shape of awesome's frame window to match. This way, xeyes really gets
transparent parts again.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This means we have one less file which gets recompiled every time the result
from "git describe" changes.
Signed-off-by: Uli Schlachter <psychon@znc.in>
From the Desktop Notification Specification:
'The "app_icon" parameter and "image-path" hint should be either an URI (file://
is the only URI schema supported right now) or [...]'
https://developer.gnome.org/notification-spec/#icons-and-images-formats
Signed-off-by: Uli Schlachter <psychon@znc.in>
Setting a tag's screen to what it already is shouldn't have any bad effects.
However, this code messed up the tag order and selection status.
Fix this by returning early if the tag already has the right screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since commit 9c69e857ed, awful.tag.setscreen() unsets a tag's index to make
sure things end up in a sane order on the new screen. Thus, the call to
setscreen() removed the "index" property that tag.move just set.
Fix this by setting the index after the screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
It doesn't make sense for surface.load_uncached() to load a file without
inserting into the cache. The next "cached" load will have to load it again.
So move cache insertion into surface.load_uncached() and the only thing that
surface.load() does differently is checking if we have a suitable cache entry
before calling load_uncached().
So load_uncached() does the cache insertion and load() reads from the cache.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When an imagebox was drawn with width or height zero, it tried to calculate the
needed scale factor for making the image fit. Sadly, this would be a division by
zero aka infinite in this case.
Fix this by just not drawing anything if there is no space available.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit c1cb7883b5.
The cairo surface used for uploading the wallpaper doesn't use a temporary
connection but is on our main connection since commit 5024843e9. Thus, the above
commit broke all of our cairo drawing instead of just making cairo not touch our
temporary connection.
The screen_output_t* that is passed to screen_output_wipe() points into the
middle of the output array table and is a pointer that we never allocated.
Instead, what we want to free here is the name of the output.
Thanks to luzie for reporting this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since commit 5b4666432f, we use set_text() instead of set_markup()
on the tooltip's textbox. This means it is no longer possible to use pango
markup in the tooltip which was not intended.
Fix this (properly) by introducing a :set_markup() function on tooltips (and use
it in the timer function to restore the old behavior).
Signed-off-by: Uli Schlachter <psychon@znc.in>
This inlines the set_defaults() function into its only caller and makes us less
stupid with the font property.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Every .c file has to include the corresponding .h file first to make sure the
headers are self-contained. Additionally, this moves some unneeded includes
around.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The only caller for drawin_unref_simplified() is in ARRAY_FUNCS() and here it is
only used in the implementation of drawin_array_wipe(). However, this function
is unused and thus we don't need drawin_unref_simplified() either.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the screen objects use our existing infrastructure for implementing
classes and objects with lua instead of hand-rolling an own version.
This results in some small API change: Screen objects no longer have an
add_signal() function and instead this function exists on the parent screen
class.
Signed-off-by: Uli Schlachter <psychon@znc.in>