-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 XDG #137
Comments
Or XDG directories. |
I would highly recommend using the XDG Base Directory Specification and create a hyperterm folder under |
I've suggested a future-facing change in patch #170 for supporting cross platform config directories (including partial support of the XDG Base Directory Spec). I would argue it's best to make this change sooner rather than later. |
HyperTerm should store it in |
While that might be appropriate for a 'traditional' Mac 'App', hyperterm should use |
I set |
That only works if that's where you want everything else that obeys XDG stored. I can't see that anybody seriously wants shell, editor, and other CLI tools' configuration stored in Application Support... |
@OJFord uhhh... sounds like @danielbayley is an anybody, no? |
I do… constantly toggling ‘show hidden files’ gets annoying, as does everything constantly forcing junk into my |
I don't. What place has a Finder preference in an hyperterm discussion? "Toggling hidden files" is accomplished easily with The point here is to have choice; then we both be happy. On Tue, 13 Sep 2016, 02:19 Daniel Bayley, notifications@github.com wrote:
|
HyperTerm is a traditional Mac app. As is Chrome. iTerm, for example, store preferences in
If you're on Linux, that's what |
By 'traditional' I meant "installed via App Store" or "used by non-technical users". HyperTerm on the other hand is used by many who might otherwise - or do alternately - use Linux anyway.
Which is annoying. And not the same as the directory which your claiming is so standard and conventional. It also may not last.
Can you name anything else (non-Electron; so not hit by the same problem) that follows the XDG spec on Linux, but ignores it on macOS? Shells use it, vim uses it; anything that I use on both Linux and Mac respects it on Mac as well. I'm not saying don't fallback on whatever |
I agree… I’m not sure what the debate here even is? HyperTerm should just respect XDG and then everyone is happy, and the user can just set it to whatever they think it should be. |
We're wasting time here. IMHO there's no point on not respecting |
@matheuss This resolves to:
|
Actually, he said:
So can we please do: if (process.env.XDG_CONFIG_HOME !== undefined) {
path = process.env.XDG_CONFIG_HOME + '/hyper';
} else {
path = app.getPath('userData');
} until such time as Electron does this (essentially) itself? (I'm 85% sure I've seen an issue on it, trying to find.) |
So it boils down to which one you use on OS X. But |
@octref On how many Linux distros is In the snipped I posted above, it will be used if it is available. There is zero chance of a macOS-using developer having the environment variable set and not wanting to use it (even if some software set it itself because it didn't exist - which I've seen - at least Hyper would be reusing something known to be in use). If it is not set, fall back on your suggestion, which will use |
Electron does its fair share of respect for Atom, VSCode, Slack, and a lot other popular Electron app all use Seems someone already did it #170. I'll just wait for it to land. |
This just isn't true though!
Even if your 99% is true, it's not good statistics. How many of those 99% apps are configured on the command line? Not many. Of those not many, how many are using I don't want to I also don't want to manually symlink that location to my backed-up/version-controlled dotfiles. I don't have to do anything (other than As @matheuss said, what's the harm in using |
@OJFord XDG just isn't a convention on macOS. Can you name one major Electron app that uses XDG dir on macOS? |
@octref why you're so against it? I don't see any cons on supporting |
No, it's the app that gives me the CLI!
The only relevant Electron app I can name is Atom, where this issue is also complained about - and it doesn't follow XDG on Linux either currently anyway.
Why? It's so quick and easy to implement - the hard part is agreeing on something, which we're hopefully in the process of doing here. I'll happily write it if it comes to that, but I don't care about the credit for something so trivial, so let's discuss first before we rush to having several competing config dir PRs... |
So it's not a CLI app.
So following XDG is not a convention for Electron app on macOS. Not following the convention. Supporting a non-standard. Need to document another non-standard behavior. I've said all I want to say. I just hope the maintainer could make a decision and not leave the PR #170 lingering. |
I think you're missing my point entirely: like CLI apps, Hyper is used by developers.
By "only relevant", I mean "only other exclusively used by developers". I don't care what "other Electron apps" do on macOS - it doesn't matter, why should a user care how Hyper is built? Hyper should do what makes sense for Hyper. You also chose to ignore the point that a tonne of people are asking for Atom to support XDG, the maintainers cautiously want to, and people are annoyed at the suggestion of using
That's not better; it's why |
If a Mac user has went through the effort of setting When a user deliberately sets an environment variable like that, they want their configuration to go there. I end up storing it all together in a repo and symlinking it into Application Support if it's not respected, but that's a step I'd rather not have to deal with. I like to be able to switch back and forth between Linux and OSX without too much friction. |
👍 for … that said, @jcrben's point makes the most sense to me: if someone sets an tl;dr be a good Apple citizen and put it in app-support until the user explicitly asks otherwise (perhaps by setting that envvar.) |
Does everyone commenting about how they use macOS and macOS uses Application Support realise that probably the majority of dotfile directories or *rc files in Almost everything development-related on my Mac behaves this way, it's not some weird Linux quirk people are asking for out-of-blue for Hyper. It's pretty standard. |
Please use the electron API and merge #2948 |
In reference to macOS. Since the ~/Library is by default hidden on Mac, the XDG should be used by command line applications leaving the ~/Library to native macOS applications . |
Is this still unimplemented in any form? I can see a lot of discussion about it but I can't identify if any final position was taken (or followed through). |
XDG is implemented. However you have to set XDG globally (before hyper.app is launched). To work around this issue I added the following lines to my shell config file on macos launchctl setenv XDG_CONFIG_HOME "$XDG_CONFIG_HOME"
launchctl setenv XDG_DATA_HOME "$XDG_DATA_HOME"
launchctl setenv XDG_BIN_HOME "$XDG_BIN_HOME"
launchctl setenv XDG_CACHE_HOME "$XDG_CACHE_HOME"
launchctl setenv XDG_RUNTIME_HOME "$XDG_RUNTIME_HOME"
launchctl setenv PATH "$PATH" I don't think this is documented, it should because the XDG implementation creates several issues:
|
Hi,
I just discovered Hyperterm today and I'm really liking the idea of a web-based terminal (I use Atom as my code editor of choice). However, reading through the documentation, I noticed that configuring the editor (plugins and all) creates several files in your home directory (i.e.
~/.hyperterm.js
and~/.hyperterm_plugins
). I also found issues on this repo like #10 and #14 which propose a possible custom stylesheet file (as well as the addition of an Extensions API).I'd prefer not to clutter my home directory with more hidden files, if possible. Therefore, I feel that all of these files should be consolidated under a single
~/.hyperterm
directory, similar to Atom's. It could have the following structure:...and whatever else might be added.
I figure to migrate current users to the new hierarchy, some backwards-compatibility code could be added which does the following:
.hyperterm
for all configuration/plugins if the directory exists.hyperterm
directory and move~/.hyperterm.js
and~/.hyperterm_plugins
to their new respective pathsThoughts? :)
Caleb
The text was updated successfully, but these errors were encountered: