Commit Graph

315 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 31b8623ff6 widget.common: Fix the background color
regression from f147f0d28a
2017-12-05 19:52:36 -05:00
Emmanuel Lepage Vallee 20c4f71e19 taglist: Support externally defined layouts and widgets 2017-12-02 16:41:25 -05:00
Emmanuel Lepage Vallee 329c06fbca tasklist: Support externally defined layouts and widgets 2017-12-02 16:41:25 -05:00
Emmanuel Lepage Vallee f147f0d28a common: Refactor awful.widget.common to support external extensions
This commit allow user defined delegates to be used as list elements.
This put an end to the endless attempt to cram more features into this
code.

A widget template (non-instantiated) is passed to the arguments and
is created by the common code. It also supports "roles" where some
user defined widgets can replace the old textbox or imagebox.
2017-12-02 16:41:25 -05:00
Emmanuel Lepage Vallee 2e7cd2b2ef tasklist: Add a sync way to force an update
It simplifies the tests
2017-12-02 16:33:06 -05:00
Emmanuel Lepage Vallee b446a9bdb8 tasklist: Deprecate the old function signature 2017-12-02 16:33:06 -05:00
Emmanuel Lepage Vallee 8dedd19fcf taglist: Deprecate the old function signature
The old function didn't scale at all. As no replacements are going
to be merged anytime soon, start to make it meta-extensible.

This is the first step to be able to let the widget be extended
directly from rc.lua without adding yet more silly parameters.

It never scaled and has reached the point of no return a very long
time ago.

My first ever contribution to Awesome was to attempt to fix this,
but the solution was a bad hack. The radical module later solved
this by delegating the style, layout, theme, item layout and item
style to various "visitor" objects. While this is superior to this
commit, it was also a very large and complicated codebase. After
5 years, it is now obvious it will never be merged "whole".
2017-12-02 16:15:29 -05:00
Uli Schlachter a137655791 Add & use a dpi property on screen objects
Once upon a time, beautiful.xresources.get_dpi was added to query
Xft.dpi. That made sense since this queried an xresources property. Over
time, other, non-xresources-based ways to query DPI were added to this
function. Now, it makes no more sense to have this function here.

Also, recently it became possible to add new properties to C objects
from Lua code. Thus, we no longer need to have a get_dpi() function
somewhere, but can add s.dpi directly.

Thus, this commit adds s.dpi and makes everything use it. No functional
changes are intended.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-08 12:30:21 +02:00
Daniel Hahler 66c4e55511 Merge pull request #2029 from actionless/calendar-fix-click-hide
Calendar popup click/hover fix
2017-09-09 05:14:02 +02:00
getzze 35432e9f21 Avoid skipping a month if the day is 31 (#2028) 2017-09-08 22:08:47 +02:00
actionless c9fbecd1e8 refactor(awful: widget: calendar_popup): s/_calendar_clicked/_calendar_clicked_on/ 2017-09-01 22:43:57 +02:00
actionless 23613bac05 fix(awful: widget: calendar_popup): hover was not working anymore if hiding popup by clicking on it 2017-09-01 22:43:07 +02:00
Yauhen Kirylau 9e4446060e feat(awful: widget: calendar_popup: attach): implement 'on_hover' option (#2008)
* feat(awful: widget: calendar_popup: attach): implement 'on_hover' option

* feat(awful: widget: calendar_popup): smarter handling of click and hover at the same time
2017-08-27 21:01:24 +02:00
Yauhen Kirylau fd66d12a4b feat(awful: widget: calendar_popup): implement 'margin' widget property (#2010) 2017-08-27 14:23:43 +02:00
Emmanuel Lepage Vallée ec08af4e76 clienticon: add a client setter (#2018)
It's required to work with the declarative syntax and be used
in the tasklist due to its limitations.
2017-08-27 14:23:06 +02:00
SpiritCroc a20dd4ad61 KeyboardLayout widget: add EurKey (#2003) 2017-08-17 17:21:40 +02:00
Uli Schlachter acc012353d Make keyboardlayout widget more robust (#1941)
I am not sure what exactly goes on in the below bug report, so this will
just paper over the problem. I still think that this patch is a good
idea even when it is not a proper fix, since keyboard layouts are
complicated and so this code should be robust and hard to break.

Fixes: https://github.com/awesomeWM/awesome/issues/1933
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-25 18:17:32 +02:00
mqus bd5f0dd3fc Fix calendar_popup.lua documentation
There were multiple things which stood out to me, as I was trying to setup a simple calendar popup for my textclock:
1.: The functions in https://awesomewm.org/doc/api/classes/awful.widget.calendar_popup.html#Functions were not named correctly (calendar vs calendar_popup) which (naturally) produced an error when used as awful.widget.calendar.month() .
2.: The example for calendar_popup.month() was obviously missing a line (where does the month_calendar come from?) . Resolved by copying the line from the attach-example
3.: The same examples also only refer to the function as calendar.month() which should be changed to awful.widget.calendar_popup.month()
2017-07-19 17:22:31 +02:00
Uli Schlachter d72893692e calendar_popup: Fix method name entries
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 18:59:17 +02:00
Uli Schlachter 9519d666a3 calendar_popup: Fix style documentation
Fixes: https://github.com/awesomeWM/awesome/issues/1899
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 18:36:04 +02:00
Emmanuel Lepage Vallée ba78882cb3 Merge pull request #1834 from Elv13/fix_896
layoutbox: Use a textbox as the fallback when no images are found
2017-06-21 03:16:28 -04:00
Emmanuel Lepage Vallee 10acd82968 layoutbox: Use a textbox as the fallback when no images are found
Fix #896
2017-06-20 18:22:23 -04:00
Tim Roes f8a9b9891d Add missing awful.widget.common require (#1850) 2017-06-15 18:47:48 +02:00
getzze 39efa6bbf9 awful: Add a calendar popup widget 2017-06-12 02:58:06 -04:00
Emmanuel Lepage Vallee 212cb84782 doc: Fix a taglist copy/paste oversaw
Fix #1795
2017-06-11 01:23:36 -04:00
Quentin Minster 155c37e759 Fix single layout not appearing in the keyboardlayout widget (#1771)
Change indexing so that a keyboard map with a single group still gets
displayed in awful's keyboardlayout widget.

Signed-off-by: Quentin Minster <quentin@minster.io>
2017-05-13 23:25:09 +02:00
Kevin Zander 74fb39afbd Remove deprecated calls in tests
Change deprecated util.table call in lib/awful/widget/clienticon.lua to gears.table call
2017-03-30 23:07:20 -05:00
Kevin Zander 7687275607 Move awful.util.deprecate and awful.util.deprecate_class to gears.debug
Change all awful.util function calls to gears.debug function calls
Update all old deprecate calls to have deprecated_in=4
2017-03-15 20:08:22 -05:00
Kevin Zander 45dadde0dd Move filesystem functions out of awful.util into new gears.filesystem
Update awful.util filesystem function calls to gears.filesystem function calls
Rename getdir to get_dir for consistency
2017-03-15 13:46:33 -05:00
Emmanuel Lepage Vallée 4a42ed0d44 Merge pull request #1636 from psychon/client-icons2
Add support for multiple client icons
2017-03-11 18:59:09 -05:00
Kevin Zander 2f105eac86 Move string functions out of awful.util into new gears.string (#1584)
Update deprecated awful.util string function calls to gears.string calls
2017-03-11 18:57:32 -05:00
Kevin Zander 0066257a59 Move ensure_pango_color out of awful.util into gears.color
Update deprecated awful.util.ensure_pango_color calls to gears.color.ensure_pango_color calls
2017-03-08 15:28:48 -06:00
Kevin Zander c3461b535c gears: Move awful.util.table to gears.table (#1641)
* Move table functions out of awful.util into new gears.table

* travis: Use v9999 prefix for full requests

Make sure no newly deprecated functions are used

* Move all `awful.util.table.*` calls to `gears.table.*` calls
Move table test functions from awful/util_spec to new gears/table_spec
Change awful.util.subsets call to gears.math.subsets in awful/key.lua
2017-03-08 15:18:33 -05:00
Uli Schlachter 73944dac00 Add awful.widget.clienticon
This adds a new widget that displays the icon of a client. This widget
tries to use the best fitting of the available icons.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-07 22:45:49 +01:00
Emmanuel Lepage Vallée 971adec0d0 Merge pull request #1622 from Veratil/fix-new-luacheck
Fix Luacheck 0.19.0 release Travis breaks
2017-03-04 13:32:53 -05:00
Kevin Zander 3f6df8ddee Fix Luacheck 0.19.0 release Travis breaks 2017-03-03 16:41:12 -06:00
Uli Schlachter 2b2612314c Add a only_on_screen container widget
Fixes: https://github.com/awesomeWM/awesome/issues/1565
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-03 13:25:28 +01:00
Lego Stax b54cf0330b Added disable_task_name property
style.disable_task_name and beautiful.tasklist_disable_task_name.  Suppresses display of a given client's name, but preserves the setting of tasklist_plain_task_name
2017-02-25 17:21:36 -07:00
actionless f8d12a855f feat(awful: widget: promptbox): accepts `fg` and `bg` as arguments; improve docstring 2017-02-12 17:59:19 +01:00
copycat-killer 7a728cec6b awful.widget.watch: return timer too 2017-02-08 14:53:40 +01:00
Emmanuel Lepage Vallee 3b1599bd99 maximize: Stop doing it in 2 operations.
Before 4.0, maximizing could only be done in 2 operations.

4.0 add an unified way, but kept doing 2 operations. The old
Lua EWMH code to serialize the 2 operations was dropped when
the codepath was simplified and replaced by a generic version
in awful.placement. However this version never implemented
combining multiple mementos into 1.

This commit unify the maximize C code, drop the ugly macro
template and actually fixes a couple more issues that were
caused because request::geometry was sent twice.
2017-02-07 11:12:40 -05:00
Uli Schlachter aaea976108 layoutbox: Update when a tag's screen changes (#1505)
In theory it would be enough to only update the old and new screen of
the tag whose screen changed. However, we cannot easily get the old
screen, so just update all layoutboxes.

Fixes: https://github.com/awesomeWM/awesome/issues/1503
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-02 22:45:33 +01:00
Holger Schurig bf2c1993db doc: fix signals (#1455)
- rule reordering was mentioned twice in the NEWS
- fix all shown luadoc errors
- add missing descriptions for signals in module "awesome"
2017-01-28 15:03:56 +01:00
SammysHP 37f0b7e3bf prompt: Make awful.widget.prompt themeable
Adds new optional properties to the theme:
    prompt_fg
    prompt_bg
    prompt_fg_cursor
    prompt_bg_cursor
    prompt_font
2017-01-23 13:15:09 +01:00
Emmanuel Lepage Vallée a9e8cc3dab Merge pull request #1404 from Veratil/tasklist-spacing-fix
Tasklist spacing fix + taglist spacing doc addition
2017-01-16 23:39:53 -05:00
Kevin Zander 44e0ea5681 taglist_shape_border_width_focus and taglist_shape_border_color_focus are not put into the correct variables 2017-01-16 11:18:47 -06:00
Kevin Zander 74b5ac72da Fix incorrect variable lookup for theme.tasklist_bg_image_* 2017-01-16 02:39:01 -06:00
Kevin Zander 56a2e98896 Add doc for taglist_spacing 2017-01-16 01:12:12 -06:00
Kevin Zander c3b565faab Fix theme lookup of tasklist_spacing; fix doc typo 2017-01-16 01:11:42 -06:00
rob 703b11182c taglist: added volatile tag theme variables 2017-01-07 21:21:46 -07:00