Skip to content

A simple Polybar script that displays a GitHub icon with the number of unread issues from your repositories using PyGithub and Nerd Font icons.

License

Notifications You must be signed in to change notification settings

talaev-sergey/polybar-gh-issues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Issue Notifier for Polybar

Python GitHub License

A simple Python script to display your unread GitHub issues directly in Polybar.

Description

Features

  • Shows the number of unread GitHub issues.
  • Displays a warning icon if authentication fails or a network error occurs.
  • Fully compatible with Polybar.

Requirements

This project uses the following Python libraries:


Installation

  1. Install JetBrainsMono Nerd Font:
  1. 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
  1. Clone or download this repo to your system:
cd ~/.config/polybar/scripts/
git clone https://github.com/talaev-sergey/polybar-gh-issues.git
  1. Make it executable:
chmod +x ~/.config/polybar/scripts/polybar-gh-issues/main.py

Polybar Configuration

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= ...

Configuration

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.

Usage

After configuring Polybar, your bar will show:

no unread issues.

img

number of unread issues.

img

error in authentication.

img

or network issue.

img

Notes

  • 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+.

License

This project is licensed under the MIT License.

About

A simple Polybar script that displays a GitHub icon with the number of unread issues from your repositories using PyGithub and Nerd Font icons.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages