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

 
 

task #10934: Follow the XDG Base Directory Specification

Submitter:  Timothy L. <ledti>
Submitted:  Sun 13 Feb 2011 04:43:47 AM UTC
Votes: 206
 
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:  Done Privacy:  Public
Assigned to:  flashcode Percent Complete:  100%
Originator Name:  Open/Closed:  Closed
Planned Release:  3.2 IRC nick:  ledti
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 13 Jun 2021 09:25:26 AM UTC, comment #6: 

Implemented in WeeChat 3.2.

Sebastien Helleu <flashcode>
Group administrator
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>
Group 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.

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

grawity <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 ldh (Voted in favor of this item)
  • -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)
  •  

    There are 206 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-13 flashcode StatusNone Done
        Percent Complete0% 100%
        Assigned toNone flashcode
        Open/ClosedOpen Closed
        Planned ReleaseNone 3.2
    2019-06-11 ldh Carbon-Copy- Added ldh
    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.13-4448.
    Corresponding source code