From 181f79f5899088e5c91e88a05c27dbd5bb779632 Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Tue, 18 Jun 2024 04:37:49 +0200 Subject: [PATCH] add alt color --- data/home/.machine_env | 4 +++- data/home/.p10k.zsh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/home/.machine_env b/data/home/.machine_env index c136b3d..d33ab05 100644 --- a/data/home/.machine_env +++ b/data/home/.machine_env @@ -13,4 +13,6 @@ function random_from { # generated variables -export MACHINE_COLOR=$(random_from 1 2 3 4 5 6 9 10 11 12 13 14) +mb_colors=$(random_from 1:9 2:10 3:11 4:12 5:13 6:14 9:1 10:2 11:3 12:4 13:5 14:6) +export MACHINE_COLOR=$(echo $mb_colors | cut -d ':' -f 1) +export MACHINE_COLOR_ALT=$(echo $mb_colors | cut -d ':' -f 2) diff --git a/data/home/.p10k.zsh b/data/home/.p10k.zsh index d214111..57174d3 100644 --- a/data/home/.p10k.zsh +++ b/data/home/.p10k.zsh @@ -216,7 +216,7 @@ # Replace removed segment suffixes with this symbol. typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= # Color of the shortened directory segments. - typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=$MACHINE_COLOR_ALT # Color of the anchor directory segments. Anchor segments are never shortened. The first # segment is always an anchor. typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=011