Skip to content

Commit

Permalink
install: move FreeDesktop XDG recommentation to hint for user config
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Sep 15, 2023
1 parent 86b0733 commit f9e5ca2
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions docs/install/clojure-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ The Clojure CLI automatically downloads all library dependencies, including the

=== "Linux"

Practically recommends setting `XDG_CONFIG_HOME` to the `.config` directory, to avoid creating another dot directory in the root of the user account. Add the following to `~/.bashrc` for the bash shell or `~/.zshenv` for Zsh.

```
export XDG_CONFIG_HOME="$HOME/.config"
```

Use the Linux script installer from [Clojure.org - Getting Started](https://clojure.org/guides/getting_started#_installation_on_linux) to install or update to the latest stable release

```shell
Expand Down Expand Up @@ -97,6 +91,23 @@ Add a wide range of community tools to extend the capabilities of Clojure CLI vi

Fork or clone [:fontawesome-solid-book-open: Practicalli Clojure CLI Config](https://github.com/practicalli/clojure-cli-config){target=_blank} GitHub repository, first removing the `$XDG_CONFIG_HOME/clojure` and `$HOME/.clojure` directory if they exist.

!!! INFO "Practicalli recommends using FreeDesktop XDG configuration locations"
Practically recommends setting `XDG_CONFIG_HOME` to the `.config` directory, to avoid creating another dot directory in the root of the user account.

Configure `~/.bashrc` for the bash shell
```shell title="Bash .bashrc file"
export XDG_CONFIG_HOME="$HOME/.config"
```

Configure `~/.zshenv` for Zsh
```shell
# Set XDG_CONFIG_HOME for clean management of configuration files
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:=$HOME/.local/share}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:=$HOME/.cache}"
export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}"
```

=== "Free Desktop XDG CONFIG"
If `XDG_CONFIG_HOME` environment variable is set, clone the repository to `$XDG_CONFIG_HOME/clojure`

Expand Down

0 comments on commit f9e5ca2

Please sign in to comment.