From 929c16f6ad6e19c3f13f6503f10ff9fed77bf215 Mon Sep 17 00:00:00 2001 From: Starfall Date: Mon, 28 Nov 2022 15:24:43 -0600 Subject: zsh: set ZPROF to profile startup time --- .config/zsh/.zshrc | 7 +++++++ 1 file changed, 7 insertions(+) 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 + -- cgit