-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support config file in XDG style #51
Conversation
I don't really understand the rationale here, this is a standard for GUI apps. Also, given users often need to know where the Irssi directory is (e.g. to add scripts) I think adding an alternate location is just going to make it confusing. (I'm assuming a non-quick and dirty version would actually change the Irssi home directory not just the config file, because this is even more confusing). |
HI As you assumed I would want a full patch set to change all the directories, but I have feeling making the code is easier than making the decision. While xdg basedir is from the freedesktop guys it's in no way a GUI only standard. I can see a few benefits it would bring. By default it unclutters the home directory by collecting things in a single config directory. It also brings great flexibility with the ENV vars and doing the github classic of a "dotfiles" repo is super easy with xdg apps as you don't have to worry about symlinking files. I agree that you need to know where to find your config and scripts and understand people have come to know ~/.irssi as the place for that. Having two locations is messy but trying to cold turkey might be even worse. |
Not too sure I am up for this. The coding style is completely off as well. Let me get back to you once I am home from holiday the 28th. |
I am going to say no this for now. Thanks for the contribution, but I don't think this is of our interest right now. |
Chipping in on the discussion here, the XDG specification is indeed used by more than just GUI apps. In my ~/.config I have at least mc & htop, which last I checked were terminal-based apps. Currently I have the following situation:
That is: More than 70% of the my home-folder is cluttering from dot-dirs. Only around 30% of the apps I have config for are "good" and follows the XDG specification. irssi should strive to be one of the good citizens in this situation IMO. |
I agree. I personally dislike the penis length discussion about "how many applications does X vs. Y" as the criteria for going for either X or Y. Having our algorithm check for |
@GeertHauwaerts @jillest @dgl What do you guys think? |
Your coding style requires a little bit of love though. Looks a bit messed up right now. |
I'm happy to do the work to get the code up to snuff. it's really nothing more than a POC to discover the scope. |
Sounds good. Look at the code around yours and ensure that the coding style follows that :-) We tend to use tabs for whitespace, but we are extremely inconsistent :-( |
I agree that XDG makes sense however I worry implementation of it would be incredibly confusing. For example (I haven't thought through all the aspects of this): Currently scripts both live under This means scripts should go under For this particular thing that would mean changes in:
Additionally it would mean introducing a search order for scripts (and probably code to warn users if they have a script named the same thing in both In general I don't think the cost of this is worth it. (Remember Irssi has users who are not hugely familiar with Unix and use this on a shell account; the cost of making a change and then obsoleting random tutorials on the web is very large). |
Did a more involved experiment with data dir included (being bored at airports, yay) I did not move the autorun as it's not completly out of line with XDG to keep it in data even the possibility of doing it with symlinks. The alternative is allowing scripts in config when doing autorun with cp which is "more wrong" imo. if it was a more config like way of doing it I agree it should be in config. I don't think a search order sholud be needed. By @dgl suggestion to use ~/.irssi if it exists. This would mean that ~/.irssi/scripts is the only search path if ~./irssi exists. otherwise ~./.local/share/irssi/scripts is used. |
Except we already have a search order for scripts ($PREFIX/share/irssi/scripts -- e.g. /usr/share/irssi/scripts -- after the local ones). So this seems like a confusing kind of special case. I'm still not convinced the cost of this (both in designing and implementing a nice solution and supporting users using it) is worth it when the only benefit is making someone's home directory look a little bit cleaner. |
Looking at the discussion here I would have to agree that supporting a full XDG spec, and enforcing it by default can get confusing, especially when we mix in data-directories. So lets not do that. How about going for a simpler approach? A partial adherence to the spec if you will.
I think that would be a compromise which would avoid confusion for people who give a rats ass about XDG, while still giving people the option to keep their home-dirs clutter-free. |
Maybe this is the emacsist in me speaking, but I think that would be interpreting it too strictly. As I see it anything which alters the client's behavior (and scripts does that) should be considered configuration. I agree it's a hard line which has to be drawn somewhere, but I think including scripts in the config-folder adheres to the spirit of the spec without creating extra work and needless confusion. |
I also want irssi support |
Any progress on this issue yet? |
Edit: Incorrect. Withdrawn. Disregard. |
@josteink in what way does it support this? I have a FWIW there's always |
Oh. Seems you're right and I'm 100% in the wrong. My bad., I did type the comment out of memory, and somehow I must have mixed something up. Consider my comment withdrawn. |
fix help text wrt SERVER command (cherry picked from commit d33fd0c)
fix help text wrt SERVER command
A quick and dirty patch that tries to load the config from the xdg configured location. This is not very useful on its own but I figured the best way to open the discussion on xdg in irssi is by putting some code out there.
More on XDG Base Directory http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html