zsh-presenter-mode
November 5, 2025 ยท View on GitHub
Zsh plugin to expand aliases during presentations.
It also increases the terminal window's contrast to enhance visibility. :wink:
:floppy_disk: Installation
Using Zinit
Add the snippet below to your .zshrc file.
zinit ice wait'0' lucid
zinit light idadzie/zsh-presenter-mode
# or using the for syntax.
zinit light-mode for idadzie/zsh-presenter-mode
Manual
Clone this repository and source the zsh-presenter-mode.plugin.zsh file in your .zshrc file.
# Clone this repository.
git clone https://github.com/idadzie/zsh-presenter-mode.git $XDG_DATA_HOME/zsh-presenter-mode
# Append to your .zshrc file.
echo "source $XDG_DATA_HOME/zsh-presenter-mode/zsh-presenter-mode.plugin.zsh" | tee -a "${ZDOTDIR:-$HOME}/.zshrc"
:rocket: How to use
In any terminal window, use the key binding Ctrl P,Ctrl M or the alias presenter-toggle to quickly switch between modes.
:wrench: Customisation
You can change the default key binding by adding the snippet below to your .zshrc.
bindkey '\e\e' toggle-presenter-mode
To not pollute the global namespace, there's a single $PRESENTER_MODE hash you can add to your .zshrc to customise the default parameters before loading this plugin.
| Hash Field | Description |
|---|---|
| PRESENTER_MODE[BANNER_SHOW] | Show banner text when presentation mode is activated. Default: 1 |
| PRESENTER_MODE[SHOW_PREEXEC_ARRAY] | Show preexec array when presentation mode is toggled. Default: 0 |
| PRESENTER_MODE[BANNER_TEXT] | Banner text when presentation mode is activated. Default: PRESENTATION MODE |
| PRESENTER_MODE[BG_DEFAULT] | Background colour to set after presentation mode is deactivated. Default: #282828 |
Example
declare -A PRESENTER_MODE
PRESENTER_MODE[BANNER_TEXT]='Welcome to My TED Talk!'
PRESENTER_MODE[BG_DEFAULT]='#2c2c2c'
PRESENTER_MODE[SHOW_PREEXEC_ARRAY]=1
# Load the plugin below.
...
:handshake: Credit
The main presenter_mode_{start,stop} functions were borrowed from robobenklein's amazing dotfiles.
:sparkling_heart: Like this project ?
Leave a :star: If you think this project is cool.