Commit Graph

6369 Commits

Author SHA1 Message Date
Daniel Hahler 3fb83ba9b5 README: add reference to online doc, small improvements
Closes https://github.com/awesomeWM/awesome/pull/345.
2015-07-25 15:12:48 +02:00
Daniel Hahler 9dad4f59a4 doc: remove references to Zaphod mode
This has been removed a long time ago (in 32d9a5b).
2015-07-24 15:22:03 +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 5a9ec82b95 Merge branch 'better-error-handling'
Closes https://github.com/awesomeWM/awesome/pull/311
2015-07-22 13:54:56 +02:00
Daniel Hahler 6e97b5f8c5 Use luaL_traceback with luaA_warn and luaA_typerror 2015-07-22 13:52:47 +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 22624284a2 tests/_runner.lua: use xpcall+traceback with step error handler 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 d08e82d4c8 Use luaA_dofunction with key- and mousegrabber 2015-07-22 13:52:47 +02:00
Daniel Hahler f070c4e060 tests: wait until DISPLAY is ready; xrdb might complain/abort 2015-07-21 13:09:07 +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 2c3c6b5ca8 tests: cleanup, remove sleep/print 2015-07-18 15:08:27 +02:00
Uli Schlachter f4ed41b39a tests: Check if test file is readable before running it
I tried calling this script with "tests/foo.lua" as an argument, but it actually
expects "foo.lua" since it changes into the appropriate directory itself.
Because this file does not exist, "cat $f | awesome-client" failed and thus this
whole script just hung (the test runner was never actually started).

Fix this by testing for the test-file to exist before trying to run it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-18 12:35:57 +02:00
Uli Schlachter f2a079204d tests: Make dbus session automatically exit when X server dies
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-18 10:45:03 +02:00
Uli Schlachter 534084698b tests/run.sh: Use $! instead of pgrep
And yes, $! is specified by POSIX and thus should be portable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-18 10:44:16 +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 Vallée 8917972c16 Merge pull request #315 from Elv13/fix_wfact
client: do not assume that wfact exists
2015-07-16 12:38:15 -04:00
Daniel Hahler 430fe7f710 tests/run.sh: fix 'waiting for awesome' via pgrep 2015-07-16 17:05:46 +02:00
Daniel Hahler 1e9da0947e Improve tests/run.sh
- `set -x` only for Travis/CI=true.
 - improve waiting for PID and awesome-client success.
 - kill childs via trap always.

Closes https://github.com/awesomeWM/awesome/pull/316.
2015-07-15 01:30:06 +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 78abb4a54c Improved awesome-client: exit code, bash, prompt
- exit with a non-zero status code when dbus-send fails.
   If awesome does not respond to the D-Bus message, e.g. because it is not
   running (yet), awesome-client now returns with a non-zero return code.
   This can be used to check if awesome has finished starting up, which is
   meant to be used for the functional test runner.
 - changed the shebang to use bash directly, which simplifies the logic
   to detect/handle "bash as /bin/sh" and allows to use `set -o pipefail`
   (which makes handling the D-Bus error easier - without using a subshell).
 - fix the prompt: now with trailing space, and the prompt is actually used
   (which wasn't the case with /bin/sh not pointing at bash before).

Closes https://github.com/awesomeWM/awesome/pull/304.
2015-07-14 00:24:33 +02:00
Daniel Hahler f37a3544de Merge pull request #307 from blueyed/minor-style
Various minor style / doc / comment fixes
2015-07-12 20:53:39 +02:00
Daniel Hahler 94814c7512 screen_client_moveto: add comment/whitespace for 'emit signal' 2015-07-12 17:42:53 +02:00
Daniel Hahler 917965483d doc: improve docs/02-contributing.md 2015-07-12 17:42:53 +02:00
Daniel Hahler 1050237d04 minor: fix/improve doc comments 2015-07-12 17:42:53 +02:00
Daniel Hahler 5c3734e583 luaA_xrdb_get_value: add resource name/class to warning 2015-07-12 17:30:59 +02:00
Daniel Hahler a7b281294c Makefile: add "tags" to .PHONY targets
It could depend on $(shell git ls-files), but it's not worth the
overhead to get this list then always.
2015-07-11 22:50:11 +02:00
Daniel Hahler d4c7a7ce04 Make sure "err" is a string in debug::error handler
I've noticed that `Pango.parse_markup` returns "userdata" instead of a
string in case of errors [1], which then causes the `debug::error`
handler to not handle it correctly:

    W: awesome: luaA_dofunction:77: error while running function
    stack traceback:
     [C]: in ?
     [C]: in function 'error'
     /usr/local/share/awesome/lib/wibox/widget/textbox.lua:63: in function 'set_markup'
     [string "require("wibox").widget.textbox():set_markup(..."]:1: in function 'f'
     /usr/local/share/awesome/lib/awful/remote.lua:25: in function </usr/local/share/awesome/lib/awful/remote.lua:21>
    error: attempt to concatenate a userdata value

This patch makes sure that `err` is a string when passing it to
naughty.notify in the default `debug::error` handler.

Closes #302.

1: https://github.com/pavouk/lgi/issues/115
2015-07-10 20:53:12 +02:00
Daniel Hahler 0f3bf03cd2 travis: unpin luassert
Closes #258.

Build tested in https://travis-ci.org/blueyed/awesome/builds/70387485.
2015-07-10 15:54:26 +02: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 611438a892 Add functional tests via Xephyr/Xvfb/xdotool
Closes https://github.com/awesomeWM/awesome/pull/133
2015-07-10 15:19:51 +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
Emmanuel Lepage Vallée 49bf635017 Merge pull request #297 from blueyed/tag-delete-single-call-to-client-tags
awful.tag.delete: single call to #c:tags()
2015-07-07 16:24:12 -04:00
Emmanuel Lepage Vallée a09fee243c Merge pull request #295 from blueyed/doc-signals
doc: signals: minor improvements, mainly for "tagged"
2015-07-07 16:09:22 -04: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