{"id":25303574,"url":"https://github.com/niklasbogensperger/climate-clock-menu-bar","last_synced_at":"2026-05-02T04:35:54.271Z","repository":{"id":208167007,"uuid":"720966681","full_name":"niklasbogensperger/climate-clock-menu-bar","owner":"niklasbogensperger","description":"SwiftBar plugin to see the climate clock deadline from climateclock.world in the menu bar","archived":false,"fork":false,"pushed_at":"2024-01-20T15:30:06.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T02:34:07.261Z","etag":null,"topics":["climate-change","countdown","macos","plugins","python","swiftbar-plugins"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niklasbogensperger.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-20T04:27:31.000Z","updated_at":"2023-11-24T14:27:09.000Z","dependencies_parsed_at":"2024-01-23T04:03:19.929Z","dependency_job_id":"e8c467eb-596e-4c25-9e6d-66859d83a605","html_url":"https://github.com/niklasbogensperger/climate-clock-menu-bar","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"8e2d2a82ed719d641069b149b8e01a948c04c204"},"previous_names":["niklasbogensperger/climate-clock-menu-bar"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/niklasbogensperger/climate-clock-menu-bar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasbogensperger%2Fclimate-clock-menu-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasbogensperger%2Fclimate-clock-menu-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasbogensperger%2Fclimate-clock-menu-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasbogensperger%2Fclimate-clock-menu-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklasbogensperger","download_url":"https://codeload.github.com/niklasbogensperger/climate-clock-menu-bar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasbogensperger%2Fclimate-clock-menu-bar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32523427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["climate-change","countdown","macos","plugins","python","swiftbar-plugins"],"created_at":"2025-02-13T07:36:56.689Z","updated_at":"2026-05-02T04:35:54.266Z","avatar_url":"https://github.com/niklasbogensperger.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# climate-clock-menu-bar\n\nSwiftBar plugin to see the climate clock deadline from [climateclock.world](https://climateclock.world/) in the menu bar\n\n\n## Purpose\n\nThis script provides a countdown clock to the deadline set by [climateclock.world](https://climateclock.world/) (until which we need to limit global warming to 1.5°C) to the macOS menu bar using [SwiftBar](https://github.com/swiftbar/SwiftBar).\n\nTo minimize API calls and provide better performance, it keeps the current deadline in a cache file (see instructions below) and only queries the API once every 24h, as the value gets adjusted rarely.\n\n\n## Screenshot\n\n![Screenshot](./screenshot.png)\n\n\n## Setup\n\n### 1. Install the latest SwiftBar release\n\nFollow the instructions on the [SwiftBar](https://github.com/swiftbar/SwiftBar) page.\n\n\n### 2. Ensure you have Python3 and the required packages installed\n\nInstall python3 e.g. with the [homebrew package manager](https://brew.sh):\n```shell\nbrew install python3\n```\n\nFurthermore, the following two packages are needed from PyPi:\n- pendulum\n- requests\n\nInstall them in a virtual environment (recommended), e.g. via `uv`:\n```shell\nuv init \u0026\u0026 uv add pendulum requests\n```\n\n\n### 3. Download the \"climate_clock.15m.py\" script\n\n1. [Download](https://github.com/niklasbogensperger/climate-clock-menu-bar/blob/main/climate_clock.15m.py) the file\n2. Open the file in a plain text editor or IDE of your choice\n   - Change the first line of the script to point to the python3 executable located within the virtual environment created above\n   - Should you want to modify the default configuration, set the configuration variables according to your liking (see next section)\n3. Copy/Move it to the SwiftBar script folder that you or the app chose\n4. Make sure the file is executable: `chmod +x climate_clock.15m.py`\n\n\n### 4. Configuration options\n\nYou can easily tweak how the clock gets displayed in the menu bar:\u003cbr /\u003e\n`LABELS_LONG` controls whether to use long or short labels, and `MINUTES_SECONDS` controls whether to show a full clock with minutes and seconds or just the hours with a label.\u003cbr /\u003e\n**Note**: When using the `MINUTES_SECONDS` option, you should set the refresh rate of the script accordingly (in the filename itself, see [here](https://github.com/swiftbar/SwiftBar#plugin-naming)). \n\nRefer to the table below to see which format you prefer.\n\n| `LABELS_LONG` | `MINUTES_SECONDS` | Output                  | Notes                                |\n| ------------- | ----------------- | ----------------------- | ------------------------------------ |\n| False         | False             | 0 ʏ 000 ᴅ 00 ʜ          | default                              |\n| False         | True              | 0 ʏ 000 ᴅ 00:00:00      | adjust refresh rate (see note above) |\n| True          | False             | 0 ʏʀꜱ 000 ᴅᴀʏꜱ 00 ʜʀꜱ   |                                      |\n| True          | True              | 0 ʏʀꜱ 000 ᴅᴀʏꜱ 00:00:00 | adjust refresh rate (see note above) |\n\nIn addition, you can change where the cache file is saved by changing the (absolute) path in the `CACHE_FILE` variable. The sensible default is the cache directory for this plugin, which is automatically created by SwiftBar.\n\nLastly, should the API move to a different URL at some point in the future, this can be incorporated by changing the URL in the `API_URL` variable. Note, however, that such a change will probably necessitate tweaks in the rest of the code as well.\n\n\n## Miscellaneous tips/tricks and notes\n\n\u003e [!TIP]\n\u003e Hold the \u003ckbd\u003e⌥ Option\u003c/kbd\u003e key while clicking on the menu bar entry to bring up SwiftBar options that are hidden by default.\n\n\u003e [!TIP]\n\u003e Hold the \u003ckbd\u003e⌘ Command\u003c/kbd\u003e key to drag the menu bar entry to the desired spot.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasbogensperger%2Fclimate-clock-menu-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklasbogensperger%2Fclimate-clock-menu-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasbogensperger%2Fclimate-clock-menu-bar/lists"}