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.
`ifconfig`'s formatting doesn't cope well with long interface names. In
these cases it will eat up the whitespace separating the name from the
text "Link" in the output, which makes parsing the output problematic.
e.g. `ifconfig`:
wlp0s20f0u2Link encap:Ethernet HWaddr 00:AA:BB:CC:DD:EE
v.s `ip`:
21: wlp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc \
mq state UP group default qlen 1000
This commit swaps the order of detection inside
`_p9k_prompt_net_iface_async()`, so that `ip` will be preferred.
`ifconfig` is deprecated by distros in favour of `ip`, so this will
often be an incredibly marginal performance boost :)
NOTE: this commit does not address the problem with using `ifconfig`. I
don't understand the zsh regex, so have not touched it.
POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN defines a pattern that
RUBY_ENGINE should match for it to be shown. Matching is done
with extended_glob.
For example, to show all values of RUBY_ENGINE except "ruby":
POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN='^ruby'
If POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN is unset and
POWERLEVEL9K_CHRUBY_SHOW_ENGINE is set to true,
the behavior is the same as if POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN
was set to *.
Previously, the chruby segment looks like this for standard and
non-standard ruby implementations respectively:
```
Ruby ruby 3.1.2
Ruby truffleruby 3.0.3
```
While displaying the RUBY_ENGINE is helpful for non-standard
implementations, showing it for "ruby" results in "Ruby ruby" which
feels redundant.
This commit adds a new configuration option to disable showing the
RUBY_ENGINE when it is "ruby". Other values for RUBY_ENGINE will always
display as before:
```
Ruby 3.1.2
Ruby truffleruby 3.0.3
```
This also makes the formatting more similar to the asdf segment:
```
Ruby 3.1.2
Ruby truffleruby-22.3.0
```