https://github.com/phucleeuwu/cowsay.zsh
โจ๐ Beautiful Cowsay plugin to display jokes (UPDATE DAILY) ๐ฌ
https://github.com/phucleeuwu/cowsay.zsh
awesome-zsh-plugins cowsay zsh zsh-plugins
Last synced: 8 months ago
JSON representation
โจ๐ Beautiful Cowsay plugin to display jokes (UPDATE DAILY) ๐ฌ
- Host: GitHub
- URL: https://github.com/phucleeuwu/cowsay.zsh
- Owner: phucleeuwu
- Created: 2025-02-20T15:43:35.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T17:14:38.000Z (8 months ago)
- Last Synced: 2025-02-20T17:23:24.867Z (8 months ago)
- Topics: awesome-zsh-plugins, cowsay, zsh, zsh-plugins
- Language: Shell
- Homepage: https://github.com/phucleeuwu/my.zsh
- Size: 9.77 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ฎ cowsay.zsh
Zsh plugin that displays a joke with `cowsay` and `lolcat` every time you open a terminal.
## ๐ฅ Installation
### Using Zinit๐ป
```sh
zinit depth"1" lucid nocd light-mode atload"joke" for phucleeuwu/cowsay.zsh
```
### Manual Installation
1. Clone the repository:
```sh
git clone https://github.com/phucleeuwu/cowsay.zsh.git ~/cowsay.zsh
```
2. Source the plugin in your `.zshrc`:
```sh
source ~/cowsay.zsh/cowsay.plugin.zsh
```
3. Restart your terminal:
```sh
source ~/.zshrc
```## ๐ Usage
Just open your terminal! The plugin will automatically display a joke every session
If you don't want automatic display:
```sh
zinit depth"1" lucid nocd light-mode for phucleeuwu/cowsay.zsh
```You can also manually trigger it:
```sh
joke
# for cowsay
```
or:
```sh
dadjoke
# for cowthink
```## ๐ Automatic Joke Updates
This repository includes a GitHub Actions workflow to update `jokes.txt` daily.
To update jokes, use git pull for git install
Zinit update:
```sh
zinit update phucleeuwu/cowsay.zsh
```### Workflow Details:
- Fetches 100 new jokes from `icanhazdadjoke.com`
- Commits and pushes updates to `jokes.txt`
- Runs every day at midnight (UTC)## ๐ Customization
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`.## ๐ง Dependencies
Ensure you have these installed:
- `cowsay`
- `lolcat` (optinal)
- `ripgrep (rg)`
- `jq`Install them via Homebrew:
```sh
brew install cowsay lolcat ripgrep jq
```## ๐ License
MIT License - Feel free to use and modify!---
Made with ๐ฎ๐ฌ by [phucleeuwu](https://github.com/phucleeuwu)