From f5727791907e2cd8973f7406a8467e94e99b3290 Mon Sep 17 00:00:00 2001 From: David Kizivat Date: Mon, 9 Sep 2024 09:34:17 +0200 Subject: [PATCH 1/2] remove "detached at" text --- zen.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zen.toml b/zen.toml index 7edb6f0..b3127bf 100644 --- a/zen.toml +++ b/zen.toml @@ -24,7 +24,10 @@ console_title_template = '{{ .Shell }} in {{ .Folder }}' style = 'plain' foreground = 'p:grey' background = 'transparent' - template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' + template = """ \ +{{if not .Detached}}{{ .HEAD }}{{else}}@{{ printf "%.7s" .Commit.Sha }}{{end}}\ +{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }} +""" [blocks.segments.properties] branch_icon = '' From e08aee4c2012f5c9cb6845bd5b6df69b1e4646cd Mon Sep 17 00:00:00 2001 From: David Kizivat Date: Mon, 9 Sep 2024 09:35:56 +0200 Subject: [PATCH 2/2] fix new line --- zen.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zen.toml b/zen.toml index b3127bf..9f7e601 100644 --- a/zen.toml +++ b/zen.toml @@ -26,7 +26,7 @@ console_title_template = '{{ .Shell }} in {{ .Folder }}' background = 'transparent' template = """ \ {{if not .Detached}}{{ .HEAD }}{{else}}@{{ printf "%.7s" .Commit.Sha }}{{end}}\ -{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }} +{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}\ """ [blocks.segments.properties]