Custom module for showing the weather in Waybar, using the great wttr.io

Related tags

Command-line wttrbar
Overview

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.

Usage

  • --ampm - display time in AM/PM format
  • --location - 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

e.g. wttrbar --date-format "%m/%d" --location Paris --hide-conditions

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.

You might also like...
The module graph logic for Deno CLI

deno_graph The module graph/dependency logic for the Deno CLI. This repository is a Rust crate which provides the foundational code to be able to buil

An experimental, work-in-progress PAM module for Tailscale

Experimental Tailscale PAM Module This is a very very experimental Tailscale PAM module that allows you to SSH using your Tailscale credentials. This

Basic template for an out-of-tree Linux kernel module written in Rust.

Rust out-of-tree module This is a basic template for an out-of-tree Linux kernel module written in Rust. Please note that: The Rust support is experim

A Rust-based Garry's Mod module for fetching environment variables.

gm_environ Using Environment Variables in Garry's Mod. Installation Download a copy of the module from the releases (or compile from source) Move the

This PAM module provides ssh-agent based authentication

PAM-RSSH This PAM module provides ssh-agent based authentication. The primary design goal is to avoid typing password when you sudo on remote servers.

Resolve JavaScript/TypeScript module with Rust

ES Resolve JavaScript/TypeScript module resolution in Rust Installation cargo add es_resolve Get Started use std::path::{Path, PathBuf}; use es_resolv

COCONUT Secure VM Service Module

This is the source code repository for the COCONUT Secure VM Service Module (SVSM), a software which aims to provide secure services and device emulations to guest operating systems in confidential virtual machines (CVMs). It requires AMD Secure Encrypted Virtualization with Secure Nested Paging (AMD SEV-SNP), especially the VM Privilege Level (VMPL) feature.

Threadless Module Stomping In Rust with some features
Threadless Module Stomping In Rust with some features

NovaLdr is a Threadless Module Stomping written in Rust, designed as a learning project while exploring the world of malware development. It uses advanced techniques like indirect syscalls and string encryption to achieve its functionalities. This project is not intended to be a complete or polished product but rather a journey into the technical aspects of malware, showcasing various techniques and features.

A Rust implementation of Haxe Module Manager (hmm)

hmm-rs A Rust implementation of Haxe Module Manager (hmm) Installation hmm-rs can be installed as a binary from crates.io: https://crates.io/crates/hm

Comments
  • Sunrise/Sunset icons not working

    Sunrise/Sunset icons not working

    I am running wttrbar on waybar in hyprland. The sunrise/sunset icons are not showing correctly on the tooltip despite having a nerd font and weather icons installed. I can't get a screenshot but here is the command line output:

    wttrbar --fahrenheit --main-indicator temp_F
    {"text":"🌧️ 69","tooltip":"<b>Light rain</b> 69°\nFeels like: 69°\nWind: 9Km/h\nHumidity: 90%\n\n<b>Today, 2023-04-17</b>\n⬆️ 86° ⬇️ 78° 🌅 06:56 AM 🌇 07:45 PM\n03 🌦️  83° Patchy rain possible, Overcast 86%, Rain 79%\n06 🌤️  82° Partly cloudy, Sunshine 85%, Overcast 41%\n09 🌩️  83° Thundery outbreaks possible, Overcast 89%, Sunshine 16%\n12 🌧️  89° Light rain shower, Overcast 94%, Rain 79%\n15 🌧️  87° Light rain shower, Overcast 93%, Rain 75%\n18 🌦️  84° Patchy rain possible, Overcast 84%, Rain 69%\n21 🌦️  81° Patchy rain possible, Overcast 93%, Rain 67%\n\n<b>Tomorrow, 2023-04-18</b>\n⬆️ 84° ⬇️ 74° 🌅 06:55 AM 🌇 07:46 PM\n00 🌦️  79° Patchy rain possible, Overcast 93%, Rain 69%\n03 ☀️  79° Clear, Sunshine 87%\n06 ☀️  78° Clear, Sunshine 89%\n09 ☀️  77° Sunny, Sunshine 90%\n12 ☀️  84° Sunny, Sunshine 92%\n15 ☀️  85° Sunny, Sunshine 86%\n18 ☀️  81° Sunny, Sunshine 87%\n21 ☀️  78° Clear, Sunshine 89%\n\n<b>2023-04-19</b>\n⬆️ 84° ⬇️ 74° 🌅 06:54 AM 🌇 07:46 PM\n00 ☀️  77° Clear, Sunshine 93%\n03 ☀️  77° Clear, Sunshine 90%\n06 ☀️  77° Clear, Sunshine 87%\n09 ☀️  78° Sunny, Sunshine 94%\n12 ☀️  84° Sunny, Sunshine 89%\n15 ☀️  85° Sunny, Sunshine 94%\n18 ☀️  82° Sunny, Sunshine 87%\n21 ☀️  78° Clear, Sunshine 93%\n"}
    

    Oddly enough, the output works here. Obviously a font issue but I am not sure how to configure this in waybar.

    opened by etrigan63 3
  • Add ' ° ' symbol to text variable

    Add ' ° ' symbol to text variable

    I don't know if the symbol was intentionally left out, but I felt that it was missing. If this was intentional, please feel free to ignore this completely

    Thanks for creating this module :)

    opened by Haikuno 2
  • Is it possible to change the default language?

    Is it possible to change the default language?

    opened by saltasatelites 2
Owner
Yo'av Moshe
When it's light I'm working on Cloudflare Zaraz, when it's night I'm just hacking around.
Yo'av Moshe
Demo app duplicated in 5 languages (Go/JavaScript/Python/Ruby/Rust) showing how to go from source code to container image using melange+apko

hello-melange-apko ?? This repo contains an example app duplicated across 5 languages showing how to: Package source code into APKs using melange Buil

Chainguard 16 Jan 23, 2023
Custom WiFi module and client for ALUTECH RTO-1000

Самодельный WiFI модуль для автоматики раздвижных ворот ALUTECH RTO-1000 Цель проекта Основная задача - автоматическое открывание ворот при приближени

null 3 Nov 25, 2024
Catch Tailwindcss Errors at Compile-Time Before They Catch You, without making any change to your code! Supports overriding, extending, custom classes, custom modifiers, Plugins and many more 🚀🔥🦀

twust Twust is a powerful static checker in rust for TailwindCSS class names at compile-time. Table of Contents Overview Installation Usage Statement

null 15 Nov 8, 2023
🌤️ Command line weather tool.

??️ Command line weather tool.

risoflora 45 Jan 3, 2023
A toy example showing how to run Rust code in Python for speed and progress.

PoC: Integrating Rust in Python A toy example showing how to run Rust code in Python for speed and progress. Requirements Python 3.6+ Rust 1.44+ Cargo

Emil Thorenfeldt 2 Feb 7, 2022
Update Twitter profile with a meter showing how close you are to code burnout.

WakaTime Code Burnout Meter in Twitter Profile Inspired by trash's Twitter profile, this repo adds a burnout meter to your Twitter profile. It uses Wa

Travis A. Wagner 6 Jan 12, 2023
Make ETLs Great Again!

A serverless ETL runtime for cloud databases MEGA stands for Make ETLs Great Again! Checkout a video demo! This project is a cloud-native ETL (Extract

Second State 24 Jan 15, 2023
Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models, supports talking, speaking assessment, memorizing words with contexts, Listening test, so on.

null 155 Apr 20, 2023
Easy access of struct fields in strings using different/custom pre/postfix: "Hello, {field}" in rust

Easy access to struct fields in strings ?? add strung to the dependencies in the Cargo.toml: [dependencies] strung = "0.1.3" ?? use/import everything

Dekirisu 2 Sep 19, 2022
Expose standard or fully custom USB peripherals (gadgets) through a USB device controller (UDC) on Linux using Rust.

usb-gadget This library allows implementation of USB peripherals, so called USB gadgets, on Linux devices that have a USB device controller (UDC). Bot

Sebastian Urban 21 Oct 30, 2023