about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.config/zsh/.zshrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index f1255c8..18991dd 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -1,3 +1,6 @@
+# set ZPROF to measure startup time
+[[ -v ZPROF ]] && zmodload zsh/zprof
+
 # plugin - fzf
 # arch puts these here
 if [[ -a /usr/share/fzf/key-bindings.zsh ]] && [[ -a /usr/share/fzf/completion.zsh ]]; then
@@ -36,7 +39,11 @@ unset conf
 # display a fortune when opening an interactive terminal
 tty -s && fortune $HOME/fortunes 2>/dev/null ||:
 
+# set ZPROF to profile startup time
+[[ -v ZPROF ]] && zprof
+
 # startx if not already running an x server (e.g. via display manager) and only on tty1
 if (command -v startx &>/dev/null) && [ -z "${DISPLAY}" ] && [ "$(tty)" = "/dev/tty1" ]; then
 	exec startx
 fi
+