/polybar-module-earthquake

Polybar module for showing magnitude, location and time of the latest seismic event on Earth.

Primary LanguageShellMIT LicenseMIT

Polybar Module - Earthquake

Description

This polybar module shows magnitude, location and time of the latest seismic event on Earth.

For more information about which earthquakes are shown, see ComCat Documentation.

Screenshots

Screenshot of polybar module: earthquake

Output of this script

USGS event page for earthquake with id ci38412120

USGS event page - M 1.5 - 13km SSW of Big Bear Lake, CA (mouse left click)

Location of the event on Google Maps

Location of the seismic event on Google Maps (mouse right click)

Installation

Clone or download this repository, then run the following commands:

$ cd polybar-module-earthquake  # directory where you clone the repository or unzip the release file
$ sh install.sh

Enable this module in your bar, e.g:

[bar/mybar]
...
modules-left = earthquake ...

Finally, restart polybar.

Dependencies

This script requires bash, jq for parsing data, and curl or wget for downloading data.

Configuration

You can change the behavior of this module, by editing the following files:

  • ~/.config/polybar/scripts/earthquake/earthquake.conf (for appearence and behavior of the script);
  • ~/config/polybar/scripts/earthquakes/module.conf (for binding to mouse buttons).

Running

By default the module cyclically shows magnitude, title and time of the seismic events in the last hour. You can change this behavior by clicking with the middle button of your mouse on the bar. So the bar will show the latest earthquake and, after another middle click, the event with max magnitude, and so on.

License

This software is licensed under the MIT license. See LICENSE.