Commit Graph

323 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 025262fd95 doc: Use the new doc convention.
The previous few commits are very old, bring them to the new
standards without all the merging conflicts (which are error prone).
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 4dbc83fa7d doc: Modify the template to allow merging sections.
It might not be the most pretty of change, but it works. With this
change, it is possible to have multiple "things" in the "same"
section having the "same" name.

This allows for C/C++ style functions with the same name but different
signatures. Lua doesn't handle this well, so it should usually be
avoided. However, constructors might be a valid exception. Most older
widget (and object) constructors have multiple random argument while
newer one use `args`. Deprecating the old ones for the sake of
standardization might be a bit too much for users upgrading from v3.5.

Given the only reason all of those deprecation would happen is because
"its pretty that way", then lets allow 2 constructors and avoid outrage.
2019-11-03 01:28:29 -05:00
actionless 68651477fb refactor(test: awesomerc: hotkeys): imitate fake vim client instead of depending on vim as test dep 2019-10-18 19:02:47 +02:00
actionless e048c4200c style(readme): remove dots at the end of the list items 2019-10-18 18:52:44 +02:00
actionless 0333cddfa2 doc(readme): add xterm to test deps 2019-10-18 18:50:43 +02:00
actionless e78d711846 doc(readme): add vim to test deps 2019-10-18 18:45:18 +02:00
Xinhao Yuan 0e8dd4c1c9 Added more tests to check partial maximization handling, which require wmctrl as an optional dependency. 2019-10-17 18:54:29 -04:00
Emmanuel Lepage Vallee cf0385af80 widget: Add an `:add_button()` method.
This is done now because a lot of code in `lib/` add buttons by manually
extracting buttons from awful.button. Instead of adding ugly code to
prevent using the legacy API, do this.
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 3d918258e2 widget: Turn `:buttons()` into a normal property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 0cb22fd203 awful: Move the backward compatibility code into its own file.
The reason for this is that as more of CAPI is brought in line with the
current API guidelines, it is more and more likely the tests will hit
APIs shims (either to test them or because the prototype remains the
same and only the implementation moved to Lua).
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 96c4d001f1 doc: Remove capi.button/capi.key from the official doc.
`awful.button` is always the one used and it's confusing.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 585e321578 doc: Fix a regression from a recent commit.
There was an off-by-one in the substring for the parameter names.
2019-10-05 17:20:29 -04:00
Emmanuel Lepage Vallee 271e2822a7 build: Allow Awesome to be built with luarock LGI. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallée 74410e9490
Merge pull request #2890 from Elv13/doc_args
Improve (and fix) the doc.
2019-10-02 13:42:03 -04:00
Emmanuel Lepage Vallée 6dd8daa2ce
doc: Add bacj an accidently removed section. (#2885)
This was probably due to copy pasting from the preprocessed file
back to the raw file.

Fix #2882
2019-10-01 12:49:28 -04:00
Emmanuel Lepage Vallee 5de1e36007 doc: Use braces for names function arguments.
Use {} for all functions with take `args` as sole parameters instead
of (). Also color them differently to highlight this isn't a typo.
2019-10-01 02:03:12 -04:00
Emmanuel Lepage Vallee 8704b8d89a doc: Move the core components to the top of the doc index.
They are the most important, they should be the most visible.
2019-10-01 01:18:15 -04:00
Emmanuel Lepage Vallee dcdbc679f7 doc: Add a file to ldoc blacklist before addint it.
Add `dpi.lua` to config.ld even if it isn't added yet. This is
because the way the test run has it cached in the build dir. A full
rebuild would take too long and timeout on travis for semi-large PRs.
2019-09-29 18:19:45 -04:00
Emmanuel Lepage Vallee b40083780e matcher: Add a "every" and "every_any" sections to the rules.
So far the "any" rules had a "OR" and "NOT" logic "gates", but not
an "AND".
2019-08-03 18:26:06 -04:00
Emmanuel Lepage Vallee f3f9e4a4b5 matcher: Allow rules to be addressed using an identifier. 2019-08-03 18:26:06 -04:00
Uli Schlachter 6101ef5186 Add libRSVG to the list of optional dependencies (#2837)
Since commit 3295e9f33d, the imagebox tries to use libRSVG via
lgi.Rsvg to load SVG files without rasterising them immediately.
Instead, they are directly drawn at the expected size.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-07-28 17:23:44 -04:00
Emmanuel Lepage Vallee b34cc6b896 doc: Fix autogenerated table links.
Update for the new URL scheme.
2019-07-09 17:17:58 -04:00
Emmanuel Lepage Vallee bd5e557a60 doc: Fix links in the "AwesomeWM widget system" page.
The URLs just changed again.
2019-07-09 17:00:48 -04:00
Emmanuel Lepage Vallee 8038f8124e doc: Do not mix spaces and tabs for indentation in the generated HTML. 2019-07-09 17:00:20 -04:00
Emmanuel Lepage Vallee 7cba838067 doc: Prevent ldoc from generating URLs with spaces.
For dubious reasons, ldoc uses the human readable name for the URLs
instead of the machine readable one. If the name has multiple words,
this causes the URLs to have spaces or %20 in them.

This commits remove all spaces from the "kinds" and then use `:gsub()`
in the template to convert underscores to spaces.

**WARNING** This breaks all URLs again. But this is necessary to prevent
broken links when the user paste them with spaces instead of %20.
2019-07-09 16:28:42 -04:00
Emmanuel Lepage Vallée f459296747
doc: Fix index links. (#2803)
Fixes #2797
2019-06-28 09:34:32 -04:00
Emmanuel Lepage Vallée d699968475
doc: Fix the "Returns" section for @staticfct. (#2801)
It wasn't displayed. Another hack based on undocumented APIs, but
whatever, ldoc is dead.
2019-06-22 18:00:40 -04:00
mergify[bot] 9865f4592b
Merge pull request #2787 from alfunx/readme-fixes
Fix minor stuff in README
2019-06-10 12:07:05 +00:00
DrEuler 184de0ab82 Update 01-readme.md (#2786)
Fixed a spelling error
2019-06-09 16:11:11 -04:00
Alphonse Mariya a64e82d43e
Fix minor stuff in README 2019-06-09 19:47:31 +02:00
Emmanuel Lepage Vallee 47750f62b2 doc: Hide the empty notifications modules 2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 9be03b528c doc: Mentions the notifications in the widget page. 2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 9acc452b1e naughty: Set an action table even if the notification has none.
Less `if` in the code.
2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 8951b88095 doc: Document the new template widget delegate system. 2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 3e3a298a33 doc: Shape the methods and functions arguments in the summary.
Given the full prototype can be quite long with all the optional
argument definition, better help the eyes focus on the important
part.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 90a29f92eb doc: Fix all the property, theme and field types. 2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 12a7236e2b doc: Add support for property types to ldoc.
Rather that abusing of how the arguments are displayed to convey the
type, add native support.

It still uses the @param for the doc, so this doesn't cause a million
little noisy changes, but the rendered HTML now have a real section for
the type. This is added to both the summary and the expanded description.

Additionally, if the type has a description string, a second is added.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 43799aec02 doc: Hardcode the header instead of using "machine readable".
"classmod" is not useful for a humain.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 4ce6179d78 doc: Standardize how the @field are dsiplayed.
Always add the module name. Until now some had it and some didn't.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee b4ece0f053 doc: Use an explicit tag for all static functions.
This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.

This commit also fixes a large number of issues found while
proof-reading everything.
2019-06-08 18:14:13 -04:00
Emmanuel Lepage Vallee 11d7a614d9 doc: Add a constructor stereotype for everything.
This forces the constructor functions to be at the top of the API
documentation rather than in a random position.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 63ca0f0d8f doc: Use an explicit @method stereotype for all methods.
ldoc has a magical `@classmod` module type which tries to detect
what is a method and what is a static function. It fails about as
often as it works. This commit makes everything explicit to remove
such issues.

Fixes #2640
Ref #1373
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 6ce4fa6802 doc: Remove the old module alias hack.
The module names for also have their alias. The commit also remove 2
deprecated module that were forgotton in the previous "get rid of the
deprecated modules in the doc" PR.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee cdeafeff94 doc: Add a section for theme related libraries 2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee ded35502d5 doc: Add a section for utility libraries
Dedicated for the modules extensions developers will need, but that the
general "I only edit rc.lua" user wont.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee f1dceb02f6 doc: Move all popups to a section. 2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 9d0c2200b2 doc: Add a section for the important classes.
The choice is very subjective, but at least they stand out.
2019-06-08 18:13:28 -04:00
Emmanuel Lepage Vallee d00ac0be93 doc: Add a widget, container and layout section to the index. 2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee 6a2b8abe11 doc: Do not mess with the <a> in the deprecated definiton.
It worked fine for the table in the header, but the name is also used in
the "main" documentation below. This caused the while text to be within
the "<a>" section.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee c0e8660ca0 doc: Display the `Parameters:` <h3> in the doc.
It was displayed for most sections, but not the functions. This is
problem when the doc already contains a bullet list just before the
parameter section. The two looked as if they were a single list.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee 89a02ac6cd doc: Standardize the function name.
There was some issues like `gears.shape.circle` being called
`module.circle`.

There is also a disparity between how the constructor and "normal"
functions are called.

This commit attempts to force everything to have the full module name.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee d92fda78c4 doc: Cleanup how methods are rendered in the doc.
Previously, there was some `module:foo()` or `gears.object:foo()`
because the doc used the "raw" name and/or, in some undefined and
race condition prone (due to `pairs()` order), the formatted
"classmod" name.

Now, just display `:foo()` and be done with it.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee 43c851798b doc: Update the parser for the next commits.
Otherwise the CI will fail.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallée 7ff635bde0
Merge pull request #2507 from Elv13/xmas_2k18_1
New theme API groundwork
2019-04-18 13:00:58 -04:00
Uli Schlachter 7a31296387 Update NEWS again (#2750)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-04-16 21:26:28 -04:00
Emmanuel Lepage Vallee 1c0eedfe9f doc: Update the news for this pull request 2019-04-15 15:26:50 -04:00
Emmanuel Lepage Vallée df0cdbed61
Merge pull request #2600 from Elv13/extract_rules
Extract the awful.rules logic into a gears module
2019-04-15 13:28:48 -04:00
Emmanuel Lepage Vallee 28541c8e82 doc: Update the NEWS for the new features added by this pull request. 2019-04-05 21:06:11 -04:00
Emmanuel Lepage Vallee 50d4e8f04b doc: Add a deprecated property section. 2019-04-05 21:06:11 -04:00
Emmanuel Lepage Vallee 58bafe8ef4 doc: Add a common documentation for for the rule components. 2019-04-05 20:40:53 -04:00
Emmanuel Lepage Vallee fa801ac441 ldoc: Do not proces the drag_to_tag file
It has no public doc. This avoids a warning.
2019-04-05 20:40:53 -04:00
Emmanuel Lepage Vallee 9befa1ec32 ldoc: Add a new "rulecomponent" section.
It is going to be used by `awful.rules`, `gears.matcher`,
`naughty.rules` and `selection.rules`.
2019-04-05 20:40:53 -04:00
Uli Schlachter d694274d64 Update the NEWS
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-03-07 21:44:04 +01:00
Uli Schlachter a57c79687a Use xcb-errors library if it is available
This library allows to get a human-readable string describing X11
requests, events, and errors. We now use this library to pretty-print
X11 errors if we get any.

To test this code, I added the following two lines to AwesomeWM so that
X11 errors are generated:

    xcb_set_input_focus(globalconf.connection, 42, 42, 42);
    xcb_randr_set_output_primary(globalconf.connection,
        globalconf.screen->root, 42);

Output without xcb-errors:

    X error: request=SetInputFocus (major 42, minor 0), error=BadValue (2)
    X error: request=(null) (major 140, minor 30), error=(null) (147)

Output with xcb-errors:

    X error: request=SetInputFocus (major 42, minor 0), error=Value (2)
    X error: request=RandR-SetOutputPrimary (major 140, minor 30), error=RandR-BadOutput (147)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-03-03 09:15:29 +01:00
Emmanuel Lepage Vallee 9df77e5c76 naughty: Move the notification object into its own file.
Mostly for the documentation, but also as the new base upon which
to build the modular notification GUI.
2019-02-16 15:25:10 -05:00
Uli Schlachter 3f23914626 Start writing NEWS for the next release (#2624)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-09 17:35:42 -05:00
Uli Schlachter 2023ed187a Add xcb-xfixes as a new dependency and initialise it
This commit prepares changes in the following commits

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-06 09:21:26 +01:00
Emmanuel Lepage Vallée 0a999c4192 Change the badge URL from travis-ci.org to travis-ci.com (#2625) 2019-01-29 11:24:31 +01:00
Uli Schlachter a80323d2d0 Fix some typos in the NEWS
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-28 08:47:20 +01:00
Emmanuel Lepage Vallee 22b6e80cad Update the NEWS for 4.3 2019-01-26 13:16:22 -05:00
Emmanuel Lepage Vallee e3c1ecfd40 docs: Better document how widgets work
Ref: #1373
2019-01-24 10:58:45 -05:00
Daniel Hahler aae9b25457 ldoc.ltp: improve HTML title 2019-01-04 22:39:28 +01:00
Daniel Hahler 6792415cef ldoc: prepare for custom ldoc.ltp
ldoc.ltp is copied from ldoc (ldoc/html/ldoc_ltp.lua).
2019-01-04 22:39:28 +01:00
actionless d121780366 doc(readme): add receipts for installing current git master 2019-01-01 18:43:43 +01:00
mergify[bot] 98be7e88ef
Merge pull request #2483 from actionless/questions-readme
doc(readme): add questions section; split issues and contributing; fix apidoc link (in ldoc)
2018-12-17 14:24:24 +00:00
actionless 29b2b7138d doc(readme): add section about IRC 2018-11-19 22:09:46 +01:00
actionless 86084690b2 doc(readme): add questions section; split issues and contributing; fix apidoc link (in ldoc) 2018-11-19 22:01:37 +01:00
Sergey Vlasov f0878941ab doc: Fix c.requests_no_titlebar example
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-11-12 11:48:59 +03:00
Daniel Hahler da585439ff docs: update URL for vicious (#2446)
It has been turned into an organization [1].

1: https://github.com/vicious-widgets/vicious/issues/60

[ci skip]
2018-10-20 15:15:01 -04:00
Emmanuel Lepage Vallee bb357dd33e doc: Restore the example width limit to fit in 1024x768.
The old stylesheet did this and it forced the examples to be smaller.

This commit restore this limit.
2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee cd6979618f doc: Update the CSS to support our custom table class
Other change:

 * Use GitHub style <code> border
 * Add support for HTML <kbd> tags
2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee b49f7e22dd doc: Add an index of valid properties to awful.spawn and awful.rules. 2018-10-12 14:19:25 -04:00
Emmanuel Lepage Vallee 62c95d5fe6 build: Move the meta file parser to an helper module
The commit also re-work the build target so if the file are deleted,
then they are created again. Using `file(COPY ...)` and
`file(MAKE_DIRECTORY ...)` as done previously caused some file to be out
of date or not being regenerated at all.

This commit also fixes some broken target that depended on `file(` and
`configure_file` CMake command not being part of any target.

Fix #2342
2018-10-12 14:18:32 -04:00
Emmanuel Lepage Vallee 90b17bdc09 awful.rules: Add proper documentation to the extra client properties.
Until now there wasn't much documentation available about how to use
these properties. With the new work on `awful.spawn` that rely more and
more on `awful.rules` integration, it is worth fixing.

This commit add a new documentation section and a future commit will
aggregate them to generate an index.
2018-10-10 01:58:18 -04:00
Emmanuel Lepage Vallée 768184d152
Merge pull request #2368 from psychon/motif_hints
Add c.requests_no_titlebar based on motif hints
2018-10-06 22:00:03 -04:00
Emmanuel Lepage Vallee 3fe5798a97 ldoc: Add a @sourcefunction section.
It will be used by features introduced in the next commit.
2018-08-27 00:03:22 -04:00
Uli Schlachter 45430daf7f rc.lua: Move Motif hints example to generated docs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-26 19:26:19 +02:00
Emmanuel Lepage Vallee 3792a17c2f ldoc: Add a "filter" section for the taglist and tasklist 2018-08-18 15:49:05 -04:00
Emmanuel Lepage Vallee f11c0b47b9 doc: Remove capi.keygrabber from the official doc
`awful.keygrabber` should be the only one used directly.
2018-08-06 19:03:25 -04:00
Daniel Hahler 3876b18240 doc: Add missing C-object documentation and fix some papercuts.
Ref: https://github.com/awesomeWM/awesome/issues/1373
2018-07-25 18:26:11 -04:00
Yauhen Kirylau 4bd5b1940d feat(themes; beautiful): add partial support for GTK+3 themes (#2129) 2018-06-26 10:43:20 -04:00
Emmanuel Lepage Vallee f234dcabf6 doc: Add `[deprecated]` after some function names.
It use a little XSS-ish HTML tag injection, but it works
2018-05-28 14:11:41 -04:00
Emmanuel Lepage Vallee 0a2b05dfbb doc: Use the newer LDoc ability to use special handler for objects types
The `@signal` and `@property` are now correctly rendered. The need for
the extra `.` in front of the signal is no longer needed.
2018-05-28 14:11:41 -04:00
Joseph Herlant d9cc56538f build: man pages: use asciidoctor instead of asciidoc (#2234) 2018-04-04 11:28:50 +02:00
actionless 98e59225d7 chore(ldoc: css): return bullets style for unordered list items 2018-03-20 17:50:39 +00:00
actionless bdbc11e7df style(ldoc: css): apply some manual code formatting 2018-03-20 17:50:39 +00:00
actionless d5d46a4373 fixup! chore(ldoc: css): new style for the tables 2018-03-20 17:50:39 +00:00
actionless 8762588082 fixup! chore(ldoc: css): new style for the tables 2018-03-20 17:50:39 +00:00
actionless 0a6f3aa3da fixup! chore(ldoc: css): new style for the tables 2018-03-20 17:50:39 +00:00
actionless dafbd48375 chore(ldoc: css): new style for the tables 2018-03-20 17:50:39 +00:00