-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use powerlevel10k instant prompt with zim+
Zim does play well with powerlevel10k instant prompt. It also "has one function to install plugins and another to load them", contratry to what the zsh-bench README.md mentions.
- Loading branch information
Showing
4 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
zmodule completion | ||
zmodule romkatv/powerlevel10k | ||
zmodule zsh-users/zsh-autosuggestions | ||
zmodule zsh-users/zsh-syntax-highlighting | ||
zmodule zsh-users/zsh-autosuggestions | ||
zmodule romkatv/powerlevel10k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
setopt no_global_rcs | ||
|
||
# Define Zim location | ||
ZIM_HOME=~/.zim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
# If not in tmux, start tmux. | ||
if [[ -z ${TMUX+X}${ZSH_SCRIPT+X}${ZSH_EXECUTION_STRING+X} ]]; then | ||
exec tmux | ||
fi | ||
|
||
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then | ||
# Download zimfw script if missing. | ||
command curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh | ||
fi | ||
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then | ||
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated. | ||
source ${ZIM_HOME}/zimfw.zsh init -q | ||
fi | ||
|
||
# Activate Powerlevel10k Instant Prompt. | ||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | ||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | ||
fi | ||
|
||
ZSH_AUTOSUGGEST_MANUAL_REBIND=1 | ||
|
||
# Load plugins. | ||
source ${ZIM_HOME}/init.zsh | ||
|
||
source ~/.p10k.zsh |