Skip to content

Instantly share code, notes, and snippets.

@tyjak
Last active March 16, 2022 10:54
Show Gist options
  • Save tyjak/4869fafa858c3540f9471f384a0d79bb to your computer and use it in GitHub Desktop.
Save tyjak/4869fafa858c3540f9471f384a0d79bb to your computer and use it in GitHub Desktop.
#!/bin/sh
# Popup i3 window to display an adress to openstreetmap
# dependency: curl, jq, webapp
# GistID: 4869fafa858c3540f9471f384a0d79bb
LOCATION=${@:-$(xsel -o)}
URI="https://www.openstreetmap.org/#map=18/$(curl -G --data-urlencode "q=$LOCATION" --data "format=json" https://nominatim.openstreetmap.org/search | jq -r '.[0].lat + "/" + .[0].lon')"
webapp \"$URI\" route 1000 800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment