Commit Graph

1001 Commits

Author SHA1 Message Date
Uli Schlachter 008cae50b2 awful.widget.keyboardlayout: Rename private members
I'm working on something that adds :layout functions to widgets. This clashes
with the keyboardlayout widget's use of an entry with this name. This change
adds an underscore as a prefix to the private data members of the
keyboardlayout.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-11 12:44:48 +02:00
Daniel Hahler 9883d3484d titlebar: add tooltips for icon buttons
This uses the button name in the tooltip's text.
2015-08-02 15:36:54 +02:00
Daniel Hahler 14e63fbcd7 awful.tooltip: do not hide when entering its wibox
Because of `placement.under_mouse` (and without
`placement.no_offscreen` fixing it), this will cause the tooltip to hide
immediately again.

There is no need for hooking into this signal, but this adds a click
handler to close the tooltip when clicking into it.
2015-08-02 15:36:54 +02:00
Daniel Hahler a8d224ef5c doc: fix for set_markup 2015-08-02 15:36:54 +02:00
Daniel Hahler 6880835c26 tooltip: delay_show: stop timer, handle (non-)stopped timers
This splits the logic for `delay_show` out of `show`/`hide`, and handles
an already stopped timer.  The timer gets also stopped after the tooltip
has been displayed.

Ref: https://github.com/awesomeWM/awesome/issues/371.
2015-08-02 15:36:54 +02:00
Daniel Hahler 9bcd87c727 awful.tooltip: skip set_geometry if not visible
`set_geometry` will be called in `show`, and is not necessary when the
tooltip is not visible.
2015-08-02 15:36:54 +02:00
Daniel Hahler 0ea2bbb126 awful.menu: use beautiful.xresources.apply_dpi for margins 2015-08-01 17:47:51 +02:00
Daniel Hahler 4a3589aad4 widget.common.list_update: improve margins (dpi / imagebox)
Use `beautiful.xresources.apply_dpi` for `common.list_update`'s textbox
margins, and add a left margin for the imagebox, too.

The latter is useful/nicer with the default behavior of an inverted
style for the focused tasklist entry.
2015-08-01 17:39:48 +02:00
Daniel Hahler 896ab0a286 Merge pull request #376 from blueyed/more-tostring
More tostring metamethods for drawable and wibox
2015-08-01 11:22:04 +02:00
Daniel Hahler 430e8664be wibox.drawable: add __tostring meta method 2015-08-01 11:21:50 +02:00
Daniel Hahler 475b469f96 doc: tooltip: add type/optional information
Closes https://github.com/awesomeWM/awesome/pull/379.
2015-08-01 11:14:06 +02:00
Abdo Roig-Maranges 3942672d31 Fix missing parenthesis to a call of screen.focused
Closes https://github.com/awesomeWM/awesome/pull/370.
2015-07-29 18:47:34 +02:00
Uli Schlachter 0713e2e50d Add a missing "_" in "__newindex"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-28 21:29:05 +02:00
Daniel Hahler b08d3caba8 awful.widget.layoutbox: add tooltip with the layout's name
Closes https://github.com/awesomeWM/awesome/pull/322.
2015-07-28 19:31:26 +02:00
Daniel Hahler 355e4696ba Preserve old mousegrabber behavior (additionally)
18f6ab1 changed the behavior when resizing floating clients using the
mouse (via modkey + RMB).

Previously, you could initiate the mousegrabber using e.g. "modkey +
RMB", release the key and button, and resize the window using the left
mouse button.

This restores this behavior by canceling the mousegrabbers only if the
cursor was moved, without _any_ mouse button being pressed.

Fixes https://github.com/awesomeWM/awesome/issues/309.
Closes https://github.com/awesomeWM/awesome/pull/310.
2015-07-28 13:09:50 +02:00
Daniel Hahler fc950f6921 Fixes to awful.client's lazy-loading of awful.screen
At least awful.client.getmaster was broken:

> lib/awful/client.lua:450: attempt to index global 'awful' (a nil value)

This uses a metatable to simplify handling the cyclic dependency to
`awful.screen`.

Follow-up to cbe684e (https://github.com/awesomeWM/awesome/pull/94).
Closes https://github.com/awesomeWM/awesome/pull/334.
2015-07-27 13:59:47 +02:00
Daniel Hahler 6d323e7c04 doc: distinguish between client.object and client.class
Instead of `client.client`, the client object is now referred to as
`client.object` and the client class as `client.class`.

This moves the documentation of `client.focus` to the class.

Closes https://github.com/awesomeWM/awesome/pull/349.
2015-07-26 00:45:38 +02:00
Daniel Hahler 410a6e5bb2 Merge pull request #155 from silverhammermba/pango_color
Replace color_strip_alpha with check_pango_color
2015-07-25 23:26:22 +02:00
Daniel Hahler 0af7ce375a awful.client: add support for stacking order
This adds a `stacked` boolean argument to `awful.client.visible`, and
(relevant) callers of it.

This can be used with e.g. `awful.client.swap.bydirection` to swap clients
based on their stacking order.

Fixes https://github.com/awesomeWM/awesome/issues/178.
2015-07-25 18:55:36 +02:00
Daniel Hahler 292b95da01 awful.util.deprecate: add source function name to warning
Closes https://github.com/awesomeWM/awesome/pull/342.
2015-07-25 15:39:57 +02:00
Daniel Hahler f12f9b3b97 spawn: improve doc, and add `sn` for `awful.util.spawn_with_shell`
Closes https://github.com/awesomeWM/awesome/pull/347.
2015-07-25 15:16:23 +02:00
Daniel Hahler b28cda2ac6 beautiful.xresources.apply_dpi: use `math.ceil`
Closes https://github.com/awesomeWM/awesome/pull/330.
2015-07-24 01:52:51 +02:00
Daniel Hahler f060fc055f awful.widget.tasklist: reset queued_update before tasklist_update
This will reset it properly in case of any error in the callback itself.
2015-07-22 13:52:47 +02:00
Daniel Hahler aca856b5d2 keygrabber.grabber: rename function name
This makes it clearer / more explicit in the traceback in case of
errors.
2015-07-22 13:52:47 +02:00
Daniel Hahler cbe684efd1 Add awful.screen.focused [FS#1029]
This allows to configure / override what gets considered to be the
"focused screen".

Ref: https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1029

Closes https://github.com/awesomeWM/awesome/pull/94.
2015-07-21 12:51:45 +02:00
Daniel Hahler c6ede6e96e tasklist: display symbols with "above" and "below" clients
When windows are set as "above", they will basically behave as "ontop"
(under normal circumstances) and therefore an indicator is useful to get
displayed in that case, too.

Closes https://github.com/awesomeWM/awesome/pull/325.
2015-07-18 01:03:01 +02:00
Daniel Hahler 3c1871b91f awful.tooltip: add margin around text
Closes https://github.com/awesomeWM/awesome/pull/321.
2015-07-16 21:24:46 +02:00
Emmanuel Lepage Vallee 18e9bfbcfa client: Do not assume the wfact exist
Since the call can now be delayed, "windowfact" may not exist yet.

Regression from 74106462ac
2015-07-14 01:39:03 -04:00
Daniel Hahler d5cf6e0272 Add client.first_tag, as a shortcut for `c:tags()[1]`
This is meant to be a faster alternative in case only the first tag is
relevant/used.

Closes https://github.com/awesomeWM/awesome/pull/294.
2015-07-14 01:20:39 +02:00
Daniel Hahler 1050237d04 minor: fix/improve doc comments 2015-07-12 17:42:53 +02:00
Max d22a65a103 Replace uses of color_strip_alpha with ensure_pango_color, refactor
This simplifies the logic a bit since all of the fg/bg colors are
always set when it gets to checking the client state.
2015-07-10 18:11:45 -04:00
Max 2ba9c8667f Replace color_strip_alpha with ensure_pango_color
color_strip_alpha was used to insert colors into Pango markup, but it
did not correctly check for valid Pango colors. ensure_pango_color
checks if the color is valid in Pango, and returns a placeholder if it
is not.
2015-07-10 18:09:45 -04:00
Daniel Hahler 4a845ced0f awful.widget.graph: setters: emit widget::updated only on changes
Ref: #284
2015-07-10 15:32:22 +02:00
Daniel Hahler 3be423fcb3 awful.widget.graph: expose properties via getters
This allows to see if a widget is stacked for example.

It uses getters instead of exposing the properties directly, which
should be made readonly then probably (which has drawbacks according to [1]).

1: http://lua-users.org/wiki/ReadOnlyTables

Closes https://github.com/awesomeWM/awesome/pull/284.
2015-07-10 15:32:07 +02:00
Daniel Hahler ae6a1efe65 Fix ewmh.activate to use the hints argument
This was missed in cb7f4b06, where the `raise` argument was changed to
`hints`.
2015-07-10 15:13:16 +02:00
Daniel Hahler 9eb4661cde Fix raising clients with focus=true via awful.rules
In ed09d8e this was changed accidentally, while only `request::focus`
should have been changed:

    -        c:emit_signal('request::activate',"rules")
    +        c:emit_signal('request::activate', "rules", false)
2015-07-10 15:13:16 +02:00
Daniel Hahler bd885f59f5 awful.client.property.set: emit property:: signals only on change
Emit "propery::" signals and call `c:set_xproperty` only if the
properties new value has changed.
2015-07-09 13:04:29 +02:00
Daniel Hahler ae7c7ff382 awful.tag: emit property:: signals only on change
This can have a significant performance impact in case you listen to the
property::hide signal to auto-hide tags for example.
2015-07-09 13:04:29 +02:00
bjp 4f865e66ed Add more keyboard shortcuts to the prompt
This adds the following readline/emacs style shortcuts to the prompt:
Ctrl+p, Ctrl+n, Alt+b, Alt+f, Alt+d, Alt+BackSpace.

Closes https://github.com/awesomeWM/awesome/pull/282.
2015-07-09 12:03:49 +02:00
Daniel Hahler 5630ad1bb2 taglist: call taglist_update only once per main loop
Currently `taglist_update` gets triggered often, because it listens to
a lot of signals.
This patch makes it only call the last one through `timer.delayed_call`.
2015-07-09 11:46:46 +02:00
Daniel Hahler 1924e044f7 tasklist: call tasklist_update only once per main loop
Currently `tasklist_update` gets triggered often, because it listens to
a lot of signals.
This patch makes it only call the last one through `timer.delayed_call`.
2015-07-09 11:46:45 +02:00
Daniel Hahler 367ad2d9a6 awful.tag.delete: single call to #c:tags()
This is a minor performance optimisation I came across.
2015-07-07 18:42:24 +02:00
Daniel Hahler d361eeab34 Make use of the new `oldscreen` argument with property::screen handlers
Closes #285
2015-07-05 17:42:57 +02:00
actionless c961622fc0 fix(lib: awful: layout): equal useless gaps 2015-07-03 02:34:39 +02:00
actionless 82549c04cd feat(lib: awful: tag): get useless_gap from beautiful if no any 2015-07-02 23:24:04 +02:00
actionless 01ac50c5ed feat(lib: awful: layout): set useless gap 2015-07-02 22:49:00 +02:00
Emmanuel Lepage Vallee a7f2600a38 layout: attached_connect_signal is deprecated 2015-07-02 22:11:46 +02:00
Emmanuel Lepage Vallee 056dee0426 layout: Remove dead code 2015-07-02 22:11:39 +02:00
Emmanuel Lepage Vallee 1aacf1efc4 Add useless gap utility functions 2015-07-02 22:11:01 +02:00
Daniel Hahler cb7f4b06eb Use `hints` table argument with `request::activate` signal 2015-06-25 06:47:39 +02:00