A simple Go-based tool to show Basecamp notification counts in your Waybar. It uses your browser's cookies to authenticate with Basecamp and provides a JSON output compatible with Waybar's custom modules.
- Automatic Authentication: Leverages existing browser cookies (Chrome/Chromium-based).
- Systemd Integration: Runs as a background service with a timer to keep notification counts updated.
- Waybar Compatible: Outputs JSON in the format Waybar expects.
- Easy Setup: Interactive setup command to configure your account and browser profile.
- Linux (Tested on Wayland/Sway/Hyprland)
- curl: Required for the automatic installation script.
You can install waybar-basecamp by downloading and running the installation script directly:
curl -sL https://github.com/jturmel/waybar-basecamp/releases/latest/download/install.sh | bashThe script will:
- Download the latest binary and systemd files.
- Install them to
~/.local/bin/waybar-basecamp/. - Run an interactive setup if no configuration exists.
- Set up and start a systemd user timer.
If you have Go installed, you can build and install manually:
- Clone the repository:
git clone https://github.com/jturmel/waybar-basecamp.git cd waybar-basecamp - Build the binary:
make build
- Run the installation script:
./install.sh
During installation, you will be prompted for:
- Browser Profile: The name of your Chrome/Chromium profile folder (e.g.,
Default,Profile 1). - Account ID: Your Basecamp account ID, found in the URL after logging in (e.g.,
https://3.basecamp.com/1234567/...).
You can re-run the setup anytime:
~/.local/bin/waybar-basecamp/waybar-basecamp setupAdd the following to your Waybar configuration (usually ~/.config/waybar/config or config.jsonc):
Add it to your bar modules:
"modules-right": [
...
"custom/basecamp",
...
],After adding the configuration, you may need to reload Waybar (usually:
pkill -SIGUSR2 waybaror restarting your compositor session).
You can style the module in style.css:
#custom-basecamp {
padding: 0 10px;
color: #ffffff;
}
#custom-basecamp.unread {
color: rgb(253, 224, 71);
font-weight: bold;
}
#custom-basecamp.empty {
padding: 0;
margin: 0;
}
#custom-basecamp.error {
color: #ff5555;
}waybar-basecamp check: This command (triggered by systemd) reads your browser cookies, fetches the notification count from Basecamp's API, and writes the result to/tmp/waybar_basecamp.json.- Systemd Timer: Runs every minute to update the notification count.
- Waybar: Reads the JSON file and displays the count. The tool sends a signal (
RTMIN+8) to Waybar to refresh the module immediately after a check.
This repository includes a post-commit hook to automatically clean up any local waybar-basecamp binaries after a commit. To enable it, run:
make setup-hooks