taskWeeChat - Tasks: task #10934, Follow the XDG Base Directory...

 
 

task #10934: Follow the XDG Base Directory Specification

Submitted by:  Timothy L. <ledti>
Submitted on:  Sun 13 Feb 2011 04:43:47 AM UTC  
Votes:  106  
 
Category:  config file Should Start On:  Sun 13 Feb 2011 12:00:00 AM UTC
Should be Finished on:  Thu 03 Jan 2013 12:00:00 AM UTC Priority:  1 - Later
Status:  None Privacy:  Public
Percent Complete:  0% Assigned to:  None
Originator Name:  Open/Closed:  Open
Planned Release:  None IRC nick:  ledti

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 06 Oct 2013 03:55:24 PM UTC, comment #5:

> 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.

Sebastien Helleu <flashcode>
Project Administrator
Sun 06 Oct 2013 03:46:26 PM UTC, comment #4:

> 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.

Mantas Mikulėnas <grawity>
Sun 06 Oct 2013 02:18:54 PM UTC, comment #3:

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).

Sebastien Helleu <flashcode>
Project Administrator
Sun 29 Sep 2013 07:33:22 PM UTC, comment #2:

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.

Mantas Mikulėnas <grawity>
Sun 29 Sep 2013 07:27:21 PM UTC, comment #1:

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

(file #29262)

Muffin Man <muffins>
Sun 13 Feb 2011 04:43:47 AM UTC, original submission:

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

I think the latest specification can be found here. 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.

Timothy L. <ledti>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by grawity (Posted a comment)
  • -email is unavailable- added by muffins (Voted in favor of this item)
  • -email is unavailable- added by muffins (Updated the item)
  • -email is unavailable- added by seschwar
  • -email is unavailable- added by onny (Voted in favor of this item)
  • -email is unavailable- added by freso (I love having a clean $HOME. :))
  • -email is unavailable- added by ledti (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 106 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-29 muffins Carbon-Copy- => Added muffins
    2013-09-29 muffins Attached File- => Added weechat_xdg_basedir.patch, #29262
    2013-01-08 seschwar Carbon-Copy- => Added seschwar
    2012-10-05 onny Carbon-Copy- => Added onny
    2011-10-19 freso Carbon-Copy- => Added freso

    Back to the top


    Powered by Savane 3.4