Commit Graph

1353 Commits

Author SHA1 Message Date
Thomas Jost cd5180f60f gears.wallpaper: Add wallpaper.fit
Signed-off-by: Thomas Jost <schnouki@schnouki.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-10 17:38:19 +01:00
Alexander Yakushev b0a056f50a menubar: Treat KP_Enter as pressing Enter (FS#1072)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-10 17:01:41 +01:00
Ignas Anikevicius (gns_ank) 9631ada0d2 Menubar utils fix the wm_name matching once more.
The previous attempt at making the utils.wm_name variable useful for
accessing some entries was silly. This is because a typical ShowOnlyIn
string would look as: 'Unity;Gnome;KDE;' and the matching currently is
done for the whole string, where as we need to match only a part of it.

This small (hackish) commit fixes that, or do we wanna parse this line
of a .desktop file properly?

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-10 16:45:05 +01:00
Uli Schlachter 6608b0aa1c wibox.layout.align: Give middle widget full height
I amended some change to commit 8560de597c which made the align layout's
middle widget really centered instead of being way too wide. However, this also
shrunk the widget on the "other" axis, too. This commit fixes that up.

A big "sorry" to Lukáš for breaking his patch.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-08 22:06:25 +01:00
uzsolt 23fe017bd4 fix locale problem (decimal separator isn't dot but comma)
If user changes locale with os.setlocale to a "dirty"
locale (which use comma as decimal separator (not dot), e.g.
hu_HU) `tonumber` will produce "0,6" instead of "0.6"
which causes bad comparision.

Signed-off-by: uzsolt <udvzsolt@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-06 12:08:02 +01:00
Lukáš Hrázký 02ea5f9b23 awful.widget.common: remove unsed function
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký dd29a41c4e tasklist: add a theme option for a plain task name
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>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký 66e52229f7 wibox.layout: add a new constraint layout
This layout can be used to constraint the size of the widget it holds.
Depending on the strategy passed to it, the widget will have a minimum,
maximum or exact size that was set through this layout.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký 4463f89b15 {tag,task}list: add update_function and base_widget constructor arguments
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>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký 8560de597c wibox.layout.align: make the middle widget really centered
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>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký e38651bafb wibox.layout.align: don't take up all space in the other axis
This adds a fit function to the align layout that makes sure that
the layout will not take up all the available space in the other
axis than it's direction. Eg. for horizontal align layout, it will
only take up the maximum of its widgets' heights in the vertical axis.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 21:05:45 +01:00
Lukáš Hrázký f6d9443c5d wibox.layout.flex: fix the fit function
The fit function of the flex layout is different from the fixed.fit one.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 21:04:48 +01:00
Lukáš Hrázký 9d333113dd wibox.layout: remove unnecessary wrapping of draw and fit functions
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:59:42 +01:00
Uli Schlachter 987c2b9b30 awful.screen.getbycoord(): Always return a valid screen
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>
2013-01-05 20:56:20 +01:00
Uli Schlachter 1fa23fef81 awful.tooltip: Don't place tooltips when text changes
The tooltip is now only placed when it is made visible, not while it is
invisible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:54:38 +01:00
Uli Schlachter 3a25e78224 wibox.layout.rotate: Add some good constructor arguments
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:52:00 +01:00
Uli Schlachter ae69b2db03 wibox.layout.base: Use math.min/max
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:50:17 +01:00
Uli Schlachter 7d1a963352 awful.placement.no_offscreen: Fix border handling (FS#1065)
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>
2012-12-16 18:11:57 +01:00
Uli Schlachter fdfb7c5bb5 naughty: Fix docs a little
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-16 11:40:06 +01:00
Daniel 29b56fd051 Expose naughty.notifications again
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-16 11:36:39 +01:00
Uli Schlachter 823cd10be7 awful.widget.button: Fix name clash (FS#1064)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-15 10:08:23 +01:00
Uli Schlachter 487fb3f945 mouse.resize: Allow resize across screens (FS#1059)
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>
2012-12-14 19:38:30 +01:00
Björn Åström 6db7bdfcb9 Fix minimizedcurrenttags filter with sticky clients
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>
2012-12-13 18:01:40 +01:00
Uli Schlachter f6b43a1f1d Fix wibox.layout.rotate
This got broken in commit 90f7f55348.

Thanks to crazedpsyc for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-05 17:35:08 +01:00
Arvydas Sidorenko f57bd595dc Improved .desktop parsing (FS#1057)
When parsing .desktop, we care only about [Desktop Entry] group.
Everything else is ignored.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-01 16:25:59 +01:00
Arvydas Sidorenko 56170db631 Renamed string.gfind to string.gmatch
Lua 5.1: string.gfind renamed to string.gmatch
Lua 5.2: string.gfind removed

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-01 14:19:10 +01:00
Uli Schlachter 4c094a279d Fix various instances of global variables
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>
2012-11-30 22:46:55 +01:00
Uli Schlachter e24c09e828 Update titlebar color when focus changes (FS#1056)
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>
2012-11-29 16:52:19 +01:00
Uli Schlachter c50d62749b Fix errors from missing themes
This patch gets rid of lots of errors that happen when beautiful.init() is not
called in the config. Most of them were missing default values.

Thanks to panthar for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-27 22:55:42 +01:00
Uli Schlachter b7eb233aee imagebox: Use a different entry for saving the image
In 3.4, an imagebox' image is set via "box.image = foo". Since widgets are just
ordinary tables in 3.5, this will actually mess with the imagebox' image without
setting it correctly.

Fix this by renaming the entry to "_image".

A similar patch was applied to the textbox widget ages ago.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-27 17:24:54 +01:00
Uli Schlachter fbecd40c62 awful.menu.clients: Fix client icons
This was passing c.icon as the icon of a menu entry. However, this is just a
light userdata which has to be turned into an lgi cairo surface object. Luckily,
surface.load() does that for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-25 21:18:23 +01:00
Uli Schlachter fd1e751919 awful.menu: Handle themes without border_width
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-25 19:17:27 +01:00
Uli Schlachter fa6d996c41 widgets: Add some constructor arguments
This saves space when constructing widgets, because some common cases can now be
done in a single line of code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-25 19:16:31 +01:00
Gregor Best 2badbed440 Menubar: silence find warnings
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-24 18:15:35 +01:00
Gregor Best d3a05e4822 Menubar: also look in /usr/local/share/applications
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-24 18:15:34 +01:00
Gregor Best 6b4d839fef Menubar: don't die if there's no item selected
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-24 18:15:34 +01:00
Ignas Anikevicius (gns_ank) 633e8f2f06 Menubar: Expose the wm_name attribute
This commit makes it possible to change the wm_name attribute, which
means that programs can be shown/hidden according to the wishes of the
user.

Possible usecase: A user is using Gnome and Awesome together, but sinc
wm_name by default is awesome, all the apps shipped with GNOME DE are
hidden by default. Changing wm_name attribute in this case would solve
the issue.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-22 14:12:35 +01:00
Uli Schlachter 38c41a2f7a awful.client.toggletag: Use tag.getscreen()
Thanks to muni for reporting this bug.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 18:56:18 +01:00
Uli Schlachter d13b825c36 Fix warnings from LDoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 15:35:32 +01:00
Uli Schlachter 96e03cb45d Lots of random documentation fixes
This is mostly about mis-named parameters, but also other small things.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 14:09:10 +01:00
Uli Schlachter 5ea174782d Also make gears.object more object-y
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 13:40:37 +01:00
Uli Schlachter 90f7f55348 wibox: Make the functions a little more object-y
This replaces lots of function foo.bar(this, ...) with function foo:bar(...).
There should be no other changes in this commit.

The point is to make it easier for api documentation tools to figure out that
these are methods on objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-18 20:44:03 +01:00
Uli Schlachter ee46c9e5ae naughty: Correctly handle rowstride on icons
The notification spec allow sending icons as data with a dbus message. The
rowstride for this can be set which means there can be bytes after each row of
icon data which must be ignored.

Before this commit, naughty wasn't properly ignoring these garbage bytes which
resulted in weird notifications.

Thanks to dadrc for reporting that gmusicbrowser's notifications didn't work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-17 21:37:40 +01:00
uzsolt 6a6e49accd fix awful.util.table.join if first arg is null (#1052)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-11 22:16:57 +01:00
Josh Komoroske 8e35e1a6a9 Fixed window gaps in the "fair" tiling mode.
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-10 21:48:46 +01:00
Uli Schlachter 4711354b5d awful.tooltip: Update geometry in set_text (FS#956)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-04 21:53:38 +01:00
Uli Schlachter 14fa66c63f wibox.drawables: Fix a memleak
Drawables could never be garbage-collected, because of the "wallpaper_changed"
signal. The callback function for this signal kept a strong reference to the
drawable.

Fix this by putting all drawable's draw() methods into a weakly keyed tabled so
that the strong reference to them disappears.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-03 19:52:39 +01:00
Uli Schlachter 30860eba87 awful.icccm: Handle titlebars
Size hints should be applied to the "real" client geometry. That means the area
taken by titlebars should be ignored.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-01 13:53:23 +01:00
Uli Schlachter 77fedaeee8 Remove unused signal property::widgets
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-31 22:24:23 +01:00
Uli Schlachter 0ff4fc3aef awful.client: Convert another t.screen to awful.tag.getscreen()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-31 22:13:30 +01:00
Uli Schlachter fa86fbeb52 lib/wibox: Make signals from drawables available
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-31 22:12:30 +01:00
dodo 57746d7a62 capi.screen[scr]:tags() doesn't exist anymore
awful.tag.gettags(scr) does now the job

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-26 18:29:30 +02:00
dodo 1e4c14d306 tag.screen doesn't exist anymore
awful.tag.getscreen(tag) returns now the tag's screen index

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-26 18:28:52 +02:00
Clément Démoulins d729b71b17 Fix a bug when using in a rule the property 'tag'.
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-26 18:22:05 +02:00
Uli Schlachter a1918b8306 awful.titlebars: Implement
This commits adds the necessary lua code so that we finally can have titlebars.
As the baseline for the needed functionality, the titlebar code in awesome 3.4
and a quick poll on the mailing list were used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-23 20:37:50 +02:00
Uli Schlachter 8348d44444 Tags: Remove screen property
A tag's screen is now implemented purely in lua and it is no longer C's
business.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-23 10:05:34 +02:00
Uli Schlachter 9c9b2b52b0 awful.tag.attached_connect_signal: Simplify
Signals are emitted on individual objects and on the class for a while now. This
can be used to simplify this function a lot.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-20 22:54:20 +02:00
Uli Schlachter 2ada67b730 Added a functions for getting all tags on a screen
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-20 22:54:20 +02:00
Uli Schlachter 1e418cbe3b drawable: Add property::surface
This new property is used for fixing some missing redraws that the old code had.
Those could be seen via awful.menu. Open and close a submenu repeatedly and the
submenu will appear black.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-20 22:51:52 +02:00
Uli Schlachter 41ef107b88 Add titlebars on the C side
This commit makes it possible to add titlebars to a client. These titlebars are
drawables.

The drawin's input handling is moved to the drawable. This allows it to use the
same code for drawin and titlebar input handling, although there are lots of
differences between the two on the C side.

On the lua side, a new wibox.drawable module is created which handles all the
drawable-specific magic and which can also be used for titlebars.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:59 +02:00
Uli Schlachter f0512eeaab Introduce drawables
A drawable is something that you can draw to, just like a drawin. However, a
drawable isn't necessarily its own windows. This will later on be used to
implement titlebars where the titlebars are drawables.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:54 +02:00
Uli Schlachter 241d582c55 gears.object: Give better error messages
It helps a lot to know which signal does not exist. That should make it a lot
easier to look for the "guily" code without having to resort to the backtrace.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 16:58:54 +02:00
Abdó Roig-Maranges ed9f218669 Fixes module namespace issues in screen.lua and client.lua
The wrong module names were introduced in commits:
0e2960ebf3 and
d799ac76aa.

Once fixed, client.lua and screen.lua mutually require each other, so we must
use a trick, and load the modules inside the functions that need them.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-29 16:52:53 +02:00
Abdó Roig-Maranges 34c1c7d416 Makes awful.screen.focus keep the cursor position on screen
When changing focus to an other screen, awful.screen.focus keeps relative
position of the cursor, instead of moving to the top left corner. Does not
trigger mouse:enter and mouse:leave signals.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-27 11:26:57 +02:00
Abdó Roig-Maranges 0e2960ebf3 Functions to change client focus by direction across screens
Added functions awful.client.focus.global_bydirection and
awful.client.swap.global_bydirection, that change focus and swap clients,
crossing screen boundaries.

Also modified awful.client.movetoscreen. Now calls awful.screen.focus.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-27 11:24:51 +02:00
Abdó Roig-Maranges d799ac76aa Added function to change screen focus by direction
The function awful.screen.focus_bydirection changes the screen focus
according to physical position. The code is based on
awful.client.focus.bydirection.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-27 11:14:55 +02:00
Abdó Roig-Maranges 5701c473d4 make naughty catch appname from DBUS messages
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-16 10:44:39 +02:00
Abdó Roig-Maranges 98185eb123 Makes awful.client.restore return the restored client
If some client is restored, returns it, otherwise returns nil.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-15 16:06:17 +02:00
Alexander Yakushev c1addbbf72 menubar: Make prompt configurable
Add a parameter to configure menubar's prompt.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-12 17:34:22 +02:00
Alexander Yakushev 8150482a53 menubar: Make some parameters configurable again
After the rewrite from modules they ended up being local, but should
be available to user externally.
Also remove unnecessary local context bindings.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-12 17:34:22 +02:00
Alexander Yakushev ec66ac876b Fix debug.dump
dump_return is no longer local, so debug prefix must be provided

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-08-31 15:23:56 +02:00
Uli Schlachter 5d95559977 layout: Remove duplicate capi definition (FS#1032)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-24 21:57:10 +02:00
Sébastien Luttringer a6ae34d003 Add awful.client.setmaster
This function is the counterpart of awful.client.setslave.

Windows is moved to the first position in the stack.

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-12 13:21:07 +02:00
Anurag Priyam 0817c7f460 run_or_raise: fix for lua 5.2 upgrade
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-06 17:12:52 +02:00
Uli Schlachter aca737cdc4 awful.client: Add a missing "local"
Reported by | and his strict.lua.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-06 17:11:58 +02:00
Uli Schlachter 615aff3369 gears.wallpaper: Import
This is a lua module for managing the wallpaper.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-29 16:39:03 +02:00
Uli Schlachter ff71347016 Remove all traces of awsetbg and wallpaper setters
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-29 15:38:31 +02:00
Uli Schlachter 48c6c11d17 awful.rules: Implement callbacks for individual properties
When a property is now set to a function, the function's return value will be
used for the value of the property. The function gets the new client as its only
argument.

There is no property which accepts a function as its value and thus this change
can't break anything (yeah, famous last words...).

This should fix half of FS#1011. Panels now don't get focused by awful.rules.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-06 17:30:35 +02:00
Uli Schlachter 21d821a8dd rotate: Use the draw_widget() function
Without this, input handling is broken (draw_widget() registers each widget with
its position for input handling).

This also removes some unnecessary save()/restore() calls. Our caller (again
draw_widget()) already does that for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-06 13:09:13 +02:00
Felix Bier f571ba4140 Fix spelling in doc string
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-01 17:19:13 +02:00
Felix Bier fa36bd0a59 tag.viewidx should take a screen index
This makes tag.viewidx take a screen index rather than a screen object,
complying with its doc string. This fixes #963.

Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-01 17:18:54 +02:00
Ignas Anikevicius (gns_ank) bfedd3c136 Menubar: some more prefixes
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-01 14:47:39 +02:00
Arvydas Sidorenko 1de4134c9d Yet another lua call without prefixed module
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-06-26 11:00:47 +02:00
Uli Schlachter 4b049c310d gears.surface: Update required lgi version
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-22 23:22:58 +02:00
Arvydas Sidorenko 65de8a7ab5 Broken lgi version checking
Currently it takes `require('lgi.version')`, converts it blindly to
number and compares with another value.
I am using lgi v0.6.1 and that is not convertable to number value,
thus tonumber() returns nil and crashes Awesome.
The fix is to take major and minor numbers only ignoring the rest.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-22 23:21:14 +02:00
Felix Bier aa7d342645 Do not attempt to call global destroy
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-22 23:17:58 +02:00
Uli Schlachter 77b5dadac4 awful.client: Add a missing module table
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-19 20:37:03 +02:00
Uli Schlachter b552000bd9 More fixes for the recent module() removal
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-17 15:24:01 +02:00
Arvydas Sidorenko 1cef64a9c8 Calling naughty.notify without specifing module
From 55eb706b698c3b0c59559eff342d6ee59ec9e3f3 Mon Sep 17 00:00:00 2001
From: Arvydas Sidorenko <asido4@gmail.com>
Date: Sun, 17 Jun 2012 15:11:01 +0200
Subject: [PATCH] Calling naughty.notify without specifing module

Lua 5.2 port bug, which shows up on notify-send

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-17 15:23:52 +02:00
Uli Schlachter ce9932f17f Fix various minor errors after the lua 5.2 conversion
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 21:12:26 +02:00
Arvydas Sidorenko 650bde830c Portable way to use loadstring
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko ce19cabae3 Fixed bug with global `tags` in rc.lua
awful.wibox.tasklist was overwritting `tags` variable breaking all the
functionality which uses it.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko b18b504fdf Ported awful.layout.suit to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 4ca0298564 Ported awful.layout to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko dd8ecdce24 Ported awful.mouse to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko c3ebfd99fc Ported awful.widget to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 997de2726c Ported lib/gears to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 61ff9ce2b7 Ported awful to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko f73e0b44c0 Ported wibox.widget to lua 5.2
Tested with 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 4e67027a97 Ported wibox.layout to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 3f5eaf9c1b Ported wibox to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko a75112160f Ported menubar to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko e789cfaf66 Ported lib/gears to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 26797ab494 Ported naughty to lua 5.2
Tested on lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 0bbd9eac0a Beatiful module ported to lua 5.2
Tested on Lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 9623b8e42f Changed unpack in portable way
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 13:00:13 +02:00
Arvydas Sidorenko ecc930dbe0 Replaced deprecated math.mod to math.fmod
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 12:58:09 +02:00
Uli Schlachter f702c4ea04 Simplify the graph drawing code
Instead of having to handle the border width all the time, let's make cairo
worry about that.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-13 18:06:05 +02:00
Uli Schlachter 7a1acd4a98 awful.widget.graph: Various minor fixes
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>
2012-06-13 17:59:07 +02:00
dodo cafd28027f awful.widget.graph: don't draw bg color over fg color
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>
2012-06-13 17:24:58 +02:00
Uli Schlachter d0f3e399d7 Fix naughty notifications again
When something sends notifications which don't get mapped into some preset,
args.preset would be nil and indexing nil throws a lua error. Fix this by using
the default preset in that case.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-05 17:44:30 +02:00
Uli Schlachter ca2fc7811a gears.surface: Add a version check for lgi
The cairo bindings are quite new in lgi and thus we depend on a quite new
version of lgi. Older versions will fail with lots of weird errors, e.g.:

lib/gears/color.lua:61:attempt to call field 'create_rgba' (a nil value)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-05 16:22:04 +02:00
Uli Schlachter ab7788e2f5 Fix naughty notifications
Commit d14d6959ea caused every notify() call to fail with 'attempt to
compare number with nil' because the default_preset table no longer exists.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-05 16:20:30 +02:00
Giuseppe Bilotta 2ec6635adc geticon: also accept a size parameter
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>
2012-06-05 15:25:07 +02:00
Giuseppe Bilotta d14d6959ea naughty.notify: inherit from default preset
Build the preset values by merging the default preset with the one
actually specified, falling back to the normal preset if no preset is
specified.

This allows changing the position/font/whatever of all notification by
only setting up the default preset value (modulo overrides in the other
presets), instead of having to manually set it in all presets.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-05 15:24:24 +02:00
Uli Schlachter 68d630c32a Remove a pango hack
Instead of creating unused cairo image surfaces, we create our temporary layouts
now via the (PangoCairo) font map. Way less ugly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 20:17:14 +02:00
Uli Schlachter 4f30dfd198 Switch from oocairo to lgi.cairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 19:20:34 +02:00
Arvydas Sidorenko 758c4d4972 Splashes aren't all that special (placement-wise)
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-25 15:28:32 +02:00
Ignas Anikevicius (gns_ank) 224bc63ab2 Menubar: document keybindings, some luadoc fixes.
This adds the documentation about keybindings for luadoc.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-18 12:52:29 +02:00
dodo 634d54298e new wibox.layout.mirror
this allows to mirror a widget vertical and/or horizontal.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-18 12:09:32 +02:00
Uli Schlachter 3cbb59b0dc FS#996: awful.ewmh: Connect to property::border_width signal
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>
2012-05-16 23:03:32 +02:00
Felix Bier 4170c77a08 Return condition value instead of conditional true/false
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-13 10:49:10 +02:00
Felix Bier bd0c9f75ae Return condition value instead of conditional true/false
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-13 10:49:10 +02:00
Felix Bier 558bc96099 Return condition value instead of conditional true/false
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-13 10:49:09 +02:00
Felix 1a91fd64b9 Return condition value instead of conditional true/false
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>
2012-05-12 10:38:38 +02:00
Ignas Anikevicius (gns_ank) 887b110f5d Menubar: Shorten the prompt to just run
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-09 17:13:40 +02:00
Ignas Anikevicius (gns_ank) 6b16d19c9b Menubar: Add navigation and execution keybindings.
This adds more navigation keybindings ('Home' and 'End'), which select
the first and the last entry from the list respectively. Also, it adds
two more keybindings:

    'Ctrl+Enter'        - Run the query (no need to press End and then
            Enter)

    'Ctrl+Alt+Enter'    - Run query in the terminal (sometimes there are
            terminal applications which one wants to run, e.g. ncmpcpp)

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-09 17:13:40 +02:00
Alexander Yakushev 91ab7e7e71 menubar: Properly stop the keygrabber
After some recent keygrabber changes the menubar's application
execution was broken. This commit fixes it.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-09 17:05:21 +02:00
Arvydas Sidorenko 3986409e70 Improved ZSH completion (#535)
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-09 17:01:59 +02:00
Ignas Anikevicius (gns_ank) 1730d4f1ea Menubar: Add shell completion to menubar
Since we can search for commands in menubar and easily execute almost
any program now, we can definitely make use of awful.shell.completion,
which is enabled with this commit.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-06 18:55:19 +02:00
Ignas Anikevicius (gns_ank) b246e87b1a Menubar: 'Exec: ' item addition to the end.
This adds a 'Exec: <your-cmd-here>' item to the end of the list,
which appears only if there is at least one application entry in
the list. This is useful, when the program is not in the list of menubar
entries (e.g. it does not have a .desktop file).

When there is are no matching application entries, the 'Exec: ' item is
silently removed, as we already have the same in the prompt.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-06 18:54:31 +02:00
Anurag Priyam 9dfe4fe84b wibox.set_bg: remove historical cruft
Should ideally have been removed in commit 'drawin: Remove bg_color property'.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-06 18:53:04 +02:00
Anurag Priyam ceb6eb311d wibox: assume a default background and foreground color if none passed
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-06 18:53:04 +02:00
Uli Schlachter 95d46f2e32 Fix a typo in commit fa1ca8070
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>
2012-05-06 18:52:00 +02:00
Uli Schlachter fa1ca80705 awful.client.setslave: Fix for not-visible clients
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>
2012-05-05 10:04:51 +02:00
Ignas Anikevicius (gns_ank) d121d94366 Menubar: Match for command names as well.
Enabling matching the command name of the menubar entries with the
query, which improves the flexibility of the widget. The functionality
works as follows:

You want to run GIMP, which has a name of "GNU Image Manipulation
Program". Previously by typing in gimp one would have <no matches>, but
now it will match GIMP entry.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-05 09:50:06 +02:00
Ignas Anikevicius (gns_ank) 6809f6afcf Menubar: Cleanup the environment grabbing
All of the capi should be in a capi table. This make the code more
consistent. Also, it is not worth importing awful.prompt as a different
variable as it is used only once. Calling it awful.prompt make the code
clearer as there are other variables called prompt.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-05 09:49:56 +02:00
dodo 3901369410 no keygrabber in menubar needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:11 +02:00
dodo 200a5272fa use awful.keygrabber in awful.prompt
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:11 +02:00
dodo ac5af147f0 use awful.keygrabber in awful.menu
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>
2012-05-01 14:09:11 +02:00
dodo 56c15da307 awful.keygrabber: capi.keygrabber stack
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:10 +02:00
Alexander Yakushev 394bacacea gears.debug: Print plain non-table values in dump_raw
dump_raw function wasn't printing the plain (non-table) value if the
tag was not specified.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-20 22:40:31 +02:00
Uli Schlachter 5c7a3501d0 wibox: Add pseudo-transparency support
If you now set a wibox' background to e.g. "#00000080", the wibox will do fake
transparency and draw the wallpaper as its background.

This should cover 90% of uses of wibox transparency. For the remaining 10% I'll
wait for bug reports. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-07 21:54:51 +02:00
Alexander Yakushev 3ce52aaab2 menubar.utils: Fix generator usage
:lines() generator in parse_dir function was not used properly which
caused problems when using LuaJIT.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-07 11:12:44 +02:00
Uli Schlachter 6841999a47 Taglist: Add {bg,fg}_occupied theme options
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>
2012-04-06 19:21:40 +02:00
Uli Schlachter 819daca18c Focus history: Don't ignore unfocusable clients
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>
2012-04-06 12:19:12 +02:00
Anurag Priyam 0cf3da1adc introduce awful.client.run_or_raise
Jump to client if running, else launch it.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-02 14:37:47 +02:00
Anurag Priyam c623734632 rename the iterator methods named cycle to iterate, and prettify luadoc a bit
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>
2012-04-02 14:37:47 +02:00
Anurag Priyam cca672faa8 awful.client.jumpto: add missing luadoc for the parameter 'c'
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-01 21:46:48 +02:00
Alexander Yakushev 067e91e5a8 gears.debug: Add functions for inspecting tables
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-26 16:34:03 +02:00
Alexander Yakushev 60cf963bce menubar: Introduce menubar extension
Menubar is a dmenu-like applications menu for Awesome

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-09 13:43:26 +01:00
TsT b5a8936d58 table.foreach is deprecated: now use for + pairs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-08 15:47:31 +01:00
TsT c33aa4a512 mistake fix: "b" local variable declaration is missing
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-08 15:46:35 +01:00
Anurag Priyam 55cbbac45b introducing awful.client.jumpto
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>
2012-03-07 13:30:30 +01:00
Alexander Yakushev f9dd1c3389 awful.prompt: Introduce changed_callback and keypressed_callback to prompt.run
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>
2012-03-05 16:04:46 +01:00
Alexander Yakushev ed444f9b1a awful.prompt: Move update() out of the keygrabber.run callback
It is required to be able to call the update() function from any point
of the keygrabber.run callback.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-05 16:03:22 +01:00
Anurag Priyam 3a44fa578e awful.prompt: remove superfluous return true from keygrabber's callback
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>
2012-03-04 11:40:48 +01:00
Anurag Priyam 8034e2a5d8 awful.menu: remove superfluous return true from keygrabber's callback
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>
2012-03-04 10:47:59 +01:00
Uli Schlachter 4f2156299f awful.prompt: Properly stop keygrabber (FS#965)
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>
2012-03-04 10:41:25 +01:00
Ignas Anikevicius (gns_ank) 5f8f245ab6 ewmh.lua: Fix the screen_change function
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>
2012-03-03 11:45:13 +01:00
Ignas Anikevicius (gns_ank) 524a0c1b35 ewmh.lua: Account for the border-width
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>
2012-03-02 10:21:24 +01:00
Ignas Anikevicius (gns_ank) e37efaeb8a awful: ewmh.lua Fix unmaximization (#964)
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>
2012-03-01 17:10:13 +01:00
Anurag Priyam 1e4bf83d3b awful.menu: always enable keyboard navigation
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>
2012-03-01 17:03:47 +01:00
Anurag Priyam 69a96fc505 gears.color: call the correct creator function in local string_pattern function
The corresponding pattern factory that `string_pattern` delegates to is stored
in the `creator` parameter, and not `v`; probably a typo.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-29 20:58:01 +01:00
Uli Schlachter efee293dd2 wibox: Allow tables as color specification
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 17:50:31 +01:00
Uli Schlachter 2216b6a341 gears.color: Add table-based color definitions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 17:48:11 +01:00
Anurag Priyam 0d41d98468 add awful.client.cycle
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>
2012-02-17 16:20:31 +01:00
Anurag Priyam 740ec07033 add awful.util.table.cycle
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>
2012-02-17 16:17:45 +01:00
Arvydas Sidorenko e052bd99b0 oocairo.image_surface_create_from_png TO awesome.load_image
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>
2012-01-29 16:18:18 +01:00
Anurag Priyam c6e92081e2 awful.placement: can now operate on any object with a set geometry
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>
2012-01-15 18:04:19 +01:00
Anurag Priyam 7f8ef18cd8 awful.screen: define getbycoord() to compute screen number of a pixel
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>
2012-01-15 16:52:19 +01:00
Anurag Priyam 9793ec0b71 do not set non existent, screen property on wiboxes
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>
2012-01-15 16:52:12 +01:00
Anurag Priyam 54a9ecbd27 gears.color docs: replace literal '<' and '>' with respective HTML entities
Luadoc confuses '<stop>' with an HTML tag otherwise.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam d3e8dfed2b gears.colors() docs: fix pattern string used in the example
In general, patterns are specified as 'type:arguments', where 'arguments' is
specific to the pattern used.  The example provided in the documentation,
defined the pattern type to be 'linear', but used arguments meant to create
radial pattern.  So we modify the example to use the correct type -- 'radial'.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam 765db33757 gears.color: expose documentation for create_(linear|radial)_pattern functions
The documentation for these functions were hidden (intentionally?) from luadoc
because of misspelt @class and @name tags. Fixed the spelling, so luadoc can do
its job.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam 902db9a73d tasklist: indicate sticky clients with a solid square as the default
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam 6121db9a13 tasklist: allow 'symbols' used to mark certain client properties to be themed
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>
2012-01-13 20:07:52 +01:00
Axel Beckert 4d69dba412 awful.tag.inc*: properly pass tag parameter to set*
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 10:42:11 +01:00
Anurag Priyam ba7f7c4488 awful.tooltip docs: replace references to undefined variable 'K' with 'myclock'
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>
2012-01-10 15:02:35 +01:00
Uli Schlachter 6f61bde6f2 wibox.widget.base.make_widget: Remove outdated cruft
This never should have ended up in git. AFAIR :size() was replaced by :fit()
long, long ago.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-04 17:11:06 +01:00
Julien Danjou f2872190d5 naughty: remove score system, merge presets
Scoring is broken, it's more useful to merge all presets, and declares that
order matters.
2011-12-27 11:24:35 +01:00
Uli Schlachter 20cafb4851 drawin: Remove bg_color property
The default background color (None) means that the server will leave the
window's content untouched when an exposure happens. This should get rid of all
cases of "flashing window".

The real background will later be drawn while awesome is handling the expose
event.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-23 16:54:55 +01:00
Uli Schlachter e38c52349a awful.menu: Place submenus on the correct height
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>
2011-12-15 21:28:58 +01:00
Corey Thompson 8c62698bf6 Initialize floating_geometry on property::border_width signal (FS#826)
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>
2011-12-09 22:03:10 +01:00
Corey Thompson 47238fe6cf Bump duplicated commands to the most recent in command prompt history
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-05 20:51:48 +01:00
Perry Hargrave c3174f4581 Prevent util.cycle from infinite loop (FS#938)
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>
2011-11-10 19:43:17 +01:00
Majic 75ad861c7a Private naughty.getIcon() -> public awful.util.geticonpath()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-01 19:45:17 +01:00
Massimiliano Brocchini 6b8357989e search in prompt history
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-25 13:02:58 +02:00
Massimiliano Brocchini 48e2f41e3b no duplicate entries in prompt history
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-23 17:57:51 +02:00
Uli Schlachter d8f0bd13bf textbox: Actually tell pango which space we have (FS#933)
In the textbox' draw() callback we forgot to set the pango layout's width and
height. Whoops.

This was tested with the following code which makes it visible when the textbox
draws outside of its assigned space:

local w = wibox({ screen = 1 })
w.y = 10
w.x = 10
w.width = 150
w.height = 150
w.visible = true

local wi = wibox.widget.base.make_widget()
local t = wibox.widget.textbox()
t:set_markup("Foo <b>bar</b> <i>Foobar</i> und so weiter")

wi.draw = function(d, wibox, cr, width, height)
	cr:move_to(24.5, 0)
	cr:line_to(24.5, 150)
	cr:move_to(0, 24.5)
	cr:line_to(150, 24.5)
	cr:move_to(124.5, 0)
	cr:line_to(124.5, 150)
	cr:move_to(0, 124.5)
	cr:line_to(150, 124.5)
	cr:set_line_width(1)
	cr:stroke()

	cr:translate(25, 25)
	t.draw(t, wibox, cr, 100, 100)
end
w:set_widget(wi)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 19:05:25 +02:00
Ignas Anikevicius (gns_ank) 0b689058f3 Adding {fg,bg}_normal to prevent text overlapping
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 17:23:09 +02:00
Uli Schlachter ed022e6764 tag.withcurrent(): Also tag sticky clients (FS#934)
Tagging sticky clients shouldn't hurt anything, but it helps a lot if the client
later becomes unsticky. I'd have no tags in that case.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 16:34:15 +02:00
Julien Danjou c1d0dee20d naughty: fix image data copy
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-10-04 15:23:27 +02:00
Uli Schlachter 7a6d49999a ta{g,sk}list: Cache widgets again
Instead of re-creating all the widgets for the list entries on each update, this
code now caches its widgets again and only creates new widgets when a new
client/tag appears.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-04 13:55:59 +02:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:

    #!/bin/ksh

    git ls-tree -r HEAD | cut -f2 | while read f; do
        egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
        sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
        mv /tmp/foo $f
    done

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-11 17:34:09 +02:00
Uli Schlachter ff646a361a Where's my brown paper bag?
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-08 08:21:36 +02:00
Uli Schlachter f3f01b82d9 naughty: Fix replaces_id
Replacing a popup only worked when it wasn't the newest notification we had. Fix
this to also work if no new notification showed up in between.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-07 21:41:47 +02:00
Uli Schlachter 5accf0014b textbox: Cause less memory allocations
Instead of creating a pango layout all the time (e.g. twice per redraw), we now
only create a single layout which we keep around all the time and update as
needed. Hopefully this helps a little.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-07 21:41:32 +02:00
Anurag Priyam d9e4c1e866 naughty: add helper function, toggle() - suspend/resume notifications
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-24 19:31:18 +02:00
Perry Hargrave f882477269 Update tasklist when client screen changes
This handles corner case where a client has no tags (e.g. stickied), but
is moved across screens.

Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-08 18:23:02 +02:00
Perry Hargrave 11487b84f0 movetoscreen:Dont refocus the selected client
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-08 18:23:02 +02:00
Perry Hargrave 45576b6c6f FS#917: Dont move clients with fixed positions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-03 10:06:29 +02:00
dodo d0a33a38a7 aweful.menu: unicode submenu icon
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-18 20:25:31 +02:00
Perry Hargrave c606bc36a8 awful.client.jumpto: View urgent clients smarter
Only do a tag.viewonly() if the urgent client is not visible.

Further, if the boolean 'merge' parameter is true [default false], then
to a tag.viewmore() with all the currently visible tags.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-13 15:14:38 +02:00
Uli Schlachter bc116c6ef1 Fix two minor typos
Thanks to anrxc for noticing the graph one.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-07 16:04:04 +02:00
dodo a1941efc9c awful.menu: Callable submenu item
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-02 19:27:07 +02:00
Radu Andries 97709a4b3e naughty: escape title too
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-01 15:20:56 +02:00
Uli Schlachter 82921ef57b Correctly position wiboxes (FS#892)
Let's just quote the bug report:

A regression was introduced in commit f5a5af4001
which causes wiboxes to position themselves incorrectly on Xinerama screens
besides the first one. In lib/awful/wibox.lua.in line 49, function
set_position(), the screen number used to use wibox.screen but now just defaults
to 1. Since the screen parameter is never actually passed to set_position(),
that means that wiboxes will always use screen 1's geometry when determining the
proper position. So, if a different screen is larger or smaller or isn't aligned
with the primary screen, the wibox will either be offscreen or not on the edge.

This should be fixed by explicitly passing the right screen argument to all
functions which need it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-30 17:13:56 +02:00
Uli Schlachter 14504de220 awful.autofocus: Also react on "tagged" signal (FS#883)
Apparently some people start a timer, switch to an empty tag and then let the
timer move a client to that empty tag. This change makes sure that this new
client will get the input focus in this case.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-16 16:00:35 +02:00
Uli Schlachter d436b2845c beautiful: Use weak references for tracking fonts
There is no point in keeping this font cache alive for longer than needed.
Letting lua garbage-collect fonts should provide sane cache-behavior in that we
forgot about the font once no one uses it anymore.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-14 22:40:56 +02:00
dodo b530da1861 add set_font to wibox.widget.textbox
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-14 22:37:44 +02:00
Uli Schlachter 9f8af0ae6d awful.wibox: Fix some flickering
The menu was first made visible and then placed correctly. This caused a short,
black flicker in the top, left corner of the screen.

Fix this by removing a too early "visible = true".

This was introduced by me in 4d280365ad, sorry.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-02 17:26:52 +02:00
Uli Schlachter 4d280365ad awful.menu: Stop using the removed "screen" key
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:36:32 +02:00
dodo 3a4761732c awful.menu: handling with strings
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:28:51 +02:00
dodo ea40a922ed awful.menu: rewrite
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:28:45 +02:00
dodo 2f3bc619cb wibox.layout.*: add get direction method
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:28:41 +02:00
dodo af756bb0d1 wibox.widget.background: set foreground
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:28:38 +02:00
Julien Danjou 52dfb76819 awful.rules: fix typo in example
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-29 09:37:30 +02:00
Anurag Priyam 448583e87c rules: allow defining exceptions to a rule - except, and except_any
So you want to make all Firefox windows floating except the main window
(instance = Navigator). You can either list all possible windows in
rules and make them floating, or make all of them floating except one:

{ rule = { class = "Firefox" },
  except = { instance = "Navigator" },
  properties = {floating = true},
}

More examples in the docs.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-29 09:26:24 +02:00
Gregor Best 33e88ea8d4 awful.mouse: fix interclient border snapping
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-28 12:27:09 +02:00
Uli Schlachter 646eaad18e awful.menu: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:36:20 +02:00
Uli Schlachter ca5337e731 naughty: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:36:01 +02:00
Uli Schlachter 8453d0cc4f awful.wibox: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:35:43 +02:00
Uli Schlachter f5a5af4001 awful.wibox: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:35:15 +02:00
Gregor Best 07e63bd564 awful.mouse: fix client snapping
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-21 07:38:44 +01:00
Uli Schlachter e59f17357d tasklist/taglist: Handle invalid text better
When some client sets an invalid window title, a lua error was generated while
updating the tasklist. This caused all later tasklist entries to be skipped /
missing and the last entry to be empty.

Fix this by catching lua errors with pcall.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-18 17:28:38 +01:00
Uli Schlachter eff4474c6d Move size-hints handling to lua
The C core now completely ignores size hints and let's lua handle them.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-11 17:21:00 +01:00
dodo 5d9fa5614e display ontop mode for clients in awful.widget.tasklist
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-08 19:40:42 +01:00
Uli Schlachter 07164aa995 awful.menu: Handle invalid images better
This fixes problem where e.g. loading an image fails and thus the displayed
layout gets messed up.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-04 22:07:36 +01:00
Uli Schlachter 01e6e2a07b imagebox: Refuse invalid images
This makes the imagebox widget refuse images which have a zero or negative width
or height. A zero size causes problems where a division by zero results in inf
which makes various stuff fail in weird ways later on.

Additionally, cairo's "error surfaces" have a negative size. Displaying those
would cause all sorts of weird problems, too, so we better reject those.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-04 22:03:42 +01:00
Uli Schlachter 00273528b0 awful.placement.no_overlap: Honor original position
awful.placement.no_overlap caused clients on an otherwise empty desktop to stich
to the top-left corner of the screen because it always preferred the top-left
corner of the available space.

This commit doesn't change the way in which the available area is computed, but
instead this now tries to keep the client at its original position if that is
available.

This fixes cases where calling awful.placement.no_overlap as a callback from an
awful.rule rule didn't work because the manage signal in the default config
later overrode that via calling awful.placement.no_overlap.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-01 17:52:00 +01:00
Andres Freund af6915fda2 Correct typo in awful.client.restore
This corrects a type in awful.client.restore which caused it not to restore any
client at all  if all clients are minimized.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-01 16:08:09 +01:00
dodo 9befc30a7b add pango alignment to wibox.widget.textbox
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-28 10:02:09 +01:00
Uli Schlachter 935e9a0e30 Add awful.client.restore()
This restores the first minimized client it finds on the selected tags.

Optionally, this function accepts a screen number as its first argument.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-19 22:23:35 +01:00
Uli Schlachter 9d0cf27593 tasklist: Update when a c.minimized changes
This fixes a bug where the tasklist would still show its old content after a
client was minimized/unminized because it didn't connect to the appropriate
signal.

This wasn't noticed before, because in most cases minimizing a client also
unfocuses this client which causes a tasklist update.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-19 21:42:39 +01:00
Uli Schlachter d8dc4bb2f5 awful.client.floating.toggle: Fix for dialogs
awful.client.floating.get() does some sensible defaults. E.g. dialogs are
floating by default. Since floating.toggle only checked the property, these
defaults made it break.

So floating.toggle() should use floating.get to decide if a given client is
floating. It should also use "false" instead of "nil" when the client is made
non-floating or else the default will apply again.

Thanks to vsp for making me figure this out. :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-10 23:03:05 +01:00
André Aparício 3b0a20ca3b Fix default naughty preset for dbus notifications
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-03 18:08:04 +01:00
jpike 4972a280b0 Add naughty.config.notify_callback
This optional callback can be used for filtering and/or editing
notifications.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-28 21:05:09 +01:00
Uli Schlachter 88aff03005 Don't focus a different screen on unmanage (FS#850)
When some client on the left monitor was closed while client.focus is on the
right monitor (e.g. 'sleep 5 ; exit' in a terminal), awful.autofocus would shift
the input focus to whatever client happened to be next in the focus history on
the left monitor.

Fix this by only ever moving the input focus between screens when a tag is
selected, not when some client does its magic.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-27 18:10:39 +01:00
Anurag Priyam 514fd796f3 add usage example for awful.menu
Added a very simple example to show the usage, and applicability of
awful.menu by dynamically constructing a menu of clients that match a
particular rule.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-26 22:10:00 +01:00
Anurag Priyam 2a4503ef04 fix minor grammar, and typo in awful.menu.new's documentation
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-26 22:10:00 +01:00
Anurag Priyam 63503ac107 add markup to awful.menu.new's documentation
Display the possible keys to the 'menu' params as a bullet list
(unreadable otherwise).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-26 22:10:00 +01:00
Uli Schlachter 40958f9d21 Use ._NAME for identifying oocairo surfaces
image:type() was removed from oocairo, because the ._NAME property already
exists and there's no need for two functions doing the same job.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-21 19:54:27 +01:00
Uli Schlachter 78a1788c6f Fix a stupid typo, sorry
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-14 19:06:54 +01:00
Uli Schlachter ecb8376c44 naughty: Try ignoring all markup before giving up
naughty now tries to ignore all pango markup by using :set_text() instead of
:set_markup(). If this fails, too, we must have been fed invalid utf8 which we
cannot do anything about.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-14 16:16:04 +01:00
Uli Schlachter ec72ee1b43 Fix naughty
I removed textbox' check() function, but forgot to see if anything actually
calls it. Just removing the call fixes all problems here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-14 16:12:05 +01:00
Uli Schlachter d16ca829aa textbox: Verify a text when it is set
This makes the textbox pass the markup/text it is given to oopango immediately.
If it is invalid, a lua error will be thrown and the old text will still be
shown.

This fixes a bug where the whole wibox isn't redrawn when a textbox complains
about broken UTF8.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-08 13:55:36 +01:00
Uli Schlachter 75956804bd Make awful.client.idx public
The luadoc API documentation already contained this function and it seems to be
useful for user configs.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-03 14:18:11 +01:00
Uli Schlachter 3ec32306db (Try to) document the wibox constructor
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-14 21:07:04 +01:00
Uli Schlachter df116331a1 Improve wibox' API documentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-12 21:45:54 +01:00