Emmanuel Lepage Vallee
c62ca6c665
imagebox: Enable the property system
...
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee
5a0f7b7efe
textbox: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
ea16481228
graph: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
03e2310c54
scroll: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
4ffbff3a5f
rotate: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
bf74ca8a8c
mirror: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
8869257940
margin: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
832e9ed054
constraint: Enable the property system
...
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
a5edff396c
background: Add the common object documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
9630f3c3ed
widget: Move the identifier index into _private
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
fdf86ba84d
widget: Move height and width into _private
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
c0eabf9d8f
widget: Move 'visible' into _private
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
afa17fd8f9
widget: Move 'widget_buttons' into _private
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
c828e56b57
widget: Fix documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
542070205f
widget: Add proper accessors for the 'opacity' property
...
To avoid collision with the property system and comply with the
API guidelines.
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
eb79b3262d
background: Enable the property system
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
c9dd32424f
doc: Fix wibox.widget.base documentation
...
It was set as `module` instead of `class` because ldoc was confused
set shown the methods as functions and functions as methods.
This commit set the explicit section so ldoc don't gress (wrongly)
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
f9e82c1f57
background: Move all private attributes into _private
...
So there is no collision when properties are enabled
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
adb2f88383
objects: Add a table for private elements
...
Provide a standardized place for them rather than having each
widgets use their own conventions.
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
efcbda0a78
widget.base: Add property support
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
a8505ed019
doc: Add an imagebox widget default screenshot
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
83a9a9e67a
doc: Add a progressbar widget default screenshot
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee
f29eeed82e
doc: Add a graph widget default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
ec2cfc7be2
doc: Add a textbox widget default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
ab40a342af
doc: Add a stack layout default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
163748c782
doc: Add a ratio layout default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
7fa56cb94c
doc: Add a flex layout default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
150026690c
doc: Add a fixed layout default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
5ba7af2be2
doc: Add an align layout default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
47a471072a
doc: Add a `margin` default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
26cf28b23b
doc: Add a `constraint` default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
de7ae79c6c
doc: Add a `background` default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
46c83b4001
doc: Add a `mirror` default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
ab0a9a077e
doc: Add a `rotate` default screenshot
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee
bc2c0cfcb0
doc: Add a wibox.container.rotate example
...
Also fix the documentation
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
3c2aa09b86
doc: Document the beautiful vars used by the systray and textbox
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
9d0693ce3a
doc: Do not export draw, fit and layout methods
...
They are used internally, users should never call them.
This will make the API documentation cleaner.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
be23bf0f15
widget: Fix documentation
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
fd3e27c38b
containers: Fix documentation
...
local functions and metatable based constructors are not
documented unless an explicit @function is added.
Also add missing return values and fix formatting.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
f9c9e11d11
graph: Move to wibox.widget
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
6493cbee76
progressbar: Move to `wibox.widget`
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
ae0d306114
textclock: Move to wibox.widget
...
It doesn't depend on `awful`, so it doesn't belong in `awful`.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
feb3833fd1
doc: Move the background examples to the container suit
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
d85588babe
wibox: Create a container module
...
Previously, the "containers" were placed in layout or widget.
They all have similar APIs and usage, so lets bring them together.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee
4d45063adb
wibox: Add constructor documentation
...
The leading point is on purpose. It work around a ldoc bug and is
already used elsewhere (like signals without a ::)
2016-05-19 01:27:05 -04:00
Emmanuel Lepage Vallee
f26fa5e099
wibox: Add more constructor arguments
...
Fixes #916
2016-05-19 01:27:05 -04:00
Emmanuel Lepage Vallee
dd121623b5
gears.geometry: Mutualize getbycoord
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee
251614afff
wibox: Remove the dependency on `awful`
2016-05-16 01:18:28 -04:00
Emmanuel Lepage Vallee
77380eb121
wibox: Move the documentation to a shared file
...
To be re-used by wibars, tooltips and menus
2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee
a141dbfd06
wibox: Add screen properties
2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee
129b3b1d50
wibox: Add wibox property support
...
Just like the miss handler system, but for wiboxes.
This will simplify the API as there was a mix of properties
and accessors in the API doc.
2016-05-15 17:17:09 -04:00
Emmanuel Lepage Vallee
9a72062cac
wibox: Turn into "real" objects.
...
Before this commit, it was necessary to call 'rawset' to be
able to add new fields to the wibox. This is no longer required.
This solution was choosen because wibox is itself a base class of
menus and wibars. Those classes can now add new properties without
hacks.
2016-05-15 17:15:55 -04:00
Emmanuel Lepage Vallee
df6bc2f6bc
wibox: Make the table argument optional
...
For consistency with other objects.
2016-05-15 17:15:55 -04:00
Uli Schlachter
a6d61ed39e
Merge branch 'doc_shared' of https://github.com/Elv13/awesome-1
2016-05-09 18:42:49 +02:00
Uli Schlachter
4c9280d2bb
Merge branch 'no-screens' of https://github.com/psychon/awesome
2016-05-09 18:40:35 +02:00
Emmanuel Lepage Vallee
b0571a8128
stack: Use the shared documentation and fix the doc
2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee
f8845fd970
ratio: Use the shared documentation and fix the doc
2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee
76cb62a744
flex: Use the shared documentation and fix the doc
2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee
533a4bfd8f
fixed: Use the shared documentation and fix the doc
2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee
81064daa42
doc: Fix find_widgets() doc.
2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee
baf290a8b2
drawin: Add a get_wibox function
...
As wibox contain a drawin, but isn't one, it is necessary to map
drawin to wibox.
This could eventually be fixed by turning wibox into drawin just
like the client, tag and screen do.
2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee
5404b3c374
drawin: Add a property miss handler
2016-05-04 16:37:39 -04:00
Emmanuel Lepage Vallee
1a114e4e57
wibox: Import drawin documentation
...
This improve consistency.
2016-05-03 17:12:54 -04:00
Uli Schlachter
ede88d8bce
Fix awful.screen.getbycoord when no screens exist
...
When there are no screens, screen[1] causes an error. Thus, this isn't a safe
fallback for these functions. Instead, this commit makes the code prefer the
primary screen, if possible. If no screen exists, then screen.primary will be
nil, but at least it won't throw an error like screen[1] does.
(This also changes the outdated copy of getbycoord that exists in
wibox.drawable)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-28 17:42:15 +02:00
Daniel Hahler
3e5b1b3ba9
Merge pull request #782 from psychon/wallpaper-change
...
Changes to wallpaper change
2016-04-03 18:35:27 +02:00
Emmanuel Lepage Vallee
c64c223ede
tests: Improve wibox.widget.background documentation
2016-03-31 04:45:46 -04:00
Emmanuel Lepage Vallee
e7652a053d
tests: Add a new testing framework
2016-03-31 04:45:45 -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
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 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 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
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
dc687c0e31
wibox: Clone missing signals
2016-03-12 21:18:09 -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
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
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 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
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
Daniel Hahler
f874b0ad2e
Merge pull request #712 from psychon/protected_calls
...
Protected calls (gears.protected_call)
2016-02-28 22:16:13 +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
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
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
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
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
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
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
Daniel Hahler
58954f7f08
Merge pull request #675 from psychon/remove-gears.sort
...
Remove gears.sort
2016-02-11 21:51:44 +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 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