Commit Graph

1555 Commits

Author SHA1 Message Date
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
Daniel Hahler 2e2d60a1f9 client.focus.byidx: handle raising in the function itself 2015-06-25 06:47:39 +02:00
Daniel Hahler ed09d8ed4f Use request::activate with raise=false instead
Ref: https://github.com/awesomeWM/awesome/pull/224#issuecomment-101790416
2015-06-25 06:47:39 +02:00
Daniel Hahler 6dc355cf71 autofocus: use request::focus instead of request::activate
In #152 I've changed the autofocus handler to emit the request::activate
signal, instead of setting client.focus only.

This is wrong IMHO, and can be annoying:

If you have two floating clients above a tiled / maximized one, and
close one of the floating ones, with the tiled one being the one
selected by autofocus, it will be raised above the other floating
client.

This is changed now to use the new `request::focus` signal instead.

This basically reverts 20cdb5d (#152), but allows for customizing this
behavior, by overriding the default `request::focus` handler
(`ewmh.focus`).

It would be nice if there was a helper to check if a window's content
isn't visible at all (i.e. covered by other windows), and that could be
used then by the (new) default handler for request::focus - raising the
client only, if it's completely covered by another window.

Fixes https://github.com/awesomeWM/awesome/issues/217
2015-06-25 06:47:39 +02:00
Daniel Hahler 401f21f8e2 Add request::focus signal, with ewmh.focus being the default handler
This still does `client.focus = c` by default, but allows to customize
it.

This was initially suggested in #194, but by using `request::activate`
instead, which would not be the same.  Therefore a new signal is being
used instead.

Helped-by: Samir Benmendil <samir.benmendil@gmail.com>
2015-06-25 06:47:39 +02:00
actionless cec04b2684 Add DPI support and 'xresources' theme
This makes awesome respect DPI settings, and adds a new theme based on
xrdb and xsettingsd color settings ("xresources").

Closes https://github.com/awesomeWM/awesome/pull/229
2015-06-25 06:40:38 +02:00
Uli Schlachter d990e7918f Use :weak_connect_signal() for connecting to widget::updated
This way "that other widget" doesn't prevent the current widget from being
garbage collected.

Please note that this in all of these cases the widget under consideration does
have a strong reference to the callback function. This means that the callback
cannot be garbage collected until "this widget" itself is collected. Thanks to
this, this change is safe.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-25 06:37:05 +02:00
Uli Schlachter 089ed0e8dd gears.object: Add :weak_connect_signal()
Connecting to a signal weakly has the same effect as connecting to it strongly,
but it allows the garbage collector to disconnect the signal in case nothing
else references this function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-25 06:37:04 +02:00
actionless 89beaf12e5 fix: rename the rest of *.lua.in files 2015-06-22 11:28:36 +02:00
Julian Wollrath ba62665fd6 Remove some trailing whitespaces. 2015-06-19 23:13:31 +02:00
Julian Wollrath 6cc7be512c Remove the *.in from all files.
Signed-off-b: Julian Wollrath <jwollrath@web.de>
2015-06-19 22:33:32 +02:00
Emmanuel Lepage Vallée 4bea4554fb Merge pull request #265 from blueyed/doc-improve-key
doc: improve doc for key.key and awful.key
2015-06-19 16:09:26 -04:00
Daniel Hahler e25bc558c4 doc: fix typos with root.c and beautiful 2015-06-19 21:04:17 +02:00
Daniel Hahler c2ee98b69c doc: improve doc for key.key and awful.key 2015-06-19 20:59:14 +02:00
jaysonwillson 3fe663fc60 Fix interactive notifications: use uint32 instead of int32
Fixes https://github.com/awesomeWM/awesome/issues/259.
Closes https://github.com/awesomeWM/awesome/pull/261.
2015-06-15 02:23:57 +02:00
Uli Schlachter 5cf13dba6b awful.layout.inc: Hide API breakage
In commit 3cbdc2a79f, the argument order for awful.layout.inc was changed
from (layouts, i, s) to (i, s, layouts), so that layouts can become an optional
parameter. However, this change (obviously) breaks user configs.

To hide this breakage, we assume the old argument order if the number i is a
table. This cannot break anything, since the operator "+" will error out on
tables anyway. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-12 19:07:31 +02:00
Uli Schlachter 31fcc11272 textclock: Load GLib.DateTime only once
I doubt that this makes much of a difference since lgi surely caches things, but
this still seems nicer to me.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-12 10:57:42 +02:00
Uli Schlachter fe0a96d7f1 keyboardlayout: Don't mess with undefined variables
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-12 10:57:22 +02:00
Uli Schlachter 75f2f6bf86 corner layout: Don't set geometries directly
Since commit 52ec0ebd93, layouts should return the geometries to their caller
instead of setting them directly. The caller will also fix up the geometries for
border width.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-12 10:54:59 +02:00
Uli Schlachter a64cd26f62 corner layout: Properly "local"ize variables
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-12 10:52:44 +02:00
Ganesh Ajjanagadde f2e74994f2 awful.textclock: fix timezone handling
This fixes issue #249.
2015-06-12 02:28:06 +02:00
Salorium c30fe5b166 wibox.widget.systray: fix error while drawing widget
> bad argument #2 to 'systray' (number has no integer representation)

Closes https://github.com/awesomeWM/awesome/pull/247
2015-06-12 02:24:44 +02:00
Alexis BRENON c2842fe8f3 Add a new tag layout: corner
Closes https://github.com/awesomeWM/awesome/pull/251
2015-06-12 02:18:07 +02:00
Daniel Hahler 3d8db91602 doc: fix ldoc for client.focus.history.get 2015-06-10 21:39:50 +02:00
Daniel Hahler 496fce0f90 autofocus: use focus.filter, via new arg to focus.history.get
This adds an optional `filter` arg to awful.client.focus.history.get,
and uses `awful.client.focus.filter` from the autofocus module.

This improves the behaviour when manually setting clients as
non-focusable (#237), and is considered to be the desired behaviour in
general.

Closes https://github.com/awesomeWM/awesome/pull/242.
2015-05-25 23:05:07 +02:00
Alex Kir 82e62a0fad Added function to check state of notifications
Sometimes is a good idea to check if notifications are suspended,
for example, for changing the icon. This function just returns the value
of suspended.

Closes https://github.com/awesomeWM/awesome/pull/222.
2015-05-21 20:19:41 +02:00
Daniel Hahler bafa12ca24 Merge pull request #221 from anatol/master
Use table.unpack() with Lua5.2 instead of deprecated unpack()
2015-05-19 16:00:29 +02:00
Daniel Hahler 3618d95b11 minor: doc fix for awful.widget.keyboardlayout 2015-05-13 12:52:22 +02:00
Anatol Pomozov 3b146b834c Use table.unpack() with Lua5.2 instead of deprecated unpack() 2015-05-12 10:23:27 -07:00
bew78 - lesell_b 4845a73df2 Update finder.lua.in 2015-04-24 22:47:06 +02:00
Daniel Hahler 344965a328 Merge pull request #206 from dodo/menu-fixes
Fixes for awful.menu
2015-04-19 19:02:32 +02:00
Daniel Hahler 98c4ae8573 Fix ldoc target for awful.widget.keyboardlayout
Define @classmod wibox.widget.keyboardlayout, otherwise ldoc fails to
find the base class:

> module(...) name deduction failed: base .../src/build/docs/capi/ .../src/build/lib/awful/widget/keyboardlayout.lua

Fixes https://github.com/awesomeWM/awesome/pull/149#issuecomment-94014438
2015-04-19 00:31:11 +02:00
▟ ▖▟ ▖ fc39db377f awful.menu: resize menu when item count changes
When the number of items of a menu change by menu:add or menu:delete
and the menu is shown, its wibox has to resize.
2015-04-18 08:57:15 +02:00
▟ ▖▟ ▖ 40b4387e6d awful.menu: update t new layout api
Apparently the style to get the direction of a wibox.layout.* changed
from calling get_dir to just accessing the attribute dir.
2015-04-18 08:53:57 +02:00
Emmanuel Lepage Vallée 2f24ec69e1 Merge pull request #149 from lexa/master
xkb: implementation of keyboard layout switcher
2015-04-17 11:23:16 -04:00
Daniel Hahler 40e76cf92b Merge pull request #175 from blueyed/ewmh-fullmax-fix-offscreen
ewmh: screen_change: fix off-screen geometries
2015-04-17 17:20:29 +02:00
Daniel Hahler 594825c929 Fix awful.completion for zsh
This fixes 704cf21.
2015-03-31 00:11:22 +02:00
Aleksey Fedotov d9b1d5490c xkb: Added widget to display current keyboard layout
Widget shows current keyboard layout short name (usually two letters,
for example 'us', 'de'). Indicator will be hidden if only one layout
configured.  Layout can be switched either by clicking on widget or by
function keyboardlayout.next_layout()
2015-03-29 22:36:02 +03:00
Daniel Hahler e1fa04a15d ewmh: screen_change: fix off-screen geometries
When moving a fullscreen/maximized client to a smaller screen or with
different Y offset etc, its offset was not handled properly.

This moves it first into the new area, and then makes sure that its not
off-screen.  The latter should not happen, because the width/height is
adjusted before.
2015-03-21 05:54:01 +01:00
Daniel Hahler 07486f7ead tag.lua: add "property::icon_only" signal
Thanks @NormalRa for the patch.

Fixes #138.
2015-03-17 16:24:47 +01:00
taptap 5b81a0db60 Add reset_timer and replace_text functions
Enables users to replace text and reset expiration timeouts of existing
notifications, which is necessary for OSD creation by means of naughty.

Signed-off-by: taptap <alexey.e.egorov@gmail.com>
2015-02-28 23:54:02 +01:00
Julian Wollrath ca89f0f311 Use LDoc commands to mark parameters as optional in the docs.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:15 +01:00
Daniel Hahler ffa535ca29 doc: fix markup with wibox.widget.textbox:set_markup 2015-02-28 23:14:14 +01:00
Daniel Hahler 1b6564f209 docs: fix HTML / table param with awful/widget/tasklist.lua 2015-02-28 23:14:14 +01:00
Daniel Hahler 65ad83ac30 docs: ignore awful/widget/init.lua, not common 2015-02-28 23:14:14 +01:00
Daniel Hahler 2930c0ab4a doc: fix for awful.util.geticonpath 2015-02-28 23:14:14 +01:00
Julian Wollrath 3a34b49179 Fix LDoc warning. 2015-02-28 23:14:13 +01:00
Daniel Hahler faa1c74f03 doc: refer to gears.color.create_pattern from set_color 2015-02-28 23:14:13 +01:00
Julian Wollrath 4d7bd19014 Make everything wibox related a class in the docs.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Julian Wollrath f8a3209707 Fix ldoc warning.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Julian Wollrath 6de9d1e1d5 Make description of awful.mouse.finder readable.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Julian Wollrath b16944a654 Fix generation of the docs.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Julian Wollrath 939dab8ba9 Some more doc fixes all over the place.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Julian Wollrath 668055479e Convert usage of HTML to markdown.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Julian Wollrath 38e2a47157 Fixup newly introduced whitespace issues.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) b96b3ef31c Docs: Move all docs to a `docs` folder.
This moves all of the documentation into a separate folder, which keeps
everything in one place and avoids unnecessary clutter.

This will pay off when proper guides are written for various aspects of
using awesome or contributing to it.

This also updates the building system, so that the docs are properly
generated with new directories.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) 6ab86b5d03 Docs: Add local functions to beautiful and naughty
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) 4b94f05799 Docs: Naughty - mostly done
Reorganise the config table, so that we have a single table and the
fields are nested.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) 734cc2f59c Docs Finish beautiful
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) 654b110322 Docs: Fix the header for beautiful
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) ed0bf91122 Docs: Work on naughty
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) 7f8a0787b8 Docs: General work on the awful module.
This is basically an initial stab for some modules and some
experimenting with the `@classmod` directive.

For most of the docs only basic transforming was done.

At the moment the tooltip module looks the best.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:12 +01:00
Ignas Anikevicius (gns_ank) e4fa6effe2 Docs: Fix headers for the wibox module
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) 00f558ff92 Docs: General work on gears module.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) de10f5e4f0 Docs: awful.layouts fixup
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) 9f8e2b1336 Docs: Begin work on awful.client
This fixes usage and some and client parameter types.
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) a0051c7dc4 Docs: Start menubar refactoring
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) 20eeb66541 Docs: Start gears.color refactoring
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) f726dcee61 Fix LDoc errors on generating the documentation.
This also at the same time ports the documentation to the new `Markdown`
format.
2015-02-28 23:14:11 +01:00
Ignas Anikevicius (gns_ank) 12185a5aae Docs: Port awful.rules into the new doc format.
This converts the old documentation style into the new one to use
markdown instead of HTML in bigger doc blocks. Also, we can use block
comments, which means that writting documentation (and indenting code
blocks) easier.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Emmanuel Lepage Vallée 2f0a7f9de4 Merge pull request #150 from Elv13/fix_arrange_error
layout: Fix delayed arrange regression
2015-02-24 20:52:19 +00:00
Daniel Hahler 025b2841da autofocus: emit `request::activate` signal
After a client gets unmanaged, the newly focused client might not be
visible / raised above other windows.

Using the `request::activate` signal makes the autofocus handler more
flexible, and will raise the focused client by default.
2015-02-24 15:33:49 +01:00
Daniel Hahler 015e3e985b Merge pull request #144 from actionless/menubar-paginated-scroll
feat(lib: menubar): add paginated scrolling
2015-02-24 12:21:23 +01:00
actionless 2a9b1d00e1 feat(lib: menubar): add paginated scrolling
also fixes some local/global issues and adds saving current geometry to the instance table
2015-02-23 20:34:26 +01:00
Emmanuel Lepage Vallee c88c51f74d layout: Fix delayed arrange regression 2015-02-22 22:32:16 +00:00
Kenton 517d6049c8 added middle anchors for naughty notifications
top_middle and bottom_middle can be used as position arguments for new naughty.notifications
2015-02-21 17:37:30 -05:00
Daniel Hahler d1984a7a1f Merge pull request #95 from blueyed/signal-client-property-screen-old
Send old_screen with "property::screen" client signal
2015-02-20 23:25:38 +01:00