Giter Site home page Giter Site logo

pushover-desktop-client's Introduction

Build Status

About

pushover-desktop-client is a tool written in node.js to display Pushover notifications on your desktop. It uses node-notifier so it should work with many different desktop notification providers on many different operating systems.

This project uses the undocumented Pushover websocket API to receive updates about new notifications. You may need to pay to enable the desktop service to use this project.

Using it

First install pushover-desktop-client globally with npm

npm install -g pushover-desktop-client

Then set up your settings file at ~/.config/pushover-dc/settings.json

{
    "secret": "secret obtained from pushover.net"
  , "deviceId": "device id obtained from pushover.net"
}

You can override the location of the settings file with the PUSHOVER_SETTINGS_PATH environment variable.

Alternatively you can use PUSHOVER_DEVICE_ID, PUSHOVER_SECRET, PUSHOVER_IMAGE_CACHE instead of using the settings file at all.

Now you are ready to run:

pushover-desktop-client

Finding Your deviceId and secret

I had to find mine by viewing the source over at the desktop web client. At the time they were at the bottom of the file in the variables Pushover.deviceId and Pushover.userSecret

Running as a service on OSX

I use launchd to keep this thing running and in the background.

Install the plist below in ~/Library/LaunchAgents/com.github.nbrownus.pushover-desktop-client.plist

Make sure to replace {YOUR_USERNAME_HERE} with your username

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.github.nbrownus.pushover-desktop-client.plist</string>
    <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/bin/node</string>
      <string>/usr/local/share/npm/bin/pushover-desktop-client</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceDescription</key>
    <string>Pushover Desktop Client</string>
    <key>ServiceIPC</key>
    <false/>
    <key>StandardErrorPath</key>
    <string>/Users/{YOUR_USERNAME_HERE}/Library/Logs/PushoverDesktopClient/output.log</string>
    <key>StandardOutPath</key>
    <string>/Users/{YOUR_USERNAME_HERE}/Library/Logs/PushoverDesktopClient/output.log</string>
  </dict>
</plist>

Make sure the log directory exists

mkdir -p ~/Library/Logs/PushoverDesktopClient/

Then load the plist

launchctl load ~/Library/LaunchAgents/com.github.nbrownus.pushover-desktop-client.plist

All done!

TODO:

Support the custom sound bytes

pushover-desktop-client's People

Contributors

nbrownus avatar grawity avatar meat-ball avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.