Commit Graph

247 Commits

Author SHA1 Message Date
Akulen 1be737be3a awful.widget.tasklist: Add an align option (#1065) 2016-09-02 18:14:43 +02: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 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 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 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 25f4f24791 layoutbox: Fix a leak with Lua 5.1 and luajit
Fixes #808
2016-05-15 17:15:55 -04: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 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
Uli Schlachter 2da981afdd Merge branch 'screen-gc' of https://github.com/psychon/awesome 2016-04-30 09:10:26 +02:00
Wolfgang Popp 76313263b6 Add clear() function to awful.widget.graph and doc fixes (#847)
* awful.widget.graph: add clear() function.

* awful.widget.graph: doc fixes for add_value.
add_value did not show up in generated luadoc. And the value parameter does not need to be between 0 and 1.

* awful.widget.graph: local functions clear and add_value as methods of graph.
2016-04-26 22:14:09 +02:00
Uli Schlachter fc390ff405 Use weak keys for referring to screens
This commit changes some tables that are used for per-screen stuff to have weak
keys, so that the screens can be garbage-collected, if needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-26 09:34:54 +02:00
Abdo Roig-Maranges 3c3e2daeb2 fix deprecation warning 2016-04-17 16:35:08 +02:00
Emmanuel Lepage Vallee dd52f1ce86 awful.tag: Move functions to awful.client and screen 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee 82342f055c awful.client: Deprecate .floating.get/set
Begin to formalize the getter/setter syntax into a coherent one
2016-04-11 23:46:10 -04:00
Daniel Hahler c86c873779 minor: clarify mod-ctrl-shift-X comment; fix typo 2016-04-04 20:30:48 +02:00
Abdo Roig-Maranges cb46f09361 make keyboard layout naming function easily overridable 2016-03-30 15:41:30 +02:00
Abdo Roig-Maranges 1879966556 handle layout names like us(altgr-intl) 2016-03-30 14:45:48 +02:00
Daniel Hahler 8966c73599 Minor doc fixes 2016-03-06 14:46:13 +01:00
Emmanuel Lepage Vallee 19f874a73f awful.widget.graph: Expose private data 2016-02-29 03:12:08 -05:00
Daniel Hahler 2bcff5af27 Merge pull request #708 from psychon/less_screen_indicies2
Less screen indicies
2016-02-28 22:15:37 +01:00
actionless 504c105cba feat(awful: widgets): add 'watch' widget 2016-02-28 12:11:57 +01:00
Uli Schlachter d56b5c031b Remove some now unnecessary uses of s.index
Because all our Lua code can now work with screen objects, most of the uses of
s.index that the previous patches added for reaching this goal can be removed
again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-27 09:24:19 +01:00
Uli Schlachter b3f43f9110 Support screen objects in more of awful
This commit makes the code in awful.widget work with screen objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-26 19:50:17 +01:00
Uli Schlachter 426da4f8bb Fix one more luacheck warning in awful.widget.tasklist 2016-02-14 14:43:20 +01:00
Uli Schlachter b4148f5dfa Mark a bug in awful.widget.common as such
No idea what the correct value for this argument is supposed to be, but since
there is no variable "m" in scope, this always uses nil as the value.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:43:04 +01:00
Uli Schlachter c7aed3bd88 Fix wrong variable in awful.widget.taglist
There is no "s" variable. This code wants "screen" instead. The effect of this
typo was that with multiple taglists, only the one that was created last got
updated.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:58 +01:00
Uli Schlachter 99a4184224 Fix luacheck warnings in lib/awful/widget/
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Uli Schlachter 7d32f7b733 tasklist: Unreference client in unmanage
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-04 18:24:53 +01:00
Uli Schlachter b3ab06896d awful.widget.common: Follow :set_markup() API change
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 16:50:03 +01:00
Uli Schlachter 3793c339ce Merge branch 'surface-errors' of https://github.com/psychon/awesome 2016-01-17 16:01:03 +01:00
Uli Schlachter 4d562306d2 taglist: Remove dead code
The image "library" is long gone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:43:56 +01:00
Uli Schlachter 8953218e5c Use get_cache_dir() instead of getdir("cache") everywhere
Just because I like that function more. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:16:26 +01:00
Uli Schlachter b7d398f339 awful.widget.tasklist: Use pairs instead of ipairs
This is a weak table whose entries might be removed by the garbage collector.
I'm not sure if this will every cause problems, but it's better to be prepared
for tables having "nil holes" (which would mean ipairs ignores some entries).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-19 20:13:37 +01:00
Uli Schlachter 7eed74b814 Fix multiple tasklists on the same screen (#563)
The code already tried to handle this correctly, but at some point it used the
wrong variable as the screen number...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-19 20:11:42 +01:00
Daniel Hahler b3c7efd5e4 Add awful.widget.prompt.spawn_and_handle_error helper
This is meant to avoid boilerplate code when creating prompt hooks.
2015-11-08 12:32:53 +01:00
Daniel Hahler 4bffa7e47e doc: fix unintentional rendering as code due to indent 2015-10-14 00:22:26 +02:00
Uli Schlachter e3199edca1 Merge branch 'snid_callback' of https://github.com/Elv13/awesome-1 2015-10-10 19:52:41 +02:00
Uli Schlachter 67faf52bab Properly update multiple taglists
My recent refactoring accidentally made the taglist only connect to the signal
for the first screen on which a taglist is created. This commit fixes the code
so that it connects for all screens.

Fixes https://github.com/awesomeWM/awesome/issues/500

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-09 20:59:18 +02:00
Emmanuel Lepage Vallee 4095eb91a8 Move util.spawn to a new module, add ability to spawn with properties
* This commit add a new module to avoid a (4 level) loop dependency
* It is now possible to call awful.spawn() with a table of properties
* awful.rules is used to execute the rules.

* Everything is public to allow alternative workflow modules such as
    Tyrannical to use their own callback implementation.
2015-09-29 18:05:56 -04:00
Uli Schlachter abc5a552a4 Make tasklist garbage-collectable
Again, instead of directly connecting to various signals for updating a
tasklist, this commit changes the code so that there is just a single, global
connections and based on this a weak table with all tasklist instances is used
do the updates.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 14:20:24 +02:00
Uli Schlachter 40db0b7337 Make taglists garbage-collectable
Similar to what the previous commit does for layoutboxes, this changes the code
for the taglist so that there is only a single, global connection to the various
signals and these update all taglists via weak tables.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 14:03:59 +02:00
Uli Schlachter 6f2e7bba25 Make layoutbox kind-of garbage-collectable
Instead of connecting to the needed tag-update-signal again for every layoutbox,
this now just creates a single connection and updates all layoutboxes from here.
A new weak table is used to find the layoutboxes from these callbacks.
Additionally, layoutboxes are now per-screen unique. So even if you try to
create three layoutboxes for screen 1, the code will now always return the same
instance.

This kind-of fixes the leak test for layoutboxes. The problem is that the
default config also creates a layoutbox and adds it to a wibox. Since this is
now the same layoutbox, the test still fails. Just removing the layoutbox-part
from the default config makes this problem go away.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 13:19:12 +02:00
Uli Schlachter e9377c4808 Make textclock garbage-collectable
This fixes the textclock-specific part of the test that the previous commit
added.

To fix this, gears.timer.weak_start_new() is used. This function creates a timer
that is automatically stopped when its callback function is garbage collected.
The callback function is saved as a member of the texbox widget that is the
"widget behind the textclock". Thus, the timer can only be stopped after the
widget is garbage-collected, but the timer does not keep the widget alive.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-27 12:44:10 +02:00
Daniel Hahler 116c90c8d8 minor: taglist.taglist_label: join if / remove indent 2015-09-25 01:29:00 +02:00
Daniel Hahler f4d6011f23 awful.widget.taglist: handle/display urgent property always
For non-selected tags, display the urgent bg/fg always.
Previously, this was skipped in case the tag had the focused client,
which is possible since a while.

Ref: https://github.com/awesomeWM/awesome/issues/455#issuecomment-143072993
2015-09-25 01:07:51 +02:00
Kazunobu Kuriyama a005ad22b1 Correct indentation of keyboardlayout.lua
Correct the indentation of keyboardlayout.lua, so that it complies with
the vim modeline at the bottom of the file.
2015-09-13 01:35:50 +09:00
Kazunobu Kuriyama 81e667feab keyboardlayout: Extend allowable 'group_names' pattern range
Extend the range of the 'group_names' patterns which is currently
restricted to typical ones like

    pc+us+ru:2+de:3+ba:4+inet

to more general ones such as

    macintosh_vndr/apple(alukbd)+macintosh_vndr/jp(usmac)+macintosh_vndr/jp(mac):2

so that the keyboardlayout widget can handles all possible patterns
returned by awesome.xkb_get_layout_group().
2015-09-13 01:19:00 +09:00