{"id":15957230,"url":"https://github.com/mamantoha/air_alert_map_ua_wallpaper","last_synced_at":"2025-05-07T06:06:04.170Z","repository":{"id":87217341,"uuid":"605135885","full_name":"mamantoha/air_alert_map_ua_wallpaper","owner":"mamantoha","description":"A CLI tool for setting the Air Raid Alert Map of Ukraine as a desktop background","archived":false,"fork":false,"pushed_at":"2025-04-22T21:14:18.000Z","size":8293,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T06:05:57.649Z","etag":null,"topics":["crystal","kde-plasma","macos","wallpaper-changer","windows"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mamantoha.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-22T14:21:07.000Z","updated_at":"2025-04-22T21:14:21.000Z","dependencies_parsed_at":"2023-11-07T17:49:15.909Z","dependency_job_id":"7f70e8fa-3dd6-40f7-ad0e-957387ce0ce0","html_url":"https://github.com/mamantoha/air_alert_map_ua_wallpaper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fair_alert_map_ua_wallpaper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fair_alert_map_ua_wallpaper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fair_alert_map_ua_wallpaper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fair_alert_map_ua_wallpaper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/air_alert_map_ua_wallpaper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823918,"owners_count":21809713,"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":["crystal","kde-plasma","macos","wallpaper-changer","windows"],"created_at":"2024-10-07T13:40:56.465Z","updated_at":"2025-05-07T06:06:04.146Z","avatar_url":"https://github.com/mamantoha.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# air_alert_map_ua_wallpaper\n\nA CLI tool for setting the Air Raid Alert Map of Ukraine as a desktop background\n\n![preview](preview.png)\n\n## About\n\nThis script takes a screenshot of the \u003chttps://alerts.in.ua\u003e site and set it as a desktop background.\n\nSupport:\n\n- [x] KDE Plasma (Linux)\n- [x] macOS (Somona)\n- [x] Windows\n\nRequired libraries:\n\n- To build this script, a requirement is to have a working version of Crystal already installed.\n- A requirement is to have a working `chromedriver` or `geckodriver`.\n- You will also need `dbus-send` on KDE Plasma.\n\n```\n$ air_alert_map_ua_wallpaper --help\nNAME\n    air_alert_map_ua_wallpaper - a CLI tool for setting the Air Raid Alert Map of Ukraine as a desktop background\n\nVERSION\n    0.1.0\n\nSYNOPSIS\n    air_alert_map_ua_wallpaper [arguments]\n\nARGUMENTS\n    -b, --browser=NAME               browser: chrome|firefox (default: chrome)\n    -w, --width=PIXELS               specify a desired width in pixels (default: 2560)\n    -h, --height=PIXELS              specify a desired height in pixels (default: 1440)\n    -l, --language=NAME              language uk|en|de|pl|ja|crh (default: uk)\n    --light                          set light wallpaper\n    -p, --preset=NAME                preset default|contrast|vadym|st|black (default: default)\n    -m, --map=NAME                   map dynamic|super|vbasic|hex (default: dynamic)\n    --hide-date                      hide date\n    --help                           print this help\n    -v, --version                    display the version and exit\n```\n\n## Install\n\n- Clone this repository `git@github.com:mamantoha/air_alert_map_ua_wallpaper.git \u0026\u0026 cd air_alert_map_ua_wallpaper`\n- Build with `shards build --release`\n- Run with `./bin/air_alert_map_ua_wallpaper` or move it to any directory in `$PATH`\n\n## Usage\n\nSet the wallpaper with a custom resolution:\n\n```\nair_alert_map_ua_wallpaper -w 3456 -h 2234\n```\n\n### Linux\n\nTo change background every 5 minutes the following command:\n\n```\ncrontab -e\n```\n\nand add the following to the opened file:\n\n```\n*/5 * * * * env DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ~/bin/air_alert_map_ua_wallpaper\n```\n\n### macOS\n\nCreate a plist file called `com.example.air_alert_map_ua_wallpaper.plist` in the `~/Library/LaunchAgents directory`.\n\nAdd the following content to the plist file `~/Library/LaunchAgents/com.example.air_alert_map_ua_wallpaper.plist`:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n    \u003ckey\u003eLabel\u003c/key\u003e\n    \u003cstring\u003ecom.example.air_alert_map_ua_wallpaper\u003c/string\u003e\n    \u003ckey\u003eProgramArguments\u003c/key\u003e\n    \u003carray\u003e\n        \u003cstring\u003e/bin/bash\u003c/string\u003e\n        \u003cstring\u003e-c\u003c/string\u003e\n        \u003cstring\u003e\n        export PATH=$PATH:/opt/homebrew/bin\n        while true; do ~/bin/air_alert_map_ua_wallpaper; sleep 300; done\n        \u003c/string\u003e\n    \u003c/array\u003e\n    \u003ckey\u003eRunAtLoad\u003c/key\u003e\n    \u003ctrue/\u003e\n    \u003ckey\u003eStandardOutPath\u003c/key\u003e\n    \u003cstring\u003e/tmp/air_alert_map_ua_wallpaper.log\u003c/string\u003e\n    \u003ckey\u003eStandardErrorPath\u003c/key\u003e\n    \u003cstring\u003e/tmp/air_alert_map_ua_wallpaper.log\u003c/string\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\nLoad the launch agent into your current session using launchctl:\n\n```\nlaunchctl load ~/Library/LaunchAgents/com.example.air_alert_map_ua_wallpaper.plist\n```\n\nNow, the script should run every 5 minutes within user's active session.\n\nTo check the status of a launch agent:\n\n```\nlaunchctl list | grep com.example.air_alert_map_ua_wallpaper\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/air_alert_map_ua_wallpaper/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Anton Maminov](https://github.com/mamantoha) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fair_alert_map_ua_wallpaper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fair_alert_map_ua_wallpaper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fair_alert_map_ua_wallpaper/lists"}