🦊 BREAKING: Use new XDG Base specification for state (#5)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Switched the history from using the XDG_CACHE_HOME directory by default to use XDG_STATE_HOME by default. This makes sense since cache can (and should be prepared to) be wiped at any moment and the program functionality should not be hindered by this. Since we need to retain history through such wipes the newly introduced state directory is the perfect match for keeping the history file in. This does constitute a breaking change for existing histories which need to be moved to the new directory if they made use of the old cache directory. Concurrent with this we are renaming `XDG_CACHE_LOCATION` environment variable to `XDG_HISTORY_LOCATION` so this is a second breaking change for those using a custom location for their histories. This change attempts to make the naming scheme coherent and remove some left-over naming cruft from the old location being the cache directory. This provides one of the larger changes to the program so far. Fixes #5.
This commit is contained in:
parent
4209b90669
commit
59d436a944
5 changed files with 28 additions and 21 deletions
|
|
@ -144,14 +144,14 @@ If you don't wish those to show up, make use of these options.
|
|||
|
||||
### Setting custom directories
|
||||
|
||||
By default bemoji stores your recent history in `$XDG_CACHE_HOME/bemoji-history.txt`,
|
||||
so most often in `~/.cache/bemoji-history.txt`
|
||||
By default bemoji stores your recent history in `$XDG_STATE_HOME/bemoji-history.txt`,
|
||||
so most often in `~/.local/state/bemoji-history.txt`
|
||||
|
||||
You can overwrite the directories bemoji uses for its emoji lists and history files with the following two environment variables:
|
||||
|
||||
```
|
||||
BEMOJI_DB_LOCATION=/path/to/my/emoji/directory
|
||||
BEMOJI_CACHE_LOCATION=/path/to/my/cache/directory
|
||||
BEMOJI_HISTORY_LOCATION=/path/to/my/state/directory
|
||||
```
|
||||
|
||||
There are no equivalent commandline arguments to overwrite these two settings.
|
||||
|
|
@ -247,7 +247,7 @@ with their default settings
|
|||
|
||||
```bash
|
||||
BEMOJI_DB_LOCATION=$XDG_DATA_HOME/bemoji # where the emoji lists reside
|
||||
BEMOJI_CACHE_LOCATION=$XDG_CACHE_HOME # where the cache file resides
|
||||
BEMOJI_HISTORY_LOCATION=$XDG_STATE_HOME # where the state file resides
|
||||
BEMOJI_CUSTOM_LIST="" # the custom emoji list to display
|
||||
BEMOJI_DOWNLOAD_LIST="" # the default emoji lists to download to database
|
||||
BEMOJI_DEFAULT_COMMAND=<clip-tool> # which command to invoke by default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue