From 1e05ec97cb8bf22cfb3b7cf8a2c417a583400a42 Mon Sep 17 00:00:00 2001 From: Mathieu Ablasou Date: Wed, 3 Feb 2021 11:38:32 +0100 Subject: Add Starship configuration --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 0de54c4..fa6cec7 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,28 @@ You can modify your shell [prompt][Prompt customization] to notify you whenever PS1='$(test "$IN_KAKOUNE_CONNECT" && printf 🐈)$ ' ``` +**Example** – with [Starship]: + +`~/.config/starship.toml` + +``` toml +[custom.kakoune_connect_client] +command = 'printf "🐈(${KAKOUNE_CLIENT}@${KAKOUNE_SESSION})"' +when = 'test "$IN_KAKOUNE_CONNECT" = 1 -a -n "$KAKOUNE_SESSION" -a -n "$KAKOUNE_CLIENT"' +shell = ['dash'] +description = 'Indicates that the current shell is connected to a Kakoune client' +style = 'green italic' + +[custom.kakoune_connect_session] +command = 'printf "🐈(${KAKOUNE_SESSION})"' +when = 'test "$IN_KAKOUNE_CONNECT" = 1 -a -n "$KAKOUNE_SESSION" -a -z "$KAKOUNE_CLIENT"' +shell = ['dash'] +description = 'Indicates that the current shell is connected to a Kakoune session' +style = 'green italic' +``` + +[Starship]: https://starship.rs + Available variables are: - `IN_KAKOUNE_CONNECT` (_1_ when _true_) -- cgit v1.2.3