diff options
author | Starfall <us@starfall.systems> | 2022-11-28 15:24:43 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-11-28 15:24:43 -0600 |
commit | 929c16f6ad6e19c3f13f6503f10ff9fed77bf215 (patch) | |
tree | 910367277c85113b080db741e8fa4b11ba374630 | |
parent | e89727e8d24fb498057dec0599fcb96aaeaa4d49 (diff) |
zsh: set ZPROF to profile startup time
-rw-r--r-- | .config/zsh/.zshrc | 7 |
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 + |