A simple bash script to notify major earthquakes from USGS. [What counts as a significant earthquake?]
Download bash script and make executable
curl 'https://raw.githubusercontent.com/Raais/ewalert/main/ewalert' -o $HOME/.local/bin/ewalert
sudo chmod +x $HOME/.local/bin/ewalert
Uncomment the session="x-session"
line according to your desktop environment. This is needed for exporting the DBUS_SESSION_BUS_ADDRESS variable.
### nano $HOME/.local/bin/ewalert ###
session="gnome-session"
crontab -e
#run every 10 minutes
*/10 * * * * $HOME/.local/bin/ewalert
USGS Real-time GeoJSON Feeds are updated every minute, so you can choose any interval higher than that. The script will not repeat alerts.
You may face issues depending on your setup, eg., if you have notifications disabled, or if you have turned on Do Not Disturb mode.