Simple pushbullet-notifier for Linux desktop.
The Chrome extension store has ended support for MV2 extensions and the author has no plans to port the Pushbullet extension to MV3 as far as am aware.
So we make our own replacement listener client using the API. And queue incoming notifications to desktop using notify-send
.
python
and libnotify
.
Works on:
- Extremely simple - Uses std python libraries for websocket connections to Pushbullet's API.
- Local cache of client pushes.
- Auto-resume from last message & is resilient against network drops.
-
Get API Access Token from https://www.pushbullet.com/#settings/account
-
Create pushbullet client aka $DEVICE_ID.
curl -u $PUSHBULLET_API_KEY: -X POST https://api.pushbullet.com/v2/devices \ -H "Content-Type: application/json" \ -d '{"nickname": "LinuxPC", "icon": "laptop"}'
from the response
iden
is your$PUSHBULLET_DEVICE_ID
-
Run the python app as a daemon service to listen for new pushes
Configure the environment variables in the service
nano ~/.config/systemd/user/pushbullet-notify.service
[Unit] Description=Pushbullet Notification Service After=graphical-session.target network-online.target Requires=graphical-session.target [Service] ExecStartPre=/bin/sleep 15 ExecStart=%h/.stuff/push.py Restart=on-failure RestartSec=10 WorkingDirectory=%h/.stuff # Pushbullet API Environment="PUSHBULLET_API_KEY=o.8ZxSAMPLEpKo8uRp" Environment="PUSHBULLET_DEVICE_ID=ujxSAMPLEZ32i" [Install] WantedBy=graphical-session.target
and run:
systemctl --user start pushbullet-notify.service
Learn more about the pushbullet API here: https://docs.pushbullet.com/