Commit Graph

2194 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée fdc25bbb99 Merge pull request #789 from aroig/gh/layout-names
fixes to keyboard layout names
2016-03-31 00:30:35 -04:00
Emmanuel Lepage Vallée 0953db56d8 Merge pull request #757 from Elv13/properties
C-API objects properties
2016-03-30 23:32:12 -04:00
Emmanuel Lepage Vallee 3322a17182 screen: Support property fallback 2016-03-30 23:25:44 -04:00
Emmanuel Lepage Vallee 89a1dab845 client: Support property fallback 2016-03-30 23:25:44 -04:00
Emmanuel Lepage Vallee e0897cf170 tag: Support property fallback 2016-03-30 23:25:44 -04:00
Abdo Roig-Maranges cb46f09361 make keyboard layout naming function easily overridable 2016-03-30 15:41:30 +02:00
Abdo Roig-Maranges 1879966556 handle layout names like us(altgr-intl) 2016-03-30 14:45:48 +02:00
Emmanuel Lepage Vallee a77e650c5f gears.object: Add a new "property fallback" object type 2016-03-30 03:27:19 -04:00
Abdo Roig-Maranges af7495de5a fix number check for the screen argument
The check was not done for the elseif case, and caused a comparison
runtime error.
2016-03-29 17:03:07 +02:00
Uli Schlachter c04718a150 Fix awful.spawn to work with more LGI versions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-28 17:53:52 +02:00
Emmanuel Lepage Vallee 995361449a awful.screen: Fix addition between object and number
Fix #784
2016-03-28 04:39:19 -04:00
Uli Schlachter d9c918c14a wibox.drawable: Stop caching the wallpaper
The C code now does this for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 11:45:14 +02:00
Uli Schlachter 3233eb6cce gears.wallpaper: Use connect_for_each_screen()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 10:51:28 +02:00
Uli Schlachter 3f40183177 naughty: Use connect_for_each_screen()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 10:51:28 +02:00
Uli Schlachter 94dede7511 Add functions for calling something for every screen
This adds gears.screen which contains a wrapper around
screen.connect_signal("added", func) that also calls the callback function for
each screen that already exists. This is added in gears.screen so that it can
also be used from e.g. wibox, if needed. Feel free to move this elsewhere if
that's a bad idea (I'm not really convinced of it).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-27 10:51:28 +02:00
Uli Schlachter 8ef96bcde7 gears.matrix: Remove (now-)unused code
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-26 19:37:21 +01:00
Uli Schlachter 96055fc86b gears.shape: Stop using _call on a matrix
Instead of using a special _call field on gears.matrix instances which has to be
copied around suitably, this commit changes the code so that the magic is
restricted to a single function in gears.shape.transform. With some metatable
magic, suitable redirection to everything is added.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-26 19:33:10 +01:00
Uli Schlachter 19f146de5f Add missing modeline to gears.shape
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-26 19:32:40 +01:00
Emmanuel Lepage Vallée e83832f41a Merge pull request #776 from Elv13/awful_screen_improvments
Awful screen improvements
2016-03-26 03:41:22 -04:00
Emmanuel Lepage Vallée 770cfa4553 Merge pull request #775 from Elv13/margins_redraw
Margins redraw
2016-03-26 03:40:42 -04:00
Emmanuel Lepage Vallee a3542c638a awful.layout: Use awful.screen to compute geometry 2016-03-26 03:37:04 -04:00
Emmanuel Lepage Vallee 83df30d3a4 awful.screen.focused: Fix documentation and make more flexible.
Telling the user a method can be monkeypatched is **not** a good
idea.
2016-03-26 03:37:04 -04:00
Emmanuel Lepage Vallee e66166ccee awful.screen: Add a method to apply various paddings.
This avoid code duplications.
2016-03-26 03:37:04 -04:00
Emmanuel Lepage Vallee 9fd329c449 awful.screen.padding: Always return a valid table.
This also fix a bug when the user edit the table. In that case,
the padding was (accidentally) changed without the correct
signals.
2016-03-26 03:15:00 -04:00
Emmanuel Lepage Vallee 242652be94 awful.screen.padding: Support padding number value 2016-03-26 03:14:42 -04:00
Emmanuel Lepage Vallée b2fabfeea1 Merge pull request #770 from Elv13/background_clip
wibox.background: Add shape clip support
2016-03-26 01:51:17 -04:00
Emmanuel Lepage Vallée 5715acfd18 Merge pull request #767 from Elv13/widget_alias
wibox: Add widget and layout metatable for widget creation
2016-03-26 01:50:00 -04:00
Emmanuel Lepage Vallee 35ece57a78 layout.margin: Fix the documentation 2016-03-26 01:46:47 -04:00
Emmanuel Lepage Vallee 87813a5597 layout.margin: Avoid unneeded redraw 2016-03-26 01:46:30 -04:00
Emmanuel Lepage Vallee d2c5e36294 Fix a documentation typo 2016-03-23 18:12:04 -04:00
Emmanuel Lepage Vallee 2eb085c263 wibox.background: Add shape clip support 2016-03-21 03:30:14 -04:00
Emmanuel Lepage Vallee f1816474df wibox: Add widget and layout metatable for widget creation
Calling wibox.widget.base.make_widget_declarative{} is too long, so this
commit add wibox.widget{} and wibox.layout{} alias.
2016-03-19 17:37:33 -04:00
Emmanuel Lepage Vallee f6556b145f gears.shape: Improve documentation 2016-03-16 18:02:41 -04:00
Emmanuel Lepage Vallee 9bd150f39a shape: Add radial_progress shape 2016-03-16 17:45:11 -04:00
Emmanuel Lepage Vallee 650d8d0cb5 shape: Add partially_rounded_rect shape 2016-03-16 17:44:37 -04:00
Emmanuel Lepage Vallee 57e370700f shape: Add losange shape 2016-03-16 17:44:37 -04:00
Emmanuel Lepage Vallee bc16b75ff5 shape: Add parallelogram shape 2016-03-16 17:44:30 -04:00
Emmanuel Lepage Vallee 7b4109265e shape: Add rectangle shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee 990619db5a shape: Add circle shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee 3b95d2467f shape: Add octogon shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee f0bf642f32 shape: Add cross shape 2016-03-16 05:57:44 -04:00
Emmanuel Lepage Vallee 5dbffc73c1 shape: Minor fixes 2016-03-16 05:57:44 -04:00
Daniel Hahler 491f17f32b Merge pull request #732 from psychon/nicer-tooltip
Nicer tooltip API
2016-03-16 03:09:56 +01:00
Emmanuel Lepage Vallee dc687c0e31 wibox: Clone missing signals 2016-03-12 21:18:09 -05:00
Emmanuel Lepage Vallee 3d660ba37e awful.tag: Add "volatile" property
Useful when using dynamic tags. The tags will be closed once
it is empty. This was part of Tyrannical for many years, but is
generally useful for other workflows too.

   local t = awful.tag.add("my_tag",{volatile=true, screen=2})
   awful.spawn("ayapp", {tag=t})
2016-03-11 01:10:13 -05:00
Daniel Hahler c5526ca336 Merge pull request #746 from psychon/indexless-screen-iteration
Indexless screen iteration
2016-03-07 00:26:22 +01:00
Daniel Hahler d1e2cfa135 Merge pull request #741 from psychon/systray-screen
Improvements on the systray / default to displaying the systray on the primary screen
2016-03-07 00:25:47 +01:00
Daniel Hahler 8966c73599 Minor doc fixes 2016-03-06 14:46:13 +01:00
Uli Schlachter 95e5bdf5d2 Use the new way to iterate over screens in Lua
This gets us one step closer to removing screen indices.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 14:05:28 +01:00
Uli Schlachter dd78f8e6f2 Remove another useless iteration over screens
Any signal on a screen instance is also emitted on the screen class, so the here
can just connect to the screen class.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:38:52 +01:00
Uli Schlachter 8b65bad3fc Remove useless iteration over screens
Signals on instances are also emitted on the class and thus we can just connect
to the signal on the class here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:37:38 +01:00
Uli Schlachter 8fd801a6f4 awful.util.get_rectangle_in_direction(): Use pairs
This code works just fine with non-integer table keys. Also, this is used by
awful.screen.focus_bydirection() and thus will be used with screen objects
instead of screen indicies when we get rid of screen indicies.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:34:44 +01:00
Uli Schlachter 2e2e3f07e2 systray: Emit layout_changed / redraw_needed where needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:53:38 +01:00
Uli Schlachter a1b20ef6bb Systray: Add settings for which screen to display on
This makes it possible to have the systray only visible on the primary screen,
which is the new default value. This also makes it possible to configure
directly on which screen the systray should be visible.

This breaks the API in the sense that people who use "the old method" to
configure the systray's screen possibly don't have a systray.

Fixes: https://github.com/awesomeWM/awesome/issues/724
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:49:49 +01:00
Uli Schlachter 1e5dd0c782 systray: Add API documentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:39:25 +01:00
Uli Schlachter ea95963726 systray: Turn this into a singleton
There's no point in having multiple instances of this, because there are no
per-instance settings and the systray can only be visible in a single place at a
time anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:17:35 +01:00
Uli Schlachter 7739a6a7ed Add a property::visible signal to tooltips
As requested here:
b4224a651f (commitcomment-16402861)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 12:32:24 +01:00
Uli Schlachter e347f7191c awful.tooltip: Use metatable magic to create wiboxes lazily
This might make the code a bit easier to follow. Unless you want to know where
the wibox is created...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 12:31:03 +01:00
Emmanuel Lepage Vallée 249a3f7ce0 Merge pull request #737 from Elv13/minor_widget_enhancements
wibox.widget: Minor enhancements
2016-03-04 04:24:34 -05:00
Emmanuel Lepage Vallee 78ed3abe1a wibox.widget: Minor enhancements
* Better widget names when using the declarative syntax
 * Add ratio.get_ratio to avoid using the private API
 * Also support `set_widget` when swapping widgets
2016-03-04 04:16:53 -05:00
Emmanuel Lepage Vallee 2aa15c9454 gears.color: Add transparent constant
Avoid repetitive "#00000000" for transparent wiboxes and such
elements.
2016-03-04 03:16:56 -05:00
Daniel Hahler 7c7295a282 Merge pull request #716 from psychon/wallpaper_cleanup
Wallpaper cleanup
2016-03-03 22:16:48 +01:00
Daniel Hahler a1687dc72e Merge pull request #730 from actionless/fix-menubar-pagination-again
fix(lib: menubar): take in account common list padding
2016-03-03 22:15:11 +01:00
Daniel Hahler ef19a8213a awful.client.jumpto: un-minimize clients
Fixes https://github.com/awesomeWM/awesome/issues/472.
Closes https://github.com/awesomeWM/awesome/pull/729.
2016-03-03 22:09:10 +01:00
Emmanuel Lepage Vallée 3be5343e83 Merge pull request #709 from psychon/implement-set-children-sanely
Implement set children sanely
2016-03-03 02:06:58 -05:00
actionless b93d6a4b25 fix(lib: menubar): take in account common list padding 2016-03-02 15:47:50 +01:00
Daniel Hahler 68bde9d584 Merge pull request #717 from blueyed/callback-for-client.jumpto
Add callback support for client.jumpto
2016-03-01 23:01:32 +01:00
Uli Schlachter b40b69d379 Fix the mirror layout
Issues involve:
- :layout() had the wrong signature and expected a cr argument that was left
  from when this was still the :draw() function.
- horizontal and vertical reflection were mixed up (I guess it has always been
  this way?)
- The return value should be a table of widget placements. Instead it was just a
  single widget placement.

This is broken since commit 85ab3f045b.

Fixes: https://github.com/awesomeWM/awesome/issues/718
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-29 22:50:47 +01:00
Emmanuel Lepage Vallée 512e966be7 Merge pull request #721 from Elv13/fix_awful_screen
awful.screen: Fix regression
2016-02-29 04:29:22 -05:00
Emmanuel Lepage Vallee 924e889271 awful.screen: Fix regression 2016-02-29 04:21:10 -05:00
Emmanuel Lepage Vallée b010849c3c Merge pull request #722 from Elv13/expose_graph
awful.widget.graph: Expose private data
2016-02-29 04:16:17 -05:00
Emmanuel Lepage Vallee 19f874a73f awful.widget.graph: Expose private data 2016-02-29 03:12:08 -05:00
Emmanuel Lepage Vallee 07631ccc9a awful.layout: Allow parameters to be called when no tags is selected
There seem to be a little race condition (either in my layout code or
elsewhere) when playing with multiple screens. As most properties do
not depend on the tag, there is no point in returning early anyway.
2016-02-29 02:49:20 -05:00
Daniel Hahler 0278d5f123 Add callback support for client.jumpto
Instead of true/false `merge` can be a callback now, which allows for
more dynamic handling of the client not being visible, e.g. moving it to
the current tag, instead of merging.
2016-02-28 22:45:15 +01:00
Daniel Hahler 9503110e44 Merge pull request #714 from psychon/tooltip-windows
Less tooltip windows
2016-02-28 22:21:18 +01:00
Daniel Hahler f874b0ad2e Merge pull request #712 from psychon/protected_calls
Protected calls (gears.protected_call)
2016-02-28 22:16:13 +01:00
Daniel Hahler 2bcff5af27 Merge pull request #708 from psychon/less_screen_indicies2
Less screen indicies
2016-02-28 22:15:37 +01:00
Daniel Hahler 9205feea5e menubar: rename utils.parse to utils.parse_desktop_file 2016-02-28 22:14:35 +01:00
Daniel Hahler 25eff81878 menubar: look for .desktop files recursively
It was missing apps/entries from /usr/share/applications/kde4.

This patch also makes sure that entries are unique (by Exec/Name).

Closes https://github.com/awesomeWM/awesome/pull/711.
2016-02-28 22:14:08 +01:00
Daniel Hahler b84f214144 Merge pull request #706 from psychon/maximized-workarea-changed
Maximized workarea changed
2016-02-28 22:09:51 +01:00
Uli Schlachter b05b699129 gears.wallpaper: Free wallpaper from memory when done
Wallpapers are usually big images that use up a lot of memory. This commit makes
gears.wallpaper call :finish() on all involved surface to make them free their
memory.

This is a lot faster than waiting for the garbage collector to collect these
surfaces. Due to the large size of wallpapers, such a special case makes sense
for this code.

Hopefully-helps: https://github.com/awesomeWM/awesome/issues/368
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 17:24:24 +01:00
Uli Schlachter 2ad147d740 gears.surface: Change the way that caching works
Loading a file normally has the same behaviour as before. First the cache is
checked and if nothing is found, the file is loaded and cached.

This commit changes the behaviour of loading a file uncached. This no longer
removes the file from the cache if it is cached (why should it?) and also does
not put it in the cache.

This means that users of load_uncached and load_uncached_silently can now freely
modify the resulting surface without interfering with other API users.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 17:21:10 +01:00
Uli Schlachter e49b1de0b2 awful.tooltip: Some minor optimizations
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 15:49:50 +01:00
Uli Schlachter b4224a651f awful.tooltip: Create wibox lazily
This makes awful.tooltip create its tooltip lazily when it is first needed
instead of immediately when the tooltip is created.

Fixes: https://github.com/awesomeWM/awesome/issues/591
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 15:49:50 +01:00
Uli Schlachter 1578957355 awful.tooltip: Inline place() into set_geometry()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 14:43:40 +01:00
Uli Schlachter 8560c6d2af Use gears.protected_call where applicable
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:28:55 +01:00
actionless 504c105cba feat(awful: widgets): add 'watch' widget 2016-02-28 12:11:57 +01:00
Uli Schlachter 7bf2f17a8a Make gears.widget.{fit,layout}_widget more robust
This commit makes these methods invoke the method on a widget in a protected
context. Thanks to this, e.g. the wibox and other widgets are protected from
errors in a child widget.

Additionally, fit_widget() now assumes 0 if a widget's :fit() method didn't
provide a number.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:11:36 +01:00
Uli Schlachter 01f11003d6 Add gears.protected_call
This library is a wrapper around pcall() / xpcall() that prints an error message
via gears.debug.print_error() in case of errors.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:07:02 +01:00
Uli Schlachter 2ad49dfd0c Fix some broken documentation in gears.debug
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 12:05:55 +01:00
Uli Schlachter a78f2359d1 Fix the test case that the previous commit added
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-28 11:10:46 +01:00
Uli Schlachter 1dd63b04de check_widget(): Also check .is_widget entry
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-27 14:01:31 +01:00
Uli Schlachter b1e7d3c22c Call check_widget() in :setup()
I just spent too much time tracking down a bug that happened while drawing a
widget. This is the reason why we should apply sanity checks while widgets are
constructed, so that we get a useful backtrace.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-27 13:58:48 +01:00
Uli Schlachter cf3c81fa9e Implement :set_children() sanely everywhere
This makes the code use the existing functions for setting widgets. That way,
all the sanity checks that the existing functions have are applied for this code
as well.

I just spent half an hour tracking down a bug where a boolean ended up as a
"widget" in a fixed layout. The symptom was that while drawing the widget, an
error happened. Via this change, the error would instead be flagged while
constructing the widget.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-27 13:55:34 +01:00
Uli Schlachter d56b5c031b Remove some now unnecessary uses of s.index
Because all our Lua code can now work with screen objects, most of the uses of
s.index that the previous patches added for reaching this goal can be removed
again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-27 09:24:19 +01:00
Uli Schlachter 5fd47e508f Support screen objects in awful.client
This commit makes the code in awful.client work with screen objects where
possible (which is not possible in awful.client.movetoscreen() because it uses
screen_idx + 1).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 20:16:07 +01:00
Uli Schlachter fb5a98c765 Support screen objects in awful.tag
This commit makes the code in awful.tag work with screen objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 20:08:45 +01:00
Uli Schlachter c17e331b92 Support screen objects in awful.screen
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 19:56:07 +01:00
Uli Schlachter b3f43f9110 Support screen objects in more of awful
This commit makes the code in awful.widget work with screen objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 19:50:17 +01:00
Uli Schlachter 2792fe731e Support screen objects in some of awful
This commits makes a random selection of modules in awful support screen objects
and accept them as parameters everywhere where a screen index is accepted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 19:50:17 +01:00
Uli Schlachter 65b403c34a wibox: Support screen objects
This commit documents that a textbox already accepts a screen object where a
screen index is expected. Also, this changes the widget API in that a widget's
context.screen is now a screen object instead of a screen index.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 18:42:57 +01:00
Uli Schlachter 8de29856b8 naughty: Support screen objects
This commit makes naughty accept a screen object everywhere where a screen index
is accepted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 18:30:42 +01:00
Uli Schlachter d9f4ed9fb6 menubar: Support screen objects
This commit makes meanubar accept a screen object everywhere where a screen
index is accepted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 18:25:55 +01:00
Uli Schlachter 20e13602de beautiful.xresources: Support screen objects
This commit makes beautiful accept a screen object everywhere where a screen
index is accepted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 18:19:24 +01:00
Uli Schlachter f6ccda8499 awful.ewmh: React to workarea changes
This commit makes awful.ewmh re-apply the maximized geometry to any maximized
clients when the workarea of a screen changes. This happens e.g. when a wibox
that is docked to the edge of the screen is hidden.

Fixes: https://github.com/awesomeWM/awesome/issues/705
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-21 17:09:08 +01:00
Uli Schlachter f3091154f6 Make beautiful work directly under unit tests
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-21 17:09:08 +01:00
Uli Schlachter 3db87c693a menubar.icon_theme: Don't require("awful")
This avoids having to mock half the C API just because all of awful is loaded
needlessly in this unit test and is generally a good idea.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-21 16:55:06 +01:00
Daniel Hahler a6dd6b4a20 Merge pull request #676 from psychon/luacheck
Luacheck
2016-02-17 17:15:08 +01:00
Daniel Hahler 1bd2838205 Merge pull request #701 from psychon/client-gravity-fullscreen
Fix awful.ewmh to handle window gravities
2016-02-17 17:14:51 +01:00
Uli Schlachter 267ab282b2 Sanitize argument handling for wibox.layout.stack constructor
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-16 19:42:35 +01:00
Daniel Hahler 796c2fba51 Merge pull request #695 from psychon/fix-bugs-luacheck-found
Fix bugs luacheck found
2016-02-16 01:03:59 +01:00
Uli Schlachter 4b9584fdb1 Fix awful.ewmh to handle window gravities
Since commit b2aaefd095, we correctly handle window gravities when
the border width of a client changes. Since most windows out there have a
NorthWest gravity, this means that most windows do not have this problem.
However, e.g. mplayer uses gravity "Static" and this causes this issue (any
gravity other than NorthWest will do).

This affects the fullscreen handling in awful.ewmh. The code has to set the
border width before it changes a client's geometry so that the move when the
border width changes doesn't matter.

No new integration test for this since I didn't find anything usable with a
non-NorthWest gravity. A test would be easy to write, just test if `c.fullscreen
= true ; c.fullscreen = false` restores the previous window geometry.

Fixes: https://github.com/awesomeWM/awesome/issues/697
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-15 21:35:28 +01:00
actionless d462e10790 fix(awful: prompt): fix variable name after luacheck fixup 2016-02-15 02:00:39 +01:00
Uli Schlachter 426da4f8bb Fix one more luacheck warning in awful.widget.tasklist 2016-02-14 14:43:20 +01:00
Uli Schlachter 798be638d9 Fix this master fill policy stuff
awful.layout.suit.corner does awful.tag.getmfpol(t), but doesn't actually have a
variable t in scope. I just copied the needed stuff from the tile layout.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:43:10 +01:00
Uli Schlachter b4148f5dfa Mark a bug in awful.widget.common as such
No idea what the correct value for this argument is supposed to be, but since
there is no variable "m" in scope, this always uses nil as the value.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:43:04 +01:00
Uli Schlachter c7aed3bd88 Fix wrong variable in awful.widget.taglist
There is no "s" variable. This code wants "screen" instead. The effect of this
typo was that with multiple taglists, only the one that was created last got
updated.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:58 +01:00
Uli Schlachter b01f480431 awful.prompt: Fix with newer Lua
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:53 +01:00
Uli Schlachter ee530a65d6 Fix typo in awful.tag.swap
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:48 +01:00
Uli Schlachter a4e598d444 Fix naughty.reset_timeout
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:40 +01:00
Uli Schlachter 9db539fbf2 Fix wibox.layout.mirror
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:34 +01:00
Uli Schlachter 065dd0d213 Merge branch 'easy-async-spawn' of https://github.com/actionless/awesome 2016-02-14 14:34:37 +01:00
Uli Schlachter 99ef5822b0 Merge branch 'more-luacheck-fixes' of https://github.com/psychon/awesome 2016-02-14 14:33:06 +01:00
Uli Schlachter b73ebabbfa Merge branch 'remove-awful-mouse-finder' of https://github.com/psychon/awesome 2016-02-14 14:32:28 +01:00
Emmanuel Lepage Vallée 0a15ea9131 Merge pull request #691 from psychon/fix-titlebars
Fix missing import from commit 7842f92f08
2016-02-12 21:36:42 -05:00
Uli Schlachter a0d4d729d3 Remove awful.mouse.finder
This module is partly broken since 2009 (the way to use it that is mentioned in
the docs doesn't actually work) because the mousefinder object doesn't have a
find()-method (the line doing "self.find = find" should do "self.finder =
finder.find"). Since no one really noticed, this module is apparently not used
much.

When someone wants to still use this, they are free to copy this to their own
config. It's not much code, but it's enough code that I am annoyed that we ship
something broken to users. Everyone who copies it to their own config will make
sure it works the way they want.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 18:27:40 +01:00
Uli Schlachter 6a4df17e70 Fix missing import from commit 7842f92f08
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 18:19:22 +01:00
Uli Schlachter 2c77f9dcf8 Fix luacheck warnings in lib/naughty
A warning pointing out an actual problem is left.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:16:42 +01:00
Uli Schlachter 15e72fb037 Fix luacheck warnings in lib/wibox
Warnings pointing out actual problems are left.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:15:55 +01:00
Uli Schlachter 8c26e2dab4 Fix all luacheck warnings in lib/gears
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:11:50 +01:00
actionless 2501f128e4 chore(awful: hotkeys: vim): rename key groups 2016-02-12 01:07:04 +01:00
actionless 36e124d894 chore(awful: hotkeys: vim): add `find` and `scroll` categories 2016-02-12 01:05:59 +01:00
actionless 8041078618 chore(awful: hotkeys: vim): small improvements in hotkeys descriptions 2016-02-12 01:03:07 +01:00
Uli Schlachter c75741c578 Fix luacheck warnings for the rest of awful
This fixes *most* luacheck warnings in awful. However, some non-trivial ones
remain for latter.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Uli Schlachter 99a4184224 Fix luacheck warnings in lib/awful/widget/
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Uli Schlachter c455e1f90e Fix luacheck warnings in half of awful
Boy, awful is huge... Let's better do it in two parts

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Uli Schlachter f2cf4a6385 Fix luacheck warnings in beautiful and menubar
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Daniel Hahler bb85e10042 Merge pull request #685 from actionless/hotkeys_extended_mathes
feat(awful: hotkeys): extended matching rules
2016-02-11 21:52:22 +01:00
Daniel Hahler 58954f7f08 Merge pull request #675 from psychon/remove-gears.sort
Remove gears.sort
2016-02-11 21:51:44 +01:00
Daniel Hahler 7e57ca30ff Merge pull request #651 from psychon/client-leaks
Client leaks
2016-02-11 21:24:57 +01:00
actionless 901771e51b feat(awful: hotkeys): extended matching rules 2016-02-11 12:33:02 +01:00
Emmanuel Lepage Vallee cb896ca87f wibox.widget: Add method to create declarative widgets directly 2016-02-11 03:58:54 -05:00
Emmanuel Lepage Vallée 4a45db9eb0 Merge pull request #642 from Elv13/upstream_dynamic_p6
Add ratio and stack layouts
2016-02-11 03:44:49 -05:00
actionless 4aaedb0f86 fix(awful: hotkeys): restore continuation symbol 2016-02-11 03:43:13 +01:00
Emmanuel Lepage Vallee 0a39d196c7 wibox.layout: Add the new 'ratio' layout
This layout allow each widgets to take 'r' percent of the total
space, where 'r' is configurable.

It re-implement the 'wfact' system used by `awful.layout.suit.tile`
2016-02-10 21:40:40 -05:00
Emmanuel Lepage Vallee 20030e6f93 wibox.layout: Add new 'stack' layout
This layout display the widgets on top of each other. It can also optionally
display only the first one.

The most common use case is to create a composited widget. Other use case
include the creation of a "paged" stack to only display the most
relevant widget without adding extra complexity to the parent layout.
2016-02-10 21:40:40 -05:00
actionless 333c5cd31c fix(awful: hotkeys): case when description is missing (+prettify) 2016-02-11 03:32:11 +01:00
actionless 3a9f7a1cee fix(awful: hotkeys): compute length of the line correctly 2016-02-11 01:04:54 +01:00
actionless 64bd09d38d fix(awful: hotkeys): fix sorting of hotkeys 2016-02-11 00:54:47 +01:00
Emmanuel Lepage Vallée ff8f2aef27 Merge pull request #678 from Elv13/bgimage
Extend bgimage support
2016-02-10 03:59:06 -05:00
Emmanuel Lepage Vallee b1e69dba8c doc: Move the new widget documentation to a new file
This will help with discoverability
2016-02-10 01:25:41 -05:00
Emmanuel Lepage Vallee 7842f92f08 wibox: Support the declarative container syntax
Also support it for titlebars
2016-02-10 01:25:31 -05:00
Emmanuel Lepage Vallee 6a68173ccb widget: Add a new container declaration syntax
This new syntax is inspired by the Awesome widget 3.2-3.4 API. It
allow cleaner widgets declaration. The produced code is usually much
shorted and easier to read than wibox.widget imperative syntax.
2016-02-10 01:09:50 -05:00
Emmanuel Lepage Vallee e36f23171b wibox.widget: Add `set_children` method
Provide a generic method to set the widget content
2016-02-10 01:09:50 -05:00
Emmanuel Lepage Vallee 4a20f9e533 titlebar: Support bgimage 2016-02-10 00:15:17 -05:00
Emmanuel Lepage Vallee c957b3d5a8 wibox: Support bg_image 2016-02-10 00:15:14 -05:00
Emmanuel Lepage Vallee 7666976538 drawable: Add background image support
Copy what's done in `widget.background`
2016-02-10 00:15:09 -05:00
Emmanuel Lepage Vallee cbea82f1c8 widget.background: Allow function as background image
There is already a hack into `awful.widget.common`. This system aim
to make the hack obselete while preserving the useful part.

I think this is also necessary to properly support SVG (with DPI
and resize).

Finally, Qt handle this using the QBrush concept, where you can have
programmatic patterns. Cairo doesn't have this concept, so there is no
"clean" way to have programmatic brushes.
2016-02-10 00:15:00 -05:00
Uli Schlachter 94e9a030c1 Remove gears.sort
It's unused since commit 0aa4304bda. Before this was a stable sorting
algorithm since table.sort is allowed to be unstable. Apparently we don't need a
stable sorting algorithm anymore.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-07 12:24:35 +01:00
actionless 801d297648 feat(awful: spawn): add 'easy_async' wrapper 2016-02-07 05:19:13 +01:00
Emmanuel Lepage Vallée 720768330c Merge pull request #664 from Elv13/background_border
widget.background: Add shape border support
2016-02-06 03:48:13 -05:00
Emmanuel Lepage Vallee 33c943d9b8 widget.background: Add shape border support 2016-02-06 03:43:42 -05:00
Uli Schlachter 7d32f7b733 tasklist: Unreference client in unmanage
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-04 18:24:53 +01:00
Uli Schlachter 69d96ba34d awful.titlebar: Unreference titlebars in unmanage
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-04 18:24:53 +01:00
Uli Schlachter 791794fa42 awful.titlebar: Fix memory leak with clients
Any awful.titlebar.widget.button widget (e.g. floatingbutton or closebutton)
decides on the currently visible symbol based on several factors. One of them is
"is the client currently focused?" and thus the button has to be updated when
the client is focused/unfocused.

The way the code did this was to use client.connect_signal("focus", f) and
client.connect_signal("unfocus", f). However, these signals are never
disconnected and kept alive forever. The callback function had a strong
reference to the client (as an upvalue) and thus this also prevented the client
from being garbage collected.

Fix this by using c:connect_signal("focus/unfocis", f) instead. These kind of
signals are only kept alive by the client object and don't prevent it from being
garbage collected.

This fixes the new test that the previous commit added.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-04 18:24:52 +01:00
actionless 8a9ae1a073 feat(awful: hotkeys widget): merge hotkeys with the same modifiers and descriptions 2016-02-04 13:14:45 +01:00
Emmanuel Lepage Vallée 19437930a2 Merge pull request #630 from Elv13/upstream_dynamic_p5
Multiple `wibox.layout` enhancements
2016-02-04 03:09:38 -05:00
Emmanuel Lepage Vallee 1f5dae8c18 awful.tag: Fix mistakes from cd0503f55 2016-02-04 00:14:51 -05:00
Emmanuel Lepage Vallee e615173552 layout.fixed: Add methods to manipulate the layout after creation
Until now, this layout was "append only". There was no official
APIs to remove, replace, insert and swap widgets. This is fine
for the usual wibox + sensors widget used by the majority of
users, but lack flexibility necessary to use the layout system
to place dynamic elements such as clients.

The methods introduced by this commit are also recursive. This
allow widgets to be decorated, wrapped and splitted without
having to add boilerplate code everywhere.
2016-02-03 04:01:38 -05:00
Emmanuel Lepage Vallee 330c8d97e1 layout.flex: Base on layout.fixed rather than widget.base
This remove duplicated code and will allow more "collection"
style layouts to be implemented without logic duplication.

This commit also do some small cleanup to remove duplicated
code now present in `awful.util`.

Fixes https://github.com/awesomeWM/awesome/issues/617
2016-02-03 04:00:56 -05:00
Emmanuel Lepage Vallee b2d121aa18 widget.base: Add ':index(w, r)' method
This function is optionally recursive. This allow to manipulate
abstract layouts without really having to care about the exact
hierarchy.
2016-02-03 04:00:56 -05:00
Emmanuel Lepage Vallee 8da5c79bb8 wibox.widget: Add new `get_children(recursive)` method to all widgets 2016-02-03 04:00:42 -05:00
Emmanuel Lepage Vallee 7a7f9f2b64 awful.util: Make 'util.table.merge' return the table
This avoid having to add a temporary variable when returning
from functions. Qt does the same.
2016-02-02 21:32:01 -05:00
Emmanuel Lepage Vallee 4556728b99 util: Add util.table.from_sparse
Go around a limitation of the lua language spec. The return value
of this method guaranteed `ipairs()` correctness.

Please note that both the official Lua and Luajit implementation
provide a sparse table compatible `ipairs()` and __len implementation
by default.
2016-02-02 21:31:56 -05:00
Emmanuel Lepage Vallee 3d2b31bbb9 util: Add awful.util.table.crush
Allow to replace copy pasted code used to apply class heritage in
much of wibox.widget
2016-02-02 21:31:24 -05:00
Emmanuel Lepage Vallee 348cd3a590 gears.shape: Add isosceles_triangle shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 0bf76dc984 gears.shape: Add powerline shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 4a44b0dc81 gears.shape: Add hexagon shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee a89b21ba2f gears.shape: Add arrow shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 1060a3487e gears.shape: Add rectangular_tag shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee a49b259c7f gears.shape: Add infobubble shape 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 704c028621 gears.surface: Add a method to create a surface from a shape
Useful for icons
2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 1d1e487d19 wibox.imagebox: Add a `clip` method based on the `gears.shape` API 2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee 98d8b8a199 gears.shape: Add a transformation mechanism
This allow to take a generic shape and transform it into a more
custom one without bloating the shape code.
2016-02-02 00:21:42 -05:00
Emmanuel Lepage Vallee a3b31089b1 gears.matrix: Add ability to attach a function
It is an internal API and is used by `gears.shape`, `gears.pattern`
and `gears.composition` only.

This commit also add `:rotate_at` and `:copy` methods.
2016-02-02 00:21:18 -05:00
Uli Schlachter ad4c62e639 Fix warnings from ldoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-30 10:43:41 +01:00
Emmanuel Lepage Vallee dc432eb7a6 widget.background: Fix error introduced in d01c1d2d6
Fix a copy/paste mistake.
2016-01-21 22:53:21 -05:00
Daniel Hahler cb267e56d5 Merge pull request #637 from psychon/set_markup
Make wibox.widget.textbox:set_markup() throw Lua errors less often
2016-01-20 00:01:09 +01:00
Emmanuel Lepage Vallée 7ffb238ae8 Merge pull request #633 from Elv13/upstream_dynamic_p4
layout: Support layout with a constructor
2016-01-18 22:47:56 -05:00
Emmanuel Lepage Vallée 2736c75e43 Merge pull request #632 from Elv13/upstream_dynamic_p3
awful.layout: Split the layout parameters computation from 'arrange'
2016-01-18 22:46:59 -05:00
Emmanuel Lepage Vallee 67132e904d awful.layout: Split the layout parameters computation from 'arrange'
It is necessary to have it beforehand when creating layout objects
for unselected layouts.

In the current layout system, there is no layout object, but to allow
tabs and dynamic tagging features like ion3, layouts cannot be stateless.
2016-01-18 22:44:22 -05:00
Emmanuel Lepage Vallée 123c3d4114 Merge pull request #631 from Elv13/upstream_dynamic_p2
tag: Refactor awful.tag.setproperty to call setters
2016-01-18 22:41:15 -05:00
Emmanuel Lepage Vallée 72d3065937 Merge pull request #638 from Elv13/upstream_shape_api
Upstream shape api
2016-01-18 17:51:58 -05:00
Emmanuel Lepage Vallée cbd366d1a1 Merge pull request #612 from Elv13/fix_awful.client_idx
awful.client.idx: Avoid error when called with a floating client
2016-01-18 17:39:43 -05:00
Emmanuel Lepage Vallee 81019487f0 awful.client.idx: Avoid error when called with a floating client
Before, it was the caller job to make sure the client wasn't floating.

This limitation is unecessary. awful.client.idx now return nil instead
of an error. awful.rules setting the master width factor are now
foolproof.
2016-01-18 17:35:33 -05:00
Emmanuel Lepage Vallee d01c1d2d6d widget.background: Allow background to have a shape 2016-01-18 17:22:49 -05:00
Emmanuel Lepage Vallee dd93418afb gears.surface: Add an helper to set a shape to drawable 2016-01-18 17:22:44 -05:00
Emmanuel Lepage Vallee fb0c82a798 gears.shape: Add a new module to make it easier to use shapes
This code is imported from Elv13 config and make it very easy
to create shaped objects.

If accepted upstream, other shapes, such as arrow and powerline
will also be added. This commit introsuce the 2 most common
shapes, rounded rectangle and rounded bar.
2016-01-18 17:20:32 -05:00
Emmanuel Lepage Vallée d202c1f1c2 Merge pull request #629 from Elv13/upstream_dynamic_p1
client: Add swapped, raised and lowered signals
2016-01-18 16:40:07 -05:00
Emmanuel Lepage Vallee b74b8ea0cd margin: Add an option to :fit() -> 0,0 when the content is empty
Make it easier to write "optional" widgets, like empty textbox
that can be filled only in certain scenarios.
2016-01-18 03:38:46 -05:00
Emmanuel Lepage Vallee cd0503f552 layout: Support layout with a constructor
This allow the most basic kind of stateful layouts to be created.
It is now possible to have layout instances instead of global
stateless layout arrange functions.
2016-01-18 02:12:19 -05:00
Emmanuel Lepage Vallee 55190646c4 client: Add swapped, raised and lowered signals
This allow layout "arrange" to be called less often and react on
the cause of the change itself rather than it's consequences
(usually, the "focus" signal).

Previously, the layout were re-arranged everytime the focus changed.
Now, with "raised" and "lowered", it require less "arrange".

"swapped" allow smarted layouts. Currently, swapped cause a full
re-arrange. It re-read the "index" list from scratch and create
a "new" layout. With "swapped", incremental layout changes are
possible.

Fixes https://github.com/awesomeWM/awesome/issues/616
2016-01-18 01:29:31 -05:00
Uli Schlachter 23d60b0659 gears.wallpaper: Remove some dead code
gears.surface now returns a fallback image surface that is good enough for what
this code tries to do here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 17:39:52 +01:00
Uli Schlachter de6d9334d8 wibox.drawable: Handle gears.surface's new error handling
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 17:39:32 +01:00
Uli Schlachter 0a21931ffc awful.client.shape: Fix for API change in gears.surface
A nil-value is no longer simply passed through, so this has to do some "special
things" to work properly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 17:34:44 +01:00
Uli Schlachter a2c1106401 gears.surface: Also apply default when called with "nil"
Before this, calling one of the loading functions with a nil argument always
made it return the default 0x0 surface. With this change, the passed-in default
value is now properly applied.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 17:33:39 +01:00
Uli Schlachter e7a8df2920 naughty: Follow textbox API change
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 16:51:07 +01:00
Uli Schlachter b3ab06896d awful.widget.common: Follow :set_markup() API change
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 16:50:03 +01:00
Uli Schlachter 178204449c Textbox:set_markup(): Print errors to stderr
Instead of throwing a Lua error, the code now just prints an error message to
stderr on invalid markup. For callers which want to handle this case specially,
we add :set_markup_silently() which returns error messages.

Fixes: https://github.com/awesomeWM/awesome/issues/546
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 16:47:27 +01:00
Uli Schlachter 62495daa66 Merge branch 'naughty-version' of https://github.com/psychon/awesome 2016-01-17 16:01:18 +01:00
Uli Schlachter 3793c339ce Merge branch 'surface-errors' of https://github.com/psychon/awesome 2016-01-17 16:01:03 +01:00
Uli Schlachter fd8d35cb12 Merge branch 'async-spawn-optional-callbacks' of https://github.com/actionless/awesome 2016-01-17 16:00:39 +01:00
Uli Schlachter ab5f9d3d74 Merge branch 'handle_long_colors' of https://github.com/psychon/awesome 2016-01-17 16:00:19 +01:00
Uli Schlachter 2ab98f5e4a Merge branch 'rgb-xresources' of https://github.com/actionless/awesome 2016-01-17 16:00:11 +01:00
Uli Schlachter 1aed092fea Merge branch 'util-getdir' of https://github.com/psychon/awesome 2016-01-17 15:59:54 +01:00
Uli Schlachter 79d3dc003a gears.color: Add support for named colors
Oh hey, Pango exports an API that allows to query for named colors based on the
famous rgb.txt! Let's use that!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 14:27:29 +01:00
Uli Schlachter 0956aa01d9 Add support for short/long colors
This adds support to gears.color.parse_color to parse things like "#fff" (one
character per color component, without alpha) and "#ffff0000ffff0000" (four
characters per component, with alpha).

This makes sense on its own, but should also help with
https://github.com/awesomeWM/awesome/issues/585.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 14:16:40 +01:00
Emmanuel Lepage Vallee ab0e3b6112 tag: Refactor awful.tag.setproperty to call setters
*WARNING* This introduce a minor API break as awful.tag.setscreen
arguments are now swapped for consistency

This allow to introduce logic for each properties and improve
awful.tag.add and execute logic when setting properties.
2016-01-16 03:46:38 -05:00
Daniel Hahler 0d1c98a314 Merge pull request #618 from actionless/titlebar-optional-tooltips
feat(awful: titlebar): make tooltips optional
2016-01-15 21:36:30 +01:00
Uli Schlachter 1367968824 naughty: Don't try to parse our version number
The code here doesn't always work, so it's best to just don't mess with
awesome.version, but return it directly.

Fixes: https://github.com/awesomeWM/awesome/issues/569
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 20:12:19 +01:00
Uli Schlachter 76b1d348a1 imagebox: Remove dead code
Since some commits, surface.load() handles printing an error message for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:53:09 +01:00
Uli Schlachter 9d97a98b4d naughty: Remove dead code
Since some commits, surface.load_uncached() handles errors itself and thus we
don't have to print an error message here any more.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:53:09 +01:00
Uli Schlachter 4d562306d2 taglist: Remove dead code
The image "library" is long gone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:43:56 +01:00
Uli Schlachter 86f2d05382 awful.menu: Remove useless surface() call
The imagebox calls surface() for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:43:10 +01:00
Uli Schlachter 58ecd92b8e Add better error handling to gears.surface
Previously, a Lua error was thrown when loading a file failed. Most callers are
not prepared for this and the result is less than optimal.

This commit makes the functions print the errors and return nil instead. For
callers that want to handle errors themselves, "_silent" variants of the
functions are introduced which just return errors to the caller.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:38:51 +01:00
actionless f19b38d45b fix(awful: hotkeys): caching on multiscreen setup 2016-01-14 17:57:55 +01:00
actionless e74eb9775b feat(awful: titlebar): make tooltips optional 2016-01-06 17:09:55 +01:00
actionless 7546c236db feat(spawn, lib: awful: spawn: with_line_callback): make callbacks optional 2016-01-03 15:38:06 +01:00
Uli Schlachter 720cd879f3 Add timestamps to messages on stderr (#602)
Closes https://github.com/awesomeWM/awesome/pull/606.
Fixes https://github.com/awesomeWM/awesome/issues/602.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-31 15:38:17 +01:00
Uli Schlachter 5cbd4402d9 awful.autofocus: Handle sticky clients (#603)
Closes https://github.com/awesomeWM/awesome/pull/610.
Fixes https://github.com/awesomeWM/awesome/issues/603.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-31 15:33:51 +01:00
Emmanuel Lepage Vallee bd8e2d2ca8 typo: replace 'wibox' with 'context' where relevant
Closes https://github.com/awesomeWM/awesome/pull/613.
2015-12-31 15:33:22 +01:00
Uli Schlachter 16994f3b12 Fix API documentation broken in eb8577a424
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-22 18:31:48 +01:00
Daniel Hahler 9031a81396 doc fixes to awful.menu.clients 2015-12-12 20:12:08 +01:00
Dario Gjorgjevski c5ad6069d4 Add an optional filter to `awful.menu.clients` 2015-12-12 20:12:08 +01:00
Daniel Hahler ae5d4b5512 Merge pull request #571 from psychon/scrolling_layout
Add a scroll layout
2015-12-12 20:01:32 +01:00
Daniel Hahler 833b10eb9b Merge pull request #593 from psychon/editorconfig
Vim modelines and editorconfig
2015-12-12 19:13:53 +01:00
Daniel Hahler 981987764e Merge pull request #586 from psychon/widget_funcs
Widgets: set_width / set_height
2015-12-12 19:13:28 +01:00
Daniel Hahler 69da6ee0db Merge pull request #576 from psychon/spawn_exit_code
At exit code support to spawn
2015-12-12 19:10:48 +01:00
Uli Schlachter 63653bed76 Add the right vim modeline to all lua files
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-12 17:42:33 +01:00
Uli Schlachter 469433e10a awful.spawn.with_line_callback: Use an arguments table
Having many arguments can easily get confusing and hard to understand. This
commit uses a table instead so that we have names that identify what each
callback does.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-12 17:27:33 +01:00
Uli Schlachter 20c9723c5b awful.util: Add getters for themes and icon paths
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:24:30 +01:00
Uli Schlachter 8953218e5c Use get_cache_dir() instead of getdir("cache") everywhere
Just because I like that function more. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:16:26 +01:00
Uli Schlachter 5a34f6f047 Add various functions for getting directories
This adds functions for getting directories according to the XDG base dir
specification. This might be useful in general.

This also adds a function for getting the cache dir, because I like an explicit
function call more than something which "switches" based on a string argument.
Better error messages if you mis-type something. :-)

Finally, this adds a function for getting the directory containing the rc.lua
file. Sadly, awful.util.getdir("config") did not actually do that. See #218.

Fixes: https://github.com/awesomeWM/awesome/issues/218
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:14:41 +01:00
Daniel Hahler e39504a30f Make textbox widget respect the current theme
Without this fix `wibox.widget.textbox` ignores current theme font
setting and resets it to the initial one.
It becomes handy when the initial theme is tweaked during runtime, ie.
in `rc.lua`. Other AwesomeWM components like `awful` (taglist,
tasklist, menu) are aware and do respect the actual theme settings.

Closes https://github.com/awesomeWM/awesome/pull/89.
2015-12-11 00:55:33 +01:00
Uli Schlachter ce965424c3 gears.object:weak_connect_signal: Use a weak-value table (#520)
Lua will remove objects as values from a weak table before these objects are
finalized, but as values only in the next garbage collection cycle after the
object was finalized. Up to now, gears.object uses a table with weak keys so
that :disconnect_signal() works. This means that a signal can still call methods
which were already considered garbage by the garbage collector and thus can use
userdata from the C side which was already finalized. Crashes and other bugs
result.

This commit changes the code so that the function is also a value in the weak
table. Thus, the GC will remove the entry before the object is finalized.

Special magic is needed for Lua 5.1, because there only userdata has the
behavior that we want while we have a function. We do some magic with function
environments to make this work...

Closes https://github.com/awesomeWM/awesome/pull/567.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-10 23:19:52 +01:00
actionless eb8577a424 feat(lib: menubar): dpi support in menubar
Closes https://github.com/awesomeWM/awesome/pull/580.
2015-12-10 23:18:43 +01:00
Barlik f6d08274a6 Use integer size when creating titlebar
Closes https://github.com/awesomeWM/awesome/pull/584.
2015-12-10 23:13:24 +01:00
actionless 2d7fc8bc49 feat(beautiful: xresources): read rgb: and argb: prefixed colors 2015-12-07 09:38:22 +01:00
ShadowKyogre 742cbd7122 Call :set_bg for the mouse finder's wibox
Before this, it was trying to assign it to `.bg`, which isn't how
backgrounds are stored on wiboxes.

Closes https://github.com/awesomeWM/awesome/pull/587.
2015-12-06 19:33:13 +01:00
Uli Schlachter f4077def8e Add :set_{width,height} to widgets (#291)
This adds new functions to all widgets that allow to force a specific
width/height. These values override the result from :fit().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-05 12:31:33 +01:00