Daniel Hahler
0ea2bbb126
awful.menu: use beautiful.xresources.apply_dpi for margins
2015-08-01 17:47:51 +02:00
Daniel Hahler
5c78cf07fc
naughty: use beautiful.xresources.apply_dpi for margin and border
2015-08-01 17:47:43 +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
09dce08fd4
gears.debug: add support for limited depth
...
This is useful with big tables and might even be necessary to prevent
infinite recursion.
To prevent the latter, the default is 10.
This adds an indicator when `depth` is reached for tables.
awesome# return require("gears").debug.dump_return(t4, "", 2)
string " : table: 0x1580130
1 : table: 0x16951d0
1 : wibox.widget.base (table) […]
2 : wibox.widget.base (table) […]
3 : 4 (number)
4 : 5 (number)
5 : foo (string)
2 : table: 0x16ac790
1 : table: 0x16951d0 (table) […]
3 : table: 0x16cc500
1 : table: 0x16951d0 (table) […]
2 : table: 0x16ac790 (table) […]"
awesome# return require("gears").debug.dump_return(t4, "", 1)
string " : table: 0x1580130
1 : table: 0x16951d0 (table) […]
2 : table: 0x16ac790 (table) […]
3 : table: 0x16cc500 (table) […]"
Closes https://github.com/awesomeWM/awesome/pull/372 .
2015-08-01 11:24:35 +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
d3b682f2b6
wibox: add __tostring metamethod
2015-08-01 11:21:50 +02:00
Daniel Hahler
430e8664be
wibox.drawable: add __tostring meta method
2015-08-01 11:21:50 +02:00
Daniel Hahler
fa6b7c390f
make_widget: keep original "tostring" value in parenthesis
...
This provides the usual table ID, which can be useful during debugging.
2015-08-01 11:21:50 +02:00
Daniel Hahler
9494f3f0c3
Merge pull request #377 from blueyed/naughty-focused-screen
...
Naughty: default to focused screen
2015-08-01 11:19:11 +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
Daniel Hahler
861cfc5915
wibox.widget.textbox: skip setting unchanged layout properties
...
In case the text, markup or other layout properties have not changed, there's
no need to update the widget.
Based on 5a2a5d03d3/lib/wibox/widget/textbox.lua
.
Closes https://github.com/awesomeWM/awesome/pull/335 .
2015-07-29 01:20:23 +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
904b7a88ee
doc: overhaul naughty documentation
2015-07-27 15:54:47 +02:00
Daniel Hahler
f7e7d05047
doc: naughty: config.mapping moved to dbus.config.mapping
2015-07-27 15:32:11 +02:00
Daniel Hahler
efe5358a0b
naughty.notify: default to screen.focused()
2015-07-27 14:35:46 +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
c602eb4ff7
Merge pull request #352 from psychon/gears_cache
...
Add gears.cache: a generic cache which may loose values at any time
2015-07-27 13:58:35 +02:00
Daniel Hahler
68ad2529a4
wibox.widget.base: add __tostring method to widgets
...
Fixes https://github.com/awesomeWM/awesome/issues/337 .
Closes https://github.com/awesomeWM/awesome/pull/341 .
2015-07-26 18:17:01 +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
Uli Schlachter
a239b2cac7
Use gears.cache to replace some other caches
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-25 15:08:00 +02:00
Uli Schlachter
42c913332f
Add a generic cache system as gears.cache
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-25 15:07:47 +02:00
Daniel Hahler
9835f73a01
doc: fix invalid @see references to URLs
2015-07-24 01:56:36 +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
1f3ad814c9
beautiful.xresources: allow to set/get DPI per screen
...
This adds an optional screen argument to get_dpi/apply_dpi and set_dpi
to store DPI values per screen.
This can be used in your config to manage different DPI values for an
internal and external display:
beautiful.xresources.set_dpi(125, 1)
beautiful.xresources.set_dpi(94, 2)
This is meant to be the foundation for more evolved DPI handling in
awesome.
Closes https://github.com/awesomeWM/awesome/pull/336 .
2015-07-24 01:48:03 +02:00
Daniel Hahler
62f5e59497
naughty: skip permanent notifications when there is no more room
...
This skips permanent notifications (with timeout=0) in `get_offset` when
there is not enough room for a new notification. It will still fallback
to removing the first/oldest one.
Closes https://github.com/awesomeWM/awesome/pull/306 .
2015-07-22 14:02:25 +02:00
Daniel Hahler
173545bc72
Add beautiful.get_merged_font; fix doc / load_font
...
This is meant to get a new font (copy) with adjusted attributes, e.g.
font_focus = beautiful.get_font_copy(theme.font, "bold")
Closes https://github.com/awesomeWM/awesome/pull/308 .
2015-07-22 13:59:05 +02:00
Daniel Hahler
ddb1f64acd
beautiful.init: use xpcall / debug.backtrace
2015-07-22 13:52:47 +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
dc9295d981
gears.timer: use xpcall with timeout and delayed calls
...
This provides a traceback in case of errors.
Ref: https://github.com/awesomeWM/awesome/issues/301
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