Pre-Poetry support, we only entered this codepath when we were inside a
virtualenv. Now we enter it for every directory, but we don't want to
display an empty segment for non-virtualenv locations.
We were comparing virtualenv's name to pyenv's version, which would
never be the same.
Now this setting works as intended, although I'm not sure how useful it
is. It's probably more useful to reorder this logic so virtualenv has
precedence.
Heavily based on #1994.
Integrate Poetry virtualenv detection into the existing virtualenv
segment. For poetry virtualenvs, use the package name as reported by
`poetry version`.
The logic for finding the data directory is as follows:
1. Find the root directory:
1.1 If TIMEWARRIORDB is set, use that.
1.2 Else if ~/.timewarrior is an existing directory, use that.
1.3 Else if XDG_DATA_HOME is set, use $XDG_DATA_HOME/timewarrior.
1.4 Else use ~/.local/share/timewarrior.
2. Append "/data" to the root directory.
- Link to the project's homepage rather than its source code.
- Move `chezmoi_shell` next to all the other *shell indicator* segments.
- Use a shade of blue that resembes the color on chezmoi.io.
- Don't go beyond 8 colors in 8-color configs.
- Remove the segment from the *pure* config.
- Fix whitespace padding on `CHEZMOI_ICON`.
- Use the appropriate icon with all fonts (the same as `HOME`).
- Add missing `CHEZMOI_ICON` definitions for "powerline" and "ascii" font modes.
- Remove the redundant literal "chezmoi" content from the segment.
- Fix instant prompt so that the segment is shown only when `$CHEZMOI` is non-empty.