Commit Graph

13 Commits

Author SHA1 Message Date
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
Kevin Zander 012f130738 Add Science category to menubar menu generation categories table. Fixes #2602 2019-01-21 11:58:44 -06:00
Uli Schlachter 0b0b466705 Deprecate menubar.icon_theme
The code in menubar.icon_theme naively implements the algorithm from the
base dir specification. This is a problem: On this system,
/usr/share/icons/{Adwaita,hicolor}/index.theme list 91, respectively 649
subdirectories. Since we check for three file extensions (png, svg,
xpm), this means that a failing icon lookup for the Adwaita theme checks
for (91+649)*3 = 2220 files (in practice it might be a bit better since
the directories have specific meanings, but still). That's insane.

Since we only use this code for looking up category icons anyway, just
deprecate this mess. Category icons are now looked up in the same way
that icons for individual applications are looked up.

Since menubar.init does not require("menubar.icon_theme"), this means
that menubar.icon_theme is no longer actually loaded. That's bad.

(Hopefully) Fixes: https://github.com/awesomeWM/awesome/issues/1496
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-16 13:12:59 +01:00
Zach Peltzer 013abf5a39 Display desktop entries with no categories (#2039) 2017-09-28 22:58:14 +02:00
Haochen Tong c1bcad5f5e parse_desktop_file: rtrim lines before parsing (#1677) 2017-05-25 01:22:13 +02:00
romildo ea2c9deb68 menubar: consider XDG_HOME_DIR and XDG_DATA_DIRS
The freedesktop specifications let desktop files be stored in
different directories indicated by the environment variables
XDG_DATA_HOME and XDG_DATA_DIRS.

Only use the default value for these variables if the variables are
not defined.

This is important for systmes like NixOS which does not follow the LFS
and installs files differently.
2017-03-20 20:20:36 -04:00
Jan Larres 862bfbf795 menubar: add trailing slash with $XDG_DATA_HOME (#1631)
The $XDG_DATA_HOME environment variable may not necessarily end in a
slash, so insert it when generating the list of all menu dirs to make
sure the directory can be found.
2017-03-06 22:58:09 +01:00
Uli Schlachter 259c4f716f Remove @release @AWESOME_VERSION@ everywhere (#1157)
It does not provide much value. The version number is already known to
ldoc globally in the "description" variable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-09 22:36:20 +02:00
actionless 4eb80853c2 feat(lib: menubar): replace io.popen to lgi 2016-04-28 17:07:24 +02:00
Daniel Hahler 25eff81878 menubar: look for .desktop files recursively
It was missing apps/entries from /usr/share/applications/kde4.

This patch also makes sure that entries are unique (by Exec/Name).

Closes https://github.com/awesomeWM/awesome/pull/711.
2016-02-28 22:14:08 +01:00
Daniel Hahler 75341d9e38 menubar.menu_gen.generate: do not call lookup_icon again
`menubar.utils.lookup_icon` gets called via `menubar.utils.parse`
already.
2015-10-13 22:27:20 +02:00
Kazunobu Kuriyama 9ae945c931 Enhance menubar icon path lookup
The way of icon path lookup for `menubar` is enhanced so that it is
based on a theme-oriented way as described in the specification:

  Icon Theme Specification, Ver. 0.12
  http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

To accomplish this:

 * Add the two new files `icon_theme.lua` and `index_theme.lua`.

   The former implements an icon lookup algorithm suggested in the URL
   above.  The latter implements a helper object to parse the cache file
   `index.theme` of which data is used by the former.

 * Modify `menu_gen.lua` to use the new algorithm.

   - The implementation of `lookup_category_icons` is changed
     accordingly.
   - The values of the field `all_categories.icon_name` are changed file
     names to icon names, i.e., file extensions which are used to
     indicate image file formats are removed.

 * Add the new file `icon_theme_spec.lua` for a unit test for checking
   if `icon_theme.lua` together with `index_theme.lua` works as
   expected.
2015-09-26 11:45:38 +09: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