Skip to content
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

Change ~/.config/Kando to lower-case - ~.config/kando #411

Closed
KAGEYAM4 opened this issue May 6, 2024 · 4 comments · Fixed by #436
Closed

Change ~/.config/Kando to lower-case - ~.config/kando #411

KAGEYAM4 opened this issue May 6, 2024 · 4 comments · Fixed by #436
Labels
feature request New feature or request Linux

Comments

@KAGEYAM4
Copy link

KAGEYAM4 commented May 6, 2024

Everything in ~/.config/ is lowercased, kando is the only one with uppercase. Can you please change the folder to have lower-case letter.

@KAGEYAM4 KAGEYAM4 changed the title Change ~/.config/Knado to lower-case - ~.config/kando Change ~/.config/Kando to lower-case - ~.config/kando May 6, 2024
@KAGEYAM4
Copy link
Author

KAGEYAM4 commented May 6, 2024

I just checked and this maybe an issue with electron, every applications that i have on my system that uses electron has first-letter-capital in .config

@Schneegans Schneegans added feature request New feature or request Linux labels May 6, 2024
@Schneegans
Copy link
Contributor

Yeah, that's the Electron default behavior. I think it can be overridden, though. I'll look into it. However, even if it's possible, I'll most likely defer this to the 1.0.0 release as it's going to be a very breaking change 😉

@KAGEYAM4
Copy link
Author

KAGEYAM4 commented May 11, 2024

For reference you can use this - https://github.com/sunner/ChatALL

Schneegans added a commit that referenced this issue Jun 1, 2024
@Schneegans
Copy link
Contributor

I did some investigations... This is a surprisingly difficult thing! I guess there is a reason why most Electron apps stick to the upper-case config directory 😅

I have found a solution though. It's not pretty, but it seems to do the trick. If somebody else finds a better solution, I would be very open! For future reference, here is what I attempted:

  • app.setPath('userData', path.join(app.getPath('appData'), 'kando'));: This works, but it has to be called at a point where app.requestSingleInstanceLock() had been called before. As a consequence, all config files will be in ~/.config/kando, but some additional files will still be in ~/.config/Kando.
  • Remove the "productName": "Kando" from the package.json: This is the string which is used by Electron on Linux for the config directory. If it is not present, it will fall back to the "name": "kando". The problem is that the productName is used as application name on all platforms. On Linux, we can override what is written to the .desktop file, but on Windows and macOS we can't. So this results in lower-case application names on those platforms.

The current solution

I have now used run-script-os to execute npm pkg delete productName on Linux before every build and instead set the productName for the deb and rpm packagers. As a consequence, the package.json file will always contain changes after the build process. This is not a real problem, but it may be confusing.

@Schneegans Schneegans mentioned this issue Jun 1, 2024
@Schneegans Schneegans linked a pull request Jun 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants