Zsh plugin that displays a joke with cowsay
and lolcat
every time you open a terminal.
zinit depth"1" lucid nocd light-mode atload"joke" for phucleeuwu/cowsay.zsh
- Clone the repository:
git clone https://github.com/phucleeuwu/cowsay.zsh.git ~/cowsay.zsh
- Source the plugin in your
.zshrc
:source ~/cowsay.zsh/cowsay.plugin.zsh
- Restart your terminal:
source ~/.zshrc
Just open your terminal! The plugin will automatically display a joke every session If you don't want automatic display:
zinit depth"1" lucid nocd light-mode for phucleeuwu/cowsay.zsh
You can also manually trigger it:
joke
# for cowsay
or:
dadjoke
# for cowthink
This repository includes a GitHub Actions workflow to update jokes.txt
daily.
To update jokes, use git pull for git install
Zinit update:
zinit update phucleeuwu/cowsay.zsh
- Fetches 100 new jokes from
icanhazdadjoke.com
- Commits and pushes updates to
jokes.txt
- Runs every day at midnight (UTC)
You can customize the joke behavior by modifying joke.plugin.zsh
. Hereโs what you can do:
- Change joke source: Modify the
jokes_file
path. - Use a specific cowsay character: Replace
ls
with a fixed filename, e.g.,cowsay -f dragon
.
Ensure you have these installed:
cowsay
lolcat
(optinal)ripgrep (rg)
jq
Install them via Homebrew:
brew install cowsay lolcat ripgrep jq
MIT License - Feel free to use and modify!
Made with ๐ฎ๐ฌ by phucleeuwu