{"id":21038865,"url":"https://github.com/revelaction/pixelchanged","last_synced_at":"2025-10-09T22:47:17.893Z","repository":{"id":198739403,"uuid":"453407538","full_name":"revelaction/pixelchanged","owner":"revelaction","description":"pixelchanged is a simple bash script to detect changes in a region of your screen and execute commands when the change happens.","archived":false,"fork":false,"pushed_at":"2023-10-22T09:37:46.000Z","size":40,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T14:49:38.107Z","etag":null,"topics":["bash","change","grim","screenshot","slop","slurp","swaywm","wayland","x11"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/revelaction.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-29T13:35:54.000Z","updated_at":"2024-07-03T09:55:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"660cc288-e9bf-466e-bf08-b0dd00b2516c","html_url":"https://github.com/revelaction/pixelchanged","commit_stats":null,"previous_names":["revelaction/pixelchanged"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/revelaction/pixelchanged","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fpixelchanged","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fpixelchanged/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fpixelchanged/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fpixelchanged/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revelaction","download_url":"https://codeload.github.com/revelaction/pixelchanged/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fpixelchanged/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002115,"owners_count":26083307,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":["bash","change","grim","screenshot","slop","slurp","swaywm","wayland","x11"],"created_at":"2024-11-19T13:36:42.764Z","updated_at":"2025-10-09T22:47:17.873Z","avatar_url":"https://github.com/revelaction.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg alt=\"pixelchanged\" src=\"logo.png\"/\u003e\u003c/p\u003e\n\n[![GitHub Release](https://img.shields.io/github/v/release/revelaction/pixelchanged?style=flat)]()\n \n`pixelchanged` is a simple `bash` script to detect changes in a region of your\nscreen and execute commands when the change happens.\n\nhttps://user-images.githubusercontent.com/96388231/151698551-528610c2-0886-47db-8052-15f520708774.mp4\n\n`pixelchanged` works in linux (wayland and x11).\n\n# Installation \n\n## Dependencies\n\nInstall the dependencies:\n\n### Wayland\n\nOn debian based operating systems, install with:\n\n```console\nsudo apt install slurp grim awk\n```\n\n### X11\n\nOn debian based operating system, install with:\n    \n```console\nsudo apt install imagemagick slop awk\n```\n\n## Install script\n\n```console\ncurl -LO https://raw.githubusercontent.com/revelaction/pixelchanged/master/pixelchanged.sh \n# make it executable\nchmod +x pixelchanged.sh\n# copy it to your path\ncp pixelchanged.sh ~/bin\n```\n\n# Usage\n\n```console\n⤷ pixelchanged.sh\nPlease select a region of the screen\nSelected region: 100x101+2346+397. Desktop type: x11\n\n📡 Starting monitoring for changes of the selected region each 10 seconds.\n```\n\n# Examples\n\n## Desktop notification\n\nPer default, the script creates a desktop notification when it detects a change\nin the selected region.\n\n```bash\nchange_handler()\n{\n    # put commands here that are executed when a change in the pixel happens\n    notify_desktop\n    # play_sound\n}\n```\n\n## Play sound\n\nTo play a sound when the selected region changes just substitute the path to a\nmusic file in the `play_sound` function. \n\n```bash\nplay_sound()\n{\n    check_command \"cvlc\"\n    cvlc --play-and-exit \u003cyour-path-to-a-sound-file\u003e.opus\n}\n```\n\nand uncomment the call to the function in `change_handler`\n\n```bash\nchange_handler()\n{\n    # put commands here that are executed when a change in the pixel happens\n    # notify_desktop\n    play_sound\n}\n```\n\n# Customize\n\nModify the script to run arbitrary commands by first creating a bash function:\n\n```bash\nmy_commands()\n{\n    # my commands\n}\n```\n\nAdd the function call to the `change_handler` function:\n\n```bash\nchange_handler()\n{\n    # put your commands function here \n    my_commands\n\n    # notify_desktop\n    # play_sound\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevelaction%2Fpixelchanged","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevelaction%2Fpixelchanged","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevelaction%2Fpixelchanged/lists"}