There's a lot of information online which I need to get at regularly in my job. And so I use pushbuttond running on a Raspberry Pi to quickly flip between information dashboards on a spare monitor at my desk.
If I quickly need to see the BBC Bitesize Kanban board ... I push the button.
If I then need to see the shaping board, or our audience stats, or our list of bugs (shh!) ... I push, push, push the button.
I'd love to hear what you use pushthebuttond for, so please get in touch with me. I'm @alicraigmile on twitter.
Cheers, Ali
Connect one side of a button to 3.3v, and the other to ground (via a 10Kohm resistor). Next connext the -ve side to GPIO17 (via a 1Kohm resistor).
Connect the anode of an LED (+ve end) to GPIO4 and the other end to ground (via a 60ohm resistor).
git clone https://github.com/alicraigmile/pushthebuttond.git
cd pushthebuttond
sudo ./install.sh
sudo service pushthebuttond start
sudo service pushthebuttond stop
service pushthebuttond status
sudo update-rc.d pushthebuttond defaults
When the service is running, pushing the button will cause the job (default: loop-dashboards) to run.
When a job is running the LED will light.
When it completes, the LED will flash twice.
That's about it!
You'll need to edit the pushthebuttond script to change the job which runs.
I've supplied a few different options:
- loop-dashboards - launch chromium browser in kiosk mode. A push of the button loops through a series of web addresses specified in the script (default)
- speak-the-time - um, it tells you the time.
- launch-xeyes - each push of the button adds a new set of eyes to follow you around the room
With the service stopped, run the script called blink to test the LED.
pushthebuttond has it's very own log file.
tail /var/log/pushthebuttond.log
If you can write a shell script, and as long as it's somewhere sensible (e.g. /usr/local/bin) then pushthebuttond will be able to find it and run it.
Imagine the possibilities.
pushthebuttond could:
- Play you some music
- Tweet something
- Save a bookmark for you
- Take a photo from an attached webcam
- Tell your CI environment to start a build or deploy your website
What would you have it do?