{"id":25736894,"url":"https://github.com/phdenzel/xmobar_wttr","last_synced_at":"2025-06-24T22:37:07.025Z","repository":{"id":62590055,"uuid":"446811250","full_name":"phdenzel/xmobar_wttr","owner":"phdenzel","description":"A command-line tool for xmobar to fetch info from wttr.in","archived":false,"fork":false,"pushed_at":"2022-10-22T10:35:35.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T02:11:30.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phdenzel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-11T12:25:03.000Z","updated_at":"2023-12-23T15:08:52.000Z","dependencies_parsed_at":"2022-11-03T17:57:02.565Z","dependency_job_id":null,"html_url":"https://github.com/phdenzel/xmobar_wttr","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fxmobar_wttr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fxmobar_wttr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fxmobar_wttr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fxmobar_wttr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phdenzel","download_url":"https://codeload.github.com/phdenzel/xmobar_wttr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fxmobar_wttr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257665002,"owners_count":22582466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-26T06:31:23.743Z","updated_at":"2025-06-24T22:37:06.973Z","avatar_url":"https://github.com/phdenzel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"`xmobar_wttr` is a command-line program which fetches weather info\nfrom [wttr.in](https://wttr.in) and applies direct formatting to be used by xmobar.\nDifferent from already available plugins, it can easily be configured\nto use any kind of combination of numbers, icons, and colors.  It\nimplements a custom syntax with which a single line in the\n`xmobar_wttr.yml` configuration file translates to an xmobar field entry.\n\nIn the `commands` list of your `xmobarrc`, add something along the lines\nof\n\n    Run Com \"xmobar_wttr\" [\"-c\", \"~/.config/xmobar/xmobar_wttr.yml\"] \"wttr\" 9000\n\n\n# Prerequisites\n\nThis program mainly uses following python3 modules\n\n-   requests\n-   pyyaml\n\nFurthermore, the program uses weather icons from\n[https://github.com/erikflowers/weather-icons](https://github.com/erikflowers/weather-icons).  Install them\ndirectly from the website, using an AUR helper such as\n\n    yay -S ttf-weather-icons\n\nor by other means.\n\n\n# Install\n\n    pip install xmobar-wttr\n\nFor installing from source, clone the repository, and run\n\n    cd xmobar_wttr\n    python setup.py install --user\n\nor create a virtual environment with\n\n    pipenv install\n    pipenv install -e .\n\nTo activate the virtual environment run\n\n    pipenv shell\n\nor start every command with `pipenv run`.\n\n\n# Usage\n\n    usage: xmobar_wttr [-h] [-c \u003cpath\u003e] [-l \u003cloc\u003e] [-f \u003cformat\u003e] [-o \u003cpath\u003e] [-s \u003csection\u003e] [-p \u003cpar-list\u003e [\u003cpar-list\u003e ...]] [-v]\n    \n    optional arguments:\n      -h, --help            show this help message and exit\n      -c \u003cpath\u003e, --config \u003cpath\u003e\n    \t\t\tPath to the config file\n      -l \u003cloc\u003e, --location \u003cloc\u003e\n    \t\t\tLocation for which to pull information.\n      -f \u003cformat\u003e, --format \u003cformat\u003e\n    \t\t\tFormat template for xmobarrc\n      -o \u003cpath\u003e, --output \u003cpath\u003e\n    \t\t\tPath to the output file\n      -s \u003csection\u003e, --section \u003csection\u003e\n    \t\t\tSection in the yaml file to be parsed\n      -p \u003cpar-list\u003e [\u003cpar-list\u003e ...], --pars \u003cpar-list\u003e [\u003cpar-list\u003e ...]\n    \t\t\tSelect parameters to be fetched from wttr.in\n    \t\t\texcluded parameters are not available in xmobar template format\n      -v, --verbose         Run program in verbose mode\n\n\n# Configuration\n\n`xmobar_wttr` works with both command-line arguments as well as YAML\nconfiguration files (the first takes precedence over the latter).  To\nset your desired defaults edit the configuration file\n`xmobar_wttr.yml` and place it in either \n\n-   `~/.config/xmobar_wttr/xmobar_wttr.yml`\n-   `~/.config/xmobar/xmobar_wttr.yml`\n-   `~/.xmobar_wttr/xmobar_wttr.yml`\n-   `~/.xmobar_wttr.yml`\n\n\n# Notation\n\n-   Fields are separated by `%`.\n-   Each field should have a parameter entry prefixed by an exclamation\n    mark `!`, e.g. `!h`.\n-   Units can be placed using `.u`\n-   Fonts can be selected using `\u003cN:...\u003e` where `N` is the xmobar font\n    index, e.g. `\u003c2:weather condition\u003e` formats to `\u003cfn=2\u003eweather\n      condition\u003c/fn\u003e`\n-   Analogously colors can be used using `{#dedede:...}`.\n\n\u003ctable border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\"\u003e\n\n\n\u003ccolgroup\u003e\n\u003ccol  class=\"org-left\" /\u003e\n\n\u003ccol  class=\"org-left\" /\u003e\n\u003c/colgroup\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth scope=\"col\" class=\"org-left\"\u003eNotation\u003c/th\u003e\n\u003cth scope=\"col\" class=\"org-left\"\u003e*Description\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e%[!par]\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eparameter value\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e%g[!par]\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003erender parameter only as icon\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e%G[!par]\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eprefix icon to parameter value\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e.u\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eappend units of previous parameter\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ctable border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\"\u003e\n\n\n\u003ccolgroup\u003e\n\u003ccol  class=\"org-left\" /\u003e\n\n\u003ccol  class=\"org-left\" /\u003e\n\u003c/colgroup\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth scope=\"col\" class=\"org-left\"\u003eFormat map\u003c/th\u003e\n\u003cth scope=\"col\" class=\"org-left\"\u003eResult\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\u0026lt;2:\u0026#x2026;\u0026gt;\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003e\u0026lt;fn=2\u0026gt;\u0026#x2026;\u0026lt;/fn\u0026gt;\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e{#dedede:\u0026#x2026;}\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003e\u0026lt;fc=#dedede\u0026gt;\u0026#x2026;\u0026lt;/fc\u0026gt;\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\\\u0026#x2026;\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003e\\x\u0026#x2026;\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Example:\n\n`'%g!x %!t(%!f)\u003c1: \u003e.u {#46d9ff:%G}\u003c1: \u003e!h'`\ncould format to something like\n`\u003cfn=6\u003e\u003c/fn\u003e 3(1)\u003cfn=1\u003e \u003c/fn\u003e°C \u003cfc=#46d9ff\u003e\u003cfn=6\u003e\u003c/fn\u003e\u003c/fc\u003e\u003cfn=1\u003e \u003c/fn\u003e81`\nand renders in xmobar as\n\n![img](./imgs/screenshot_example.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphdenzel%2Fxmobar_wttr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphdenzel%2Fxmobar_wttr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphdenzel%2Fxmobar_wttr/lists"}