Skip to content

Commit

Permalink
settings: Add color-scheme key
Browse files Browse the repository at this point in the history
Specify a key for getting the system's preferred color scheme.

Fixes #629
  • Loading branch information
alice-mkh committed Sep 19, 2021
1 parent 29ca64a commit 64585e7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
24 changes: 21 additions & 3 deletions data/org.freedesktop.impl.portal.Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,27 @@
of host settings required for toolkits similar to XSettings.
It is not for general purpose settings.
Currently the valid keys are entirely implementation details
that are undocumented. If you are a toolkit and want to use
this please open an issue.
Currently the interface provides the following keys:
<variablelist>
<varlistentry>
<term>org.freedesktop.appearance color-scheme u</term>
<listitem><para>
Indicates the system's preferred color scheme.
Supported values are:
<simplelist>
<member>0: No preference</member>
<member>1: Prefer dark appearance</member>
<member>2: Prefer light appearance</member>
</simplelist>
Unknown values should be considered same as 0.
</para></listitem>
</varlistentry>
</variablelist>
Implementations can provide other keys; they are entirely
implementation details that are undocumented. If you are a
toolkit and want to use this please open an issue.
Note that the Settings portal can operate without this backend,
implementing it is optional.
Expand Down
24 changes: 21 additions & 3 deletions data/org.freedesktop.portal.Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,27 @@
of host settings required for toolkits similar to XSettings.
It is not for general purpose settings.
Currently the valid keys are entirely implementation details
that are undocumented. If you are a toolkit and want to use
this please open an issue.
Currently the interface provides the following keys:
<variablelist>
<varlistentry>
<term>org.freedesktop.appearance color-scheme u</term>
<listitem><para>
Indicates the system's preferred color scheme.
Supported values are:
<simplelist>
<member>0: No preference</member>
<member>1: Prefer dark appearance</member>
<member>2: Prefer light appearance</member>
</simplelist>
Unknown values should be considered same as 0.
</para></listitem>
</varlistentry>
</variablelist>
Implementations can provide other keys; they are entirely
implementation details that are undocumented. If you are a
toolkit and want to use this please open an issue.
This documentation describes version 1 of this interface.
-->
Expand Down

0 comments on commit 64585e7

Please sign in to comment.