[task #10934] Follow the XDG Base Directory Specification

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[task #10934] Follow the XDG Base Directory Specification

Eric L.-2

URL:
  <http://savannah.nongnu.org/task/?10934>

                 Summary: Follow the XDG Base Directory Specification
                 Project: WeeChat
            Submitted by: ledti
            Submitted on: Sun 13 Feb 2011 04:43:47 AM GMT
                Category: config file
         Should Start On: Sun 13 Feb 2011 12:00:00 AM GMT
   Should be Finished on: Thu 03 Jan 2013 12:00:00 AM GMT
                Priority: 1 - Later
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                IRC nick: ledti

    _______________________________________________________

Details:

I couldn't find any other tasks with this agenda, so here it is.

I _think_ the latest specification can be found here
<http://standards.freedesktop.org/basedir-spec/latest/>. The benefits go to
those who like to control where their config and other files are located,
though it does clean up the $HOME directory as well.

* .conf files would go in $XDG_CONFIG_HOME/weechat/
* plugins would probably be $XDG_DATA_HOME/weechat/
* not sure where the fifo would go.

That link should clarify everything if you decide to implement it.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10934>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[task #10934] Follow the XDG Base Directory Specification

Eric L.-2
Follow-up Comment #1, task #10934 (project weechat):

Weechat offers compile time support for the XDG Base Directory
Specification[1] in the form of setting -DWEECHAT_HOME=~/.config/weechat

It would be nice to set this as the default in CMakeLists.txt (patch
attached), but a couple things to consider:

* Weechat won't create ~/.config if it doesn't exist
* the documentation doesn't use -DWEECHAT_HOME, so those instances of
$HOME/.weechat would have to be updated

.. [1] XDG Base Directory Specification at freedesktop.org
<http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>

(file #29262)
    _______________________________________________________

Additional Item Attachment:

File name: weechat_xdg_basedir.patch      Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10934>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[task #10934] Follow the XDG Base Directory Specification

Eric L.-2
Follow-up Comment #2, task #10934 (project weechat):

ledti – these days, the fifo would go to $XDG_RUNTIME_DIR/

muffins – setting $HOME/.config/weechat at compile time is *not* actually
XDG-compliant, because it ignores $XDG_CONFIG_HOME if it is set.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10934>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[task #10934] Follow the XDG Base Directory Specification

Eric L.-2
Follow-up Comment #3, task #10934 (project weechat):

Hi,

This is not planned to change the default value of WEECHAT_HOME, for two
reasons:

1. XDG/freedesktop.org is related to X-Window, which is not the case for
WeeChat: it runs on many operating systems (even non-free), with or without
graphical environment, and it does not depend on any X-Window lib.

2. such change would be annoying for all existing users, it would break
compatibility, for example on /upgrade (at least it would require manual
actions to copy/move config files before upgrading).

You can change the value when you compile WeeChat, this will not impact other
users (that's why the option exists, to change the value if you don't like the
default one).

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10934>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[task #10934] Follow the XDG Base Directory Specification

Eric L.-2
Follow-up Comment #4, task #10934 (project weechat):

> 1. XDG/freedesktop.org is related to X-Window, which is not the case for
WeeChat: it runs on many operating systems (even non-free), with or without
graphical environment, and it does not depend on any X-Window lib.

This is not of any importance, as the XDG "Base Directory" spec itself only
specifies several default paths and does not depend on any X-Windows feature
either. Many pure-command-line tools (git, htop, pulseaudio, cower, fish,
newsbeuter, lftp, camlistore, ranger, systemd, mpd, …) have started using
`~/.config/` and related paths.

> 2. such change would be annoying for all existing users, it would break
compatibility, for example on /upgrade (at least it would require manual
actions to copy/move config files before upgrading).

Several other programs have solved this simply: they check if the old path
exists first (e.g. `~/.gitconfig` or `~/.mpd/`) and if it does, they continue
using it forever, without any impact to the user. If the old path doesn't
exist, the XDG paths are used.

> You can change the value when you compile WeeChat, this will not impact
other users (that's why the option exists, to change the value if you don't
like the default one).

I agree that Weechat is easy to build, but not all users have enough rights to
install all -dev libraries needed, so at least a $WEECHAT_HOME environment
variable would be still better.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10934>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[task #10934] Follow the XDG Base Directory Specification

Eric L.-2
Follow-up Comment #5, task #10934 (project weechat):

> I agree that Weechat is easy to build, but not all users have enough rights
to install all -dev libraries needed, so at least a $WEECHAT_HOME environment
variable would be still better.

The WEECHAT_HOME set during compilation is just the default one, but you can
still override it at any time with the --dir (or -d) command line argument.

Anyway, changing default to XDG directories implies other things, not just
change the default path. If I understand well, other paths should change too
(to store logs, cache files, scripts, and other files used by plugins). And
there it's more difficult, because all current plugins/scripts know only one
path to the "home".
WeeChat has not only one config file in the home, but a tree with many
different things.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10934>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev