Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idadzie/zsh-presenter-mode
:mega: Expand your aliases during presentations
https://github.com/idadzie/zsh-presenter-mode
alias aliases presentations terminal zinit zsh zsh-plugin zshell
Last synced: 27 days ago
JSON representation
:mega: Expand your aliases during presentations
- Host: GitHub
- URL: https://github.com/idadzie/zsh-presenter-mode
- Owner: idadzie
- License: mit
- Created: 2019-07-12T22:40:32.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T13:40:38.000Z (over 1 year ago)
- Last Synced: 2024-09-29T08:20:10.726Z (about 1 month ago)
- Topics: alias, aliases, presentations, terminal, zinit, zsh, zsh-plugin, zshell
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zsh-presenter-mode
[![Maintenance][maintenance badge]]()
Zsh plugin to expand aliases during presentations.
It also increases the terminal window's contrast to enhance visibility. :wink:
## :floppy_disk: Installation
### Using [Zinit][zinit]
Add the snippet below to your **.zshrc** file.
```zsh
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.
```zsh
# 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**.
```zsh
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}][presenter-mode] functions were borrowed from [robobenklein's][robo] amazing [dotfiles][dotfiles].
## :sparkling_heart: Like this project ?
Leave a :star: If you think this project is cool.
[maintenance badge]: https://img.shields.io/maintenance/yes/2023.svg
[zinit]: https://github.com/zdharma-continuum/zinit
[robo]: https://github.com/robobenklein
[dotfiles]: https://github.com/robobenklein/configs
[presenter-mode]: https://github.com/robobenklein/configs/blob/master/zsh/plunks/presenter-mode.zsh