[PATCH] Add XDG_STATE_HOME

piegames <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <[email protected]>
A few years ago, there was a discussion about an `XDG_STATE_HOME`
folder. I also found a patch that adds `XDG_BIN_HOME` deep in the
mailing list's archive (which, by the way, is still not merged
@maintainer).

I've made a patch similar to the one adding the `bin` directory based
on the discussion mentioned above.

Regard,
piegames


---
 basedir/basedir-spec.xml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/basedir/basedir-spec.xml b/basedir/basedir-spec.xml
index 8e6fff6..951c493 100644
--- a/basedir/basedir-spec.xml
+++ b/basedir/basedir-spec.xml
@@ -66,6 +66,13 @@
             environment variable <literal>$XDG_CONFIG_HOME</literal>.
           </para>
         </listitem>
+        <listitem>
+          <para>
+            There is a single base directory relative to which user-
specific
+            state data should be written. This directory is defined by
the
+            environment variable <literal>$XDG_STATE_HOME</literal>.
+          </para>
+        </listitem>
         <listitem>
           <para>
             There is a set of preference ordered base directories
relative to
@@ -121,6 +128,17 @@
       <literal>$XDG_CONFIG_HOME</literal> is either not set or empty,
a default equal to
       <literal>$HOME</literal>/.config should be used.
     </para>
+    <para>
+      <literal>$XDG_STATE_HOME</literal> defines the base directory
relative to
+      which user-specific state files should be stored. If
+      <literal>$XDG_STATE_HOME</literal> is either not set or empty, a
default equal to
+      <literal>$HOME</literal>/.local/state should be used.
+    </para>
+    <para>
+      The <literal>$XDG_STATE_HOME</literal> fits right between config
and cache. It contains
+      convenience data that should be preserved between sessions of a
program like logs, history, 
+      last opened view etc.
+    </para>
     <para>
       <literal>$XDG_DATA_DIRS</literal> defines the preference-ordered 
set of
       base directories to search for data files in addition to the
-- 
2.22.0


_______________________________________________
xdg mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xdg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.