A simple Python script to display your unread GitHub issues directly in Polybar.
- Shows the number of unread GitHub issues.
- Displays a warning icon if authentication fails or a network error occurs.
- Fully compatible with Polybar.
This project uses the following Python libraries:
-
Asynchronous HTTP client/server framework for asyncio and Python.
Licensed under the Apache License 2.0.
-
GitHub API client for Python.
Licensed under the Apache License 2.0.
- Install JetBrainsMono Nerd Font:
- Download and install Nerd Fonts
- Create a Python virtual environment (if not already created):
mkdir -p ~/.local/python-envs/polybar
python3 -m venv ~/.local/python-envs/polybar
source ~/.local/python-envs/polybar/bin/activate
pip install aiohttp gidgethub
- Clone or download this repo to your system:
cd ~/.config/polybar/scripts/
git clone https://github.com/talaev-sergey/polybar-gh-issues.git
- Make it executable:
chmod +x ~/.config/polybar/scripts/polybar-gh-issues/main.py
Add the following module to your ~/.config/polybar/modules.ini
:
[module/github_issues]
type = custom/script
exec = ~/.config/polybar/scripts/polybar-gh-issues/main.py
interval = 60
- ❕ Recommended to set interval >= 60 seconds to avoid excessive load on CPU and network
and add module to ~/.config/polybar/config.ini
:
module-left= ...
module-center= github_issues
module-right= ...
Before using, edit the script to add your GitHub personal access token and username:
TOKEN = "your_personal_access_token"
USERNAME_GITHUB = "your_github_username"
- TOKEN: Generate a GitHub personal access token with
notifications
scope: GitHub Token - USERNAME: Your GitHub username.
After configuring Polybar, your bar will show:
no unread issues.
number of unread issues.
error in authentication.
or network issue.
- Ensure your virtual environment Python path matches the shebang at the top of the script:
#!/home/user/.local/python-envs/polybar/bin/python
- This script requires Python 3.13+.
This project is licensed under the MIT License.