actuallymentor / battery

CLI/GUI for managing the battery charging status for Apple silicon (M1, M32, M3) Macs
MIT License
3.48k stars 145 forks source link

It would be nice if your application would respect XDG_CONFIG_HOME ($HOME/.config) #208

Open rafo opened 9 months ago

rafo commented 9 months ago

Is your feature request related to a problem? Please describe. It would be nice if your application would respect the XDG_CONFIG_HOME, which defaults to $HOME/.config. It's nice to have an uncluttered $HOME!

Describe the solution you'd like It looks like setup.sh defines some temp- and configfolder settings and battery.sh uses them and start the app (?) but I didn't test it.

I dont know anything about electron apps but i think it would be much cleaner to use a standard library to read the XDG_CONFIG_HOME env. If you want, define your own env BATTERY_CONFIG etc.

Additional context

https://wiki.archlinux.org/title/XDG_Base_Directory

actuallymentor commented 8 months ago

I like your thinking @rafo, an uncluttered home is nice indeed.

How is XDG_RUNTIME_DIR read? I get an empty state when I access it through CLI.

Do you have the bandwidth to PR for this?

twio142 commented 1 month ago

I'd also like to see ~/.battery be moved to $XDG_CONFIG_HOME/. I don't have $XDG_RUNTIME_DIR set neither, but $XDG_CONFIG_HOME would do. And ~/.battery could be a fallback solution.