warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.27k stars 370 forks source link

Warp doesn't respect `$XDG_CONFIG_HOME` #814

Open askoufis opened 2 years ago

askoufis commented 2 years ago

Describe the solution you'd like?

Warp should ideally respect the `XDG_CONFIG_HOME` environment variable, as specified [here](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).

Is your feature request related to a problem? Please describe.

I (and I assume lots of other people) prefer to store config somewhere other than my home directory, for example `~/.config`. As of version `v0.2022.03.14.08.49.stable_00`, keybindings are now stored in `~/.warp/keybindings.yaml`. If a user has configured `XDG_CONFIG_HOME`, this file should be stored in `warp/keybindings.yaml` within that folder.

Additional context

No response

sebdanielsson commented 2 years ago

Yes please make this happen. I don't want my home dir cluttered with app config.

For example custom themes should be stored at: ~/.config/warp/themes/themename.yaml

mrolli commented 1 year ago

This is a must have for me. I mean, this is a no-brainer to implement, but a showstopper for me.

realitymolder commented 1 year ago

Wow same, I enjoy warp, but it's hard to use applications that don't respect XDG specs in 2022

mrolli commented 1 year ago

Wow same, I enjoy warp, but it's hard to use applications that don't respect XDG specs in 2022

And especially if you intend to land on Linux, where respecting XDG is a common thing nowadays. Even on macOS, a lot of apps stopped polluting $HOME and are respecting XDG, kitty, alacritty, ... just to name some other popular Terminal alternatives.

Actually one might even argue, that using $HOME on macOS is the badest choice. Either honour XDG or use the macOS default, which would be ~/Library/Application Support/$APP/.

But as I said, it's so easy to implement:

config_home="${XDG_CONFIG_HOME:-$HOME}/warp"

Done, backwards compatible. And the same for the other $XDG_* environment variables.

I can't understand why this ticket is lingering around that long already.

MurtadhaInit commented 8 months ago

I imagine this is not too hard to implement. Just add a condition to search for the $XDG_CONFIG_HOME environment variable, and if it's defined, use it. Otherwise, place the config directory in $HOME like it's currently doing. This is what almost every tool (and terminal) are using to place their config files anyways.

I'd really love for this to be implemented.

pauliesnug commented 3 days ago

bumping