Commit Graph

2474 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee ea52b199c6 tooltip: Add align support 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee ade3fabaa9 tooltip: Make the 'visible' property dynamic 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 2910a007df tooltip: Turn into a class
As done with everything else
2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 211907def2 placement: Add `next_to`
This commit add the last placement function imported from the
Radical module.

It allows to place a wibox/client next to another object. It tries
to find the best fit. It also support wibox widgets.

This is intended for tooltips and menus, but can also be used in
`awful.rules` to place the new client as close as possible to the
focused one without overlap.
2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee ce5cdb49ed mouse: Add the current_widget_geometry property
Apparently, __index cannot return multiple values, so the previous
code wasn't working.
2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 732b170cb0 doc: Fix the awful.widget.button documentation
It was missing the macros.
2016-08-20 15:41:12 -04:00
Emmanuel Lepage Vallee 370d333590 widget: Add recursive signals.
This allows to ignore containers and layouts when a signal is sent.
2016-08-20 15:41:12 -04:00
Emmanuel Lepage Vallee ec923e96fc layout: Add more signals. 2016-08-17 02:31:16 -04:00
Emmanuel Lepage Vallee 19d4a3f602 placement.under_mouse: Fix a rounding error.
When object size contains odd numbers, the result was +1px off.
2016-08-12 17:02:33 -04:00
Emmanuel Lepage Vallée e3c24c8e09 Revert "screen: Fix potential nil index" (#1037)
This reverts commit facf676b13.

Using capi.client.focus.screen to decide which screen is focused breaks
a multiscreen setup. At least makes it extremely annoying to use.

In particular, if you have a focused client on screen 1, move the mouse
to screen 2 and launch a new client, the new client appears in screen 1,
since screen.focused reports that current focused screen is 1, not 2
because of the focused client.

Close #1035
Fix #1029
2016-08-11 19:03:17 +02:00
cmertz f5f8998d0c use c:jump_to instead of client.jumpto 2016-08-10 13:02:02 +02:00
Emmanuel Lepage Vallee 220dc4c5e5 doc: Document titlebar arguments.
It was reported as incomplete on IRC.
2016-08-01 15:35:00 -04:00
Emmanuel Lepage Vallee facf676b13 screen: Fix potential nil index
This looks like a copy-paste error.
2016-08-01 15:29:02 -04:00
Emmanuel Lepage Vallee 41feec02a5 widget.base: Fix the root get_children_by_id() widget.
If the wibox root widget had an id, it was added to the properties,
but not the get_children_by_id() table
2016-08-01 15:26:29 -04:00
Emmanuel Lepage Vallee f20053bb33 awful.mouse: Fix 4 invalid function names 2016-07-30 15:49:46 -04:00
Emmanuel Lepage Vallée e472339011 Merge pull request #1013 from psychon/screen_area_signals
Screen area signals
2016-07-27 21:34:53 -04:00
Emmanuel Lepage Vallée 739ab8adc2 Merge pull request #1017 from juw/master
Change move and resize cursors
2016-07-27 21:33:35 -04:00
cmertz 4389297b58 restore client.border_width after fullscreen 2016-07-27 09:54:42 +02:00
Julian Wollrath ed34df119a Change move and resize cursors 2016-07-26 15:13:42 +02:00
Emmanuel Lepage Vallée 78171ea038 Merge pull request #1010 from Elv13/fix_declarative_widgets
widgets: Apply attributes before adding the widgets
2016-07-24 14:58:07 -04:00
Uli Schlachter 6e8b4f99f8 awful.layout: Move clients if a screen is moved
Fixes: https://github.com/awesomeWM/awesome/issues/976
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-24 16:36:03 +02:00
Emmanuel Lepage Vallee 79394c0965 widgets: Apply attributes before adding the widgets
For example, some layouts may place the widgets in a different order
depending on some attreibutes.
2016-07-23 17:24:13 -04:00
Emmanuel Lepage Vallee c159ad3ab2 drawable: Add more data to the find_widgets metadata table 2016-07-23 16:46:11 -04:00
Emmanuel Lepage Vallee 2e827202ec doc: Fix a matrix copy paste mistake 2016-07-22 21:55:23 -04:00
Uli Schlachter e6ddffda38 Fix awful.util.pread() return value (#1005)
The deprecation wrapper that we still have for this function didn't return
anything. However, awful.util.pread() used to return strings. This breaks
script.

Work around this by returning an empty string. That way code will still break,
but at least it should not error out.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-17 15:29:15 +02:00
Emmanuel Lepage Vallée 34cc04ec97 Merge pull request #972 from Elv13/prompt_fix
prompt: Fix hooks when number or caps lock are set
2016-07-16 22:59:54 -04:00
Emmanuel Lepage Vallee a87d75246f prompt: Fix hooks when number or caps lock are set 2016-07-16 22:39:06 -04:00
Uli Schlachter 2cfa117a14 Remove awful.{spawn.,}pread (#184)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-16 17:59:47 +02:00
Emmanuel Lepage Vallee 31e2a19f65 key: Make the ignore_modifiers table public
The prompt need to re-use it and Mod2 could be useful to toggle
between 2 different Awesome modes.
2016-07-09 20:01:17 +02:00
modk 45d555d473 Priority heap to sort menubar entries by execution count (#879) 2016-07-09 19:23:36 +02:00
Daniel Hahler 25b6d31e97 Merge pull request #994 from psychon/fix-drawable-bgimage
Fix drawable bgimage
2016-07-09 19:17:48 +02:00
Uli Schlachter 2e13c120e8 Make rules with 'tag = "3"' work with multiple screens (#992)
The default config creates the same set of tags for all screens ("1" to "9"). An
awful.rules-rule with e.g. screen = 2, tag = "3" should obviously tag matching
clients with tag "3" of the second screen.

However, the implementation used the first matching tag in the list of all tags
and thus the client ended up tagged with tag "3" from screen 1. Fix this by
calling find_by_name() with the screen that the client is assigned to.

The existing implementation of awful.rules guarantees that any
"screen"-properties are applied before the code touched by this commit is run,
thus this should always work.

This commit does not add a test catching this because we are currently quite bad
at testing multi-screen scenarios and I don't want to invent the necessary
machinery right now.

Fixes: https://github.com/awesomeWM/awesome/issues/988
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 19:17:35 +02:00
Uli Schlachter 1a5680e57a Fix the titlebar minimize button (#995)
Commit 0318c6132840413b1f added an image for the minimize button which was
missing before. However, only the default theme and xresources where fixed to
contain the path to the image.

This commit adds the path to all themes.

Also, minimized clients aren't visible, just as closed (=killed) clients aren't
visible. Thus, we don't need an "active" version of this image.

This commit makes us handle the image for the minimize button just like we
handle the close button: There is no difference between "active" and "inactive"
and the file path in the theme doesn't get any path suffix.

Fixes: https://github.com/awesomeWM/awesome/issues/387
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 19:06:13 +02:00
Uli Schlachter 7f74c7c859 drawable: Draw bgimage with operator OVER
The actual bg is drawn either with fake transparency over the wallpaper (this
uses operator OVER) or for true transparency with operator SOURCE. The bgimage
should be drawn ontop of this without erasing the background and thus needs
operator OVER.

However, before this commit the bgimage was drawn in the same way as the bg and
thus inherited its SOURCE operator if a compositor is running. Fix this by
restoring the default operator (OVER) and also e.g. the default source before
drawing the bgimage.

Fixes: https://github.com/awesomeWM/awesome/issues/954
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 10:30:36 +02:00
Uli Schlachter d4454aba15 Fix drawable:set_bgimage()
When called with the file name of an image, this function failed to turn that
file name into a cairo surface.

Fixes: https://github.com/awesomeWM/awesome/issues/954
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 10:29:05 +02:00
Emmanuel Lepage Vallee 441587a4de shape: Use an explicit move_to to set rounded_rect position
All other shape did it. While it usually have no side effects,
as seen in #920 screenshot from @actionless, there is instances
where this produce a invalid rectangle.
2016-07-04 14:34:41 -04:00
Emmanuel Lepage Vallee 722879bcf7 mouse.resize: Handle when there is no selected tag
This should be very rare, but _is_ possible.
2016-06-27 02:44:07 -04:00
Emmanuel Lepage Vallee 4e6283e5ad layout: Avoid uneeded redraw
Reflowing the screen layout when floating clients changes is not
necessary.

This lower the CPU usage when dragging floating clients.
2016-06-27 02:44:07 -04:00
Emmanuel Lepage Vallee 6eca36d764 progressbar: Add missing includes documentation variables 2016-06-24 15:59:02 -04:00
Salorium b0d42e258a Correct name variable: this typo introduced into in 03e2310c54 2016-06-18 17:42:27 +02:00
Emmanuel Lepage Vallée f5cfc03e49 tag: Fix restoring invalid tags from history (#963)
If:

 1) An app is open in a tag
 2) A new tag is created
 3) The app is closed in the first tag
 4) The first tag is deleted
 5) The new tag is deleted

Then this history would try to restore an inactive tag without
a screen. Bad things will then happen.
2016-06-12 13:09:09 +02:00
Emmanuel Lepage Vallée d4dc579105 resize: restore the fleur cursor and add a beautiful option (#957)
Fixes #956
2016-06-10 23:53:55 +02:00
Uli Schlachter 2d511e2ab5 gears.object.properties: Implement read-only properties
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:31 +02:00
Uli Schlachter cdf16d4660 awful.mouse: Implement read-only properties
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:30 +02:00
Uli Schlachter 6956b9f6fa gears.object: Implement read-only properties
If a getter exists, but there is no setter, then this means that the property is
read-only.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:30 +02:00
Daniel Hahler d9cd0a4f0e Merge pull request #948 from psychon/deprecate-add-signal
Deprecate add_signal
2016-06-07 22:58:14 +02:00
Daniel Hahler efb8e65b15 Merge pull request #886 from psychon/fake-screen-resize
Fake screen resize
2016-06-07 21:13:35 +02:00
Emmanuel Lepage Vallee a057718d4d mouse: Fix moving clients between screens
Reported on IRC. I am not sure why swap() is not enough, but the
old code removed before the mouse refactor did this, so apparently
it is necessary.

The fix has been reported to work by spyroboy on IRC, thanks!
2016-06-06 00:23:48 -04:00
Uli Schlachter b84b03f15d Fix client snapping (#951)
First some reminder on how client geometries works (in X11, awesome just copied
that!):

- The position (x,y) defines where the border of the client begins
- This means that the content starts at (x+border_width,y+border_width)
- However, the size is the size of the client without border
- Thus, the client covers the rectangle from (x,y) to (x+2*bw,y+2*bw)

The client snapping code got this wrong. It only deals with rectangles and thus
for things to work as expected, the width/height have to be increased by two
times the border width. When snapping a client against other visible clients,
the geometry of the client to snap against wasn't calculated correctly.

This was apparently noticed at one point and worked around by decreasing the
position by two times the border width. While this is terribly wrong, it
actually makes things work correctly when snapping to the right or bottom edge
of a client, but breaks for the other edges.

Fix this by just calculating things correctly.

This is based on a patch from jk411.

Fixes: https://github.com/awesomeWM/awesome/issues/928
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-05 22:00:11 +02:00
Max 8ff60f034f Try menu_* colors before regular normal/focus (#949) 2016-06-05 17:08:43 +02:00
Uli Schlachter 0857f6f1b5 Lua: Remove calls to add_signal()
The requirement to call add_signal() was added to catch typos. However, this
requirement became increasingly annoying with property::<name> signals and e.g.
gears.object allowing arbitrary properties to be changed.

All of this ended up in a single commit because tests/examples fails if I first
let add_signal() emit a deprecation warning.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 18:23:48 +02:00
Uli Schlachter a7f7cab564 wibox: Remember the screen that was assigned
If screens overlap, the wibox should still remember which of the possible
screens it is assigned to.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 17:39:51 +02:00
Daniel Hahler 51ce375f01 tooltip: improve doc, call self.timer_function with self (#381) 2016-06-03 00:40:02 +02:00
Emmanuel Lepage Vallee 36bb9b4476 menu: Fix regression
There was already a bug, as self.active_child.visible
was used instead of self.active_child.wibox.visible

This caused some confusion that this attribute was a widget.
It wasn't.
2016-05-31 14:32:07 -04:00
Emmanuel Lepage Vallee 756862dff6 systray: Use table.crush 2016-05-30 23:12:49 -04:00
Emmanuel Lepage Vallee cbe046b0db progressbar: Add theme options 2016-05-30 23:10:03 -04:00
Emmanuel Lepage Vallee 7c00b2a55a graph: Add theme options 2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee f9ff2f4909 stack: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 23729b6296 flex: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee eddbbf7aca ratio: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 0a8bc8156d align: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee b89fbcf940 fixed: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 18500838d9 textclock: Add missing documentation 2016-05-30 23:10:02 -04:00
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 584a48db2f titlebar: Use _private 2016-05-30 23:09:50 -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 490306a5fc shape: Add default rounded_rect radius
Add an arbitrary value to avoid all caller setting extra arguments.
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 44a4eca40e doc: Port the shape images to the doc example system 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 990beef9d0 util: Add a class deprecation function. 2016-05-30 17:51:18 -04:00
Emmanuel Lepage Vallee 3f0d218f72 util.table.crush: Optionally use rawset 2016-05-30 17:51:18 -04:00
Emmanuel Lepage Vallee dbcb850de9 wibar: Restore previous behavior
The behavior was changed during the rewrite. This was a mistake
as it was assumed (wrongly) that nobody used this function with
wiboxes other than "wibars" (awful.wibox).

Fixes #917
2016-05-19 13:27:46 -04:00
Emmanuel Lepage Vallee cc5e78ff55 wibar: Improve constructor documentation 2016-05-19 01:27:05 -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
actionless 938de72ba7 fix(awful: wibar): visible arg was ignored 2016-05-19 00:21:22 +02:00
Emmanuel Lepage Vallée 3fd292e1ff Merge pull request #912 from Elv13/fix_tag_delete_race
tag: Avoid a race condition when deleting tags.
2016-05-18 16:01:30 -04:00
Emmanuel Lepage Vallee 6e6c4c3a5d tag: Avoid a race condition when deleting tags.
Since the screen removal patchset, the tags properties were
cleaned too early. This caused code connecting to "property::activated"
to be called with the tag already partially deleted. For code depending
on those properties, such as radical.impl.taglist, this caused errors.
2016-05-18 15:46:09 -04:00
Emmanuel Lepage Vallée c1d3f291fe Merge pull request #913 from Elv13/gear_obj_props
Gear.object properties
2016-05-18 15:20:43 -04:00
Emmanuel Lepage Vallee bb5ee50de9 layoutbox: Revert 25f4f24791
Apparently, there is such thing as not leaking enough...

Also try to clear the widgets from mywibox. This seem to help.

Time will tell.

Fixes #914, unfixes #808
2016-05-18 01:45:21 -04:00
Emmanuel Lepage Vallee d6a7b6c645 object: Add a dynamic property example 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee f810d78e7b object: Add a signal example 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee adebef629b object: Add an header description 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee b1c33fbd09 object: Add type information to documentation 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee 4b21ca9184 object: Add dynamic properties support.
Similar systems already exist un luaobject, wibox and the declarative
widget system. This close the gap and also bring the property based
syntax to wibox and other gears.object users.

While this need to be enabled explicitly for legacy reasons, it
doesn't break the API.

Once widespread, this implementation will replace the one found
in wibox.widget.base_widget.
2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallée 32eeaa9513 Merge pull request #878 from Elv13/geometry_overhaul_p3.02
Geometry overhaul part 3.02: Wibars
2016-05-16 14:13:38 -04:00
Emmanuel Lepage Vallee 11e77d5191 gears: Remove `screen`
It has been deprecated for a while and was never part of a release.
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee aa46b96369 gears.geometry: Add area_remove 2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 1ce92bb550 get_rect_by_dir: Move to `gears.geometry`
Begin to break down `awful.util`
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 1a05d53cab screen: Use `gears.geometry` 2016-05-16 14:03:00 -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 9d13e08c63 gears: Add a geometry modules
Add an abstract geometry module to `gears`
2016-05-16 01:18:19 -04:00
Daniel Hahler eea8de5057 Merge pull request #899 from Jajauma/naughty-action-text
naughty: display improvement of the notification client actions
2016-05-16 03:08:22 +02:00
Emmanuel Lepage Vallee 4b395bea81 mouse: Port wibox.move to the placement API 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 38185b161a wibar: Add a remove function 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee dafd29f2a3 awful.wibox: Rename to awful.wibar
Why:

 * Two different (but related) concepts had the same name
 * Users were confused for years on IRC
 * The wibar name was already in use in some doc to avoid confusion
2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 7d390a91f1 awful.wibox: Import some wibox documentation. 2016-05-15 17:17:12 -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 833ad952f6 awful.wibox: Port to the placement API 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 50c97ed167 placement: Add a callback to detach the placement function 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 21c9766aa6 placement: Fix under_mouse
The function stopped actually setting the geometry...

This was missed by tests because of an oversaw elsewhere.
2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 45ff7efce5 placement: Support 'attach' in composited placement functions 2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee e78a07574b placement: Do not forward the args in get_parent_geometry
The args are for 'd', not the parent.
2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee c490ca3803 placement: Fix margin support
This was only partially implemented. The margins were substracted from
the area too early in the pipeline. Now, they are added when getting
the size and substracted when setting it. This way, the margins will
"survive" when a placement function set an absolute value in one of
the field. Previously, this caused one (or more) of the margins to
be lost.
2016-05-15 17:17:11 -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 43ef623dc6 client: Add x, y, width and height properties 2016-05-15 17:15:55 -04:00
Emmanuel Lepage Vallee 25f4f24791 layoutbox: Fix a leak with Lua 5.1 and luajit
Fixes #808
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
Emmanuel Lepage Vallée f9fa8538b9 Merge pull request #909 from psychon/screen-getbycoord
Fix awful.screen.getbycoord
2016-05-15 16:02:03 -04:00
Jajauma 4d7e8c804e naughty: change action markup to emphasize clickability
This commit changes the markup applied to the action description text to
emphasize the fact that the action zone is actually clickable. Bold is
replaced with underline, the Unicode 261B symbol (right pointer) is
added as well.
2016-05-15 18:46:09 +03:00
Jajauma b1dbbb0041 naughty: display the client-supplied localized action description in UI
According to the Desktop Notification specification document [1] the
clients supply actions available along with a notification in a form of
a list of pairs where first element is an identifier of an action and
the second is a localized message that will be displayed to the user.

Up to now the naughty code directly used the action identifier text as a
part of the notification layout exposed to the user. This commit makes
use of a localized action description for that purpose.

1) https://developer.gnome.org/notification-spec/
2016-05-15 18:43:25 +03:00
Uli Schlachter 7d792cea7d Merge branch 'allow-to-disable-history-tracking' of https://github.com/awesomewm/awesome 2016-05-15 16:47:57 +02:00
Uli Schlachter 8b3f263de3 Merge branch 'traceback-with-failed-to-load-error' of https://github.com/blueyed/awesome 2016-05-15 16:31:14 +02:00
Uli Schlachter c71b3d9f38 Merge branch 'wallpaper-while-randr-change' of https://github.com/psychon/awesome 2016-05-15 16:16:40 +02:00
Uli Schlachter ae738db58a Fix awful.screen.getbycoord when no screens exist
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-15 14:43:25 +02:00
Uli Schlachter 13bce88fa0 Fix awful.screen.getbycoord() for top-left corner of a screen
The problem was that get_square_distance() made the screen one pixel larger to
the bottom/right than it really was. Thus, the (x+0,y+0)-pixel of a screen that
was below or to the right of some other screen had distance zero to both of
these screens.

This commit fixes the screen size computation and adds a small unit test for
getbycoord() and get_square_distance().

Reported by Elv13 here:
https://github.com/awesomeWM/awesome/pull/878#issuecomment-219272864

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-15 14:40:00 +02:00
Daniel Hahler 11f3c7b8af awful.client.history: allow to disable history tracking
Based on the code from Uli Schlachter at
https://github.com/awesomeWM/awesome/issues/572#issuecomment-160080378.

Fixes https://github.com/awesomeWM/awesome/issues/572.
2016-05-14 17:42:01 +02:00
Daniel Hahler c25c0527a6 gears.surface: add a traceback for "Failed to load" errors
This is useful to see where the error is coming from.
2016-05-11 21:50:02 +02:00
Emmanuel Lepage Vallee ca02ec1bbe widget.button: Release the button when the mouse leave
This isn't correct, but it avoid a bug where the button stay
pressed forever if the mouse leave while it's pressed.
2016-05-10 16:06:46 -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 c62da0dcc7 Merge branch 'fake-screen2' of https://github.com/psychon/awesome 2016-05-09 18:40:50 +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
Uli Schlachter aed571eb48 gears.wallpaper: Handle concurrent screen changes
The code in gears.wallpaper currently sets a wallpaper in a deferred fashion.
Only a while after it is told to do something does it actually do the wallpaper
change. This is to incorporate many wallpaper changes right after another. These
changes happens during startup where the wallpaper for each screen is set one
after another.

However, since we no longer restart on RandR changes, the screen configuration
could change while we have a pending wallpaper. In this case, part of the
wallpaper could be "chopped off", because the surface that we draw the wallpaper
to is too small.

This commit makes gears.wallpaper track the size of the pending wallpaper and
create a new surface if the already-pending one is too small.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 17:48:40 +02:00
Uli Schlachter 5b9509d612 naughty: Delete a screen's notification on removal
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 15:01:06 +02:00
Uli Schlachter 5b1f8cd35c Emit more signals when removing a screen's tags
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 15:01:05 +02:00
Uli Schlachter 975aac5c0c awful.tag: Delete a screen's tag on removal
Any clients with these tags end up somewhere random (the first tag on the first
remaining screen). This certainly can be improved in the future, but at least
this is a start.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 851e0065fe awful.tag.object.delete: Delete a tag's data
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter a641d88d4e awful.tag.object.delete: Add option to force deletion
When this force-argument is not given, the code will refuse to delete a tag
which has a non-sticky client. With this force argument, the client will just be
moved to the fallback tag.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 962a73c18c awful.tag.object.delete: Remove dead code
The case fallback_tag == nil was already checked some lines above.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter b0038c8ddb awful.autofocus: Skip invalid screens
This code uses delayed calls to lazily update things. Thanks to this, it can try
to update a screen long after it was removed. Fix this by just doing nothing on
invalid screens.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter bc9b3ca751 tasklist: Stop updating after a screen was invalidated
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 5390913f5a taglist: Stop updating after a screen was invalidated
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Emmanuel Lepage Vallée 504018343b Merge pull request #873 from Elv13/geometry_overhaul_p3.01
Geometry overhaul p3.01
2016-05-05 16:23:11 -04:00
Emmanuel Lepage Vallee 3945f13fc4 placement: Fix an semi-infinite loop when attaching to geometries
It would add a new connection each time and eventually get very
slow.

An regression test will be published later.
2016-05-04 23:47:44 -04:00
Emmanuel Lepage Vallee 58ecc69af8 mouse: Add 'current_widget' 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee cf0a4b42b4 mouse: Add `current_widgets` 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee 81064daa42 doc: Fix find_widgets() doc. 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee c1fc222d89 mouse: Fix `current_wibox` 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
Daniel Hahler 7bd9cd7fd1 doc: fix usage of "mouse.move" as a string (#871)
Ref: https://github.com/awesomeWM/awesome/issues/834#issuecomment-216141389.
2016-05-03 12:06:50 +02:00
Daniel Hahler 6b6cbf4a1f Merge pull request #828 from psychon/screen-scan2
Stop restarting on RandR changes
2016-05-01 17:00:05 +02:00
Daniel Hahler e4623d0e20 Merge pull request #864 from psychon/menubar-query-file-type
menubar.utils.parse_dir: Ask Gio for file type
2016-05-01 16:56:07 +02:00
Uli Schlachter 9a42ae87cf awful.wibox: Handle screen removal
When a screen is removed, awful.wibox now hides all wiboxes that it created for
this screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:12:04 +02:00
Uli Schlachter ac81a8df1f c.to_selected_tags(): Handle screenless clients
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Emmanuel Lepage Vallée dbd0931343 Merge pull request #844 from Elv13/geometry_overhaul_p2
Geometry overhaul part 2.5
2016-04-30 23:29:29 -04:00
Uli Schlachter a37f12c0a1 menubar.utils.parse_dir: Ask Gio for file type
When not including standard::type in the query for children of a file then Gio
may not look up this information. This might work on some file systems (e.g.
ext4), but other (apparently XFS) do not provide the needed file type
information (see man readdir on the d_type field). The result was that the
menubar contained no entries because no .desktop files were identified as
regular files and thus read.

Fix this by including standard::type in the queries.

Also, this commit makes the code use some pre-defined string constants from Gio
to make "double sure" that typos are caught.

Thanks to @Jajauma for doing the hard part on debugging this.

Fixes: https://github.com/awesomeWM/awesome/issues/863
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-30 19:23:46 +02:00
Emmanuel Lepage Vallee 3dab42e6a2 mouse: Restore support for layouts with their own mousegrabber 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee cd632e4a84 mouse.dragtotag: Fix and port to the new move API
It wasn't really working as it would in other WM. It might have
been a feature, but I got the behavior in line with KDE and Gnome.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee a62e749216 mouse.snap: Add some configuration options 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e31563b056 mouse.move: Return the corner 2016-04-30 04:27:34 -04:00