Skip to main content

i3geoweather

This blocklet provides temperature information for the i3blocks status bar often used in the i3 window manager. It attempts to determine your location based on your IP address using the ipinfo.io API. Based on the location it retrieves weather information from the free openweathermap.org API.

image{width="800px"}

i3geoweather is a pure Python 3 program. No attempt to make it compatible with Python 2 has been or will be made. It is time to switch!

Installation

i3geoweather is published on PyPI. Install it with pip:

$ pip install --user i3geoweather

Depending on your system you may need to call pip3 instead of pip.

If you use uv, install it as an isolated tool instead:

$ uv tool install i3geoweather

Both methods place the i3geoweather executable in ~/.local/bin.

Dependencies

i3geoweather depends on the Python requests library. i3geoweather output uses FontAwesome for its output. You should download the free FontAwesome zip file and copy fontawesome-webfont.ttf to your ~/.fonts/ directory.

Usage

i3geoweather runs a daemon process in the background (if started with the -d option) and periodically updates weather information by writing to ~/.i3geoweather/i3geoweather.txt.

Start i3geoweather from your i3 configuration file:

exec_always ~/.local/bin/i3geoweather -d

i3 starts commands with its own, often minimal, PATH, so the examples use the full path to i3geoweather. This is where pip install --user and uv tool install put it. If yours is elsewhere, run which i3geoweather in a shell to find it.

If a previous daemon is still running, -d leaves it alone and exits with a message on stderr, which i3 does not show. A pidfile left behind by a crashed daemon is detected and replaced. To restart the daemon on every i3 reload, use -r instead:

exec_always ~/.local/bin/i3geoweather -r

A typical i3blocks.conf entry may look like this:

[weather]
interval=repeat
command=inotifywait -qq -e delete_self ~/.i3geoweather/i3geoweather.txt && cat ~/.i3geoweather/i3geoweather.txt

Command line options:

  • -d or --daemon run as background process
  • -l or --location force a location by specifying a comma separated latitude/longitude pair, e.g., -l "50.0126, 7.996". North and east are positive.
  • -r or --restart restart background process
  • -s or --stop stop running background process
  • -v increase verbosity of logging to ~/.i3geoweather/i3geoweather.log. Can be used up to three times. Using -v twice logs informational messages. Debugging output is produced when -v is used three times.

Author

Jörg Dietrich joerg@joergdietrich.com

Contributing

Development takes place on GitHub. Please report any bugs as an issue in the GitHub issue tracker.

License

i3geoweather is released under an MIT license. See LICENCE.txt

Metadata

Release files for i3geoweather 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for i3geoweather 1.2.0
File Size Uploaded Provenance Actions
i3geoweather-1.2.0.tar.gz 8.4 kB Without provenance Details for i3geoweather-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for i3geoweather 1.2.0
File Interpreter ABI Platform Actions
i3geoweather-1.2.0-py3-none-any.whl Python 3 none any Details for i3geoweather-1.2.0-py3-none-any.whl

Total release size: 17.1 kB

Release files / i3geoweather-1.2.0.tar.gz

Download URL i3geoweather-1.2.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ef497b29c66c57b6354ca5ccc90794695c8d9c8e19c8f8c73e4260a6d3fb54ed
BLAKE2b-256 checksum
How to use checksums
fcb0cc33fe4cc46312950fbc1f0daafee4cc0f1096b8139dd5edcfc74c88d09b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.6

Release files / i3geoweather-1.2.0-py3-none-any.whl

Download URL i3geoweather-1.2.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8a4513758e3af17a6a17d00e168e4e5dca5eff0a400e2a00d1734877ff89063
BLAKE2b-256 checksum
How to use checksums
e22df456df96e37ad4f4bc9a07f24cc9119c7ce49dc5c1746da7a57ba57a2a38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.6

Security for i3geoweather 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page