From 6217e63fd2f03249414517eb1e89f993b3d4156b Mon Sep 17 00:00:00 2001 From: Clumsy-Coder <19594044+Clumsy-Coder@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:38:28 -0700 Subject: [PATCH] refactor(zsh:p10k): disable gitstatusd if running on Raspberry Pi ## what - disable gitstatusd if running on Raspberry Pi ## how ## why - don't need to run gitstatusd on smaller hardware ## where - ./tools/zsh/theme/powerlevel10k/classic.zsh ## usage ## issue or pull request --- tools/zsh/theme/powerlevel10k/classic.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/zsh/theme/powerlevel10k/classic.zsh b/tools/zsh/theme/powerlevel10k/classic.zsh index a60e5bc..9e11adc 100644 --- a/tools/zsh/theme/powerlevel10k/classic.zsh +++ b/tools/zsh/theme/powerlevel10k/classic.zsh @@ -1672,4 +1672,10 @@ typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} # disable gitstatusd # obtained from https://github.com/romkatv/powerlevel10k/issues/246#issuecomment-538896199 -POWERLEVEL9K_DISABLE_GITSTATUS=true +if [[ -e "/proc/device-tree/model" ]]; then + # disable gitstatusd if running on Raspberry pi + if grep -qi "raspberry" "/proc/device-tree/model" ; then + POWERLEVEL9K_DISABLE_GITSTATUS=true + fi +fi +