Definition of the current icon theme

Александр Соколов sokoloff.a at gmail.com
Mon Jan 30 11:27:11 UTC 2017


Absolutely agree, we don't have easy way to know the icon theme name, and
this makes the Icon Theme Specification
<https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html>
is
almost meaningless. We need a simple way to get the current icon theme name.

There are 2 proposals, XSETTINGS
<https://specifications.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html>
 and XSettingsRegistry
<https://www.freedesktop.org/wiki/Specifications/XSettingsRegistry/>. But
XSETTINGS does not work:
  1. It is difficult to implement in the low-level languages like C or C++.
  2. It is impossible to implement it in a scripting language such as bash.
  3. It cannot be used in Wayland.

But using a single file has a problem. One DE will overwrite the settings
of another. My suggestion is.

DE defines a XDG_CONFIG_PREFIX variable, and settings are read from the
file ${$XDG_CONFIG_DIRS}/{XDG_CONFIG_PREFIX}xdg-settings.ini
It's similar to the approach of the menu-spec
<https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html>
 specifications.

This will allow different DE have different settings in the different
configuration files.

Additionally I propose to use a INI-like config file format. This has the
following advantages:
  1. The format is familiar to programmers.
  2. It allows you to have some grouping of values.
  3. Because desktop-files are INI, the code implementing your
specifications already have a parser for that format.

> Btw. why didn't you suggest dbus?
IMHO the specification should be as simple as possible. In any case, we can
write dbus service for reading and changing the values. But the approach
should be maximized simple. Otherwise programmers will not use it.

2017-01-29 0:57 GMT+03:00 Роман Чистоходов <freeslave93 at gmail.com>:

> Icon Theme Specification mentions "current theme", but does not elaborate
> on what it is and how it can be detected, making it very hard for authors
> of third-party applications or GUI toolkits to detect this "current theme"
> for correct icon resolving (it becomes much like guessing game)
>
> It seems like detection of the current icon theme is DE-dependent right
> now. Would be useful to have specification that defines how desktop
> environments should store the name of current icon theme, how applications
> can find it and how applications can receive icon theme updates (e.g. user
> changes icon theme and applications want to reload icons to reflect this
> change).
>
> Super simple solution is to write the name of icon theme (and nothing
> else) to  $XDG_CONFIG_HOME/icon-theme-name.txt file whenever DE is
> starting or setting different icon theme. Applications may read file and
> watch it for changes (using platform-dependent API).
>
> Until this is not implemented by desktop environments, sensible fallback
> may be specified for each popular DE.
>
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xdg
>
>


-- 
Best regards,
Alexander.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20170130/17a0d3fa/attachment.html>


More information about the xdg mailing list