Giter Site home page Giter Site logo

wttrbar's Introduction

wttrbar

a simple but detailed weather indicator for Waybar using wttr.in.


Installation

Compile yourself using cargo build --release, or download the precompiled binary from the releases page.

For Arch Linux, use the AUR package.

For NixOS, use the NixPkg package.

Usage

  • --ampm - display time in AM/PM format
  • --location STRING - pass a specific location to wttr.in
  • --main-indicator - decide which current_conditions key will be shown on waybar. defaults to temp_C
  • --date-format - defaults to %Y-%m-%d, formats the date next to the days. see reference
  • --hide-conditions - show a shorter descrpition next to each hour, like 7° Mist instead of 7° Mist, Overcast 81%, Sunshine 17%, Frost 15%
  • --fahrenheit - use fahrenheit instead of celsius
  • --vertical-view - shows the icon on the first line and temperature in a new line
  • --custom-indicator STRING - optional expression that will be shown instead of main indicator. current_conditions keys surrounded by {} can be used. For example, "{ICON}{temp_C}({FeelsLikeC})" will be transformed to "text":"🌧️0(-4)" in the output
  • --mph - change wind to use MPH instead of KMH
  • --lang LANG - set language (currently en, de, pl, tr, fr, ru, zh, or be; submit a PR to add yours)
  • --icon-family STRING Changes Icon Family (Currently emoji, nerd; submit a PR to add yours) e.g. wttrbar --date-format "%m/%d" --location Paris --hide-conditions

Icons

To display the weather icons correctly, you will need to have a font that supports emojis installed. The screenshot uses Noto Emoji, but you can use other fonts too.

Waybar configuration

Assuming wttrbar is in your path, it can be used like:

"custom/weather": {
    "format": "{}°",
    "tooltip": true,
    "interval": 3600,
    "exec": "wttrbar",
    "return-type": "json"
},

Old version

This code is based on my old Python gist that was used for the same purpose.

wttrbar's People

Contributors

dianaw353 avatar bjesus avatar s1ls avatar frai3mega avatar nut-3 avatar bowlbird avatar lvntcnylmz avatar khaneliman avatar bluewydiamond avatar celticboozer avatar 3eldu avatar kleyeus avatar puddings233 avatar

Stargazers

Simon avatar

Forkers

origincode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.