diff .chezmoiscripts/run_onchange_after_43-setup-fish.sh.tmpl @ 1040:ea090c39e480

feat: enable fish theme
author Zeger Van de Vannet <zeger@vandevan.net>
date Mon, 29 Apr 2024 18:33:04 +0200
parents
children e5903280a5f6 e2542163359a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.chezmoiscripts/run_onchange_after_43-setup-fish.sh.tmpl	Mon Apr 29 18:33:04 2024 +0200
@@ -0,0 +1,21 @@
+{{ if (eq .chezmoi.os "linux") -}}
+#!/usr/bin/env fish
+
+{{ $theme := "NONE" -}}
+{{ if .dark -}}
+{{ $theme = "Catppuccin Mocha" -}}
+{{ else -}}
+{{ $theme = "Tutti Colori" -}}
+{{ end -}}
+
+{{ $themepath := (list "dot_config/private_fish/themes/" $theme  ".theme") | join "" -}}
+{{ if $themepath | lstat -}}
+# Template hash: {{ include $themepath | sha256sum -}}
+{{ end -}}
+echo "Setting fish theme to {{ $theme }}"
+yes | fish_config theme save "{{ $theme }}"
+
+# Fish_plugin hash: {{ include "dot_config/private_fish/fish_plugins" | sha256sum -}}
+fisher update
+
+{{ end }}