Closed KAGEYAM4 closed 1 month ago
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
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 :wink:
For reference you can use this - https://github.com/sunner/ChatALL
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 :sweat_smile:
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
."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.
Everything in ~/.config/ is lowercased, kando is the only one with uppercase. Can you please change the folder to have lower-case letter.