{"id":46582481,"url":"https://github.com/renderffx/zzzz_userhooks-","last_synced_at":"2026-04-18T21:04:23.140Z","repository":{"id":263464184,"uuid":"878816335","full_name":"renderffx/zzzz_userhooks-","owner":"renderffx","description":"call scripts on suspend and resume for the currently logged in user zzzZ","archived":false,"fork":false,"pushed_at":"2024-10-26T07:49:52.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-07T16:23:27.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renderffx.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":"2024-10-26T07:23:34.000Z","updated_at":"2024-10-26T07:49:56.000Z","dependencies_parsed_at":"2024-11-18T18:13:19.585Z","dependency_job_id":"7cbbe6d2-64dd-4aad-a60c-48ac939da9e7","html_url":"https://github.com/renderffx/zzzz_userhooks-","commit_stats":null,"previous_names":["isafcck/zzzz_userhooks-","pawannnnn/zzzz_userhooks-","pawanjs/zzzz_userhooks-","manikupireddii/zzzz_userhooks-","pawanthegoat/zzzz_userhooks-","pawanchief/zzzz_userhooks-","pawanlifes/zzzz_userhooks-","pawanscales/zzzz_userhooks-","pavanscales/zzzz_userhooks-","renderhq/zzzz_userhooks-","renderffx/zzzz_userhooks-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renderffx/zzzz_userhooks-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderffx%2Fzzzz_userhooks-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderffx%2Fzzzz_userhooks-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderffx%2Fzzzz_userhooks-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderffx%2Fzzzz_userhooks-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renderffx","download_url":"https://codeload.github.com/renderffx/zzzz_userhooks-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderffx%2Fzzzz_userhooks-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31984558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-07T11:14:25.488Z","updated_at":"2026-04-18T21:04:23.128Z","avatar_url":"https://github.com/renderffx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"`zzz` User Hooks\n================\n\nCall scripts on suspend and resume for the currently logged in user using `zzz`.\n\nThis was written specifically for Void Linux but should work on any OS that has\nor uses the `zzz` command to suspend.\n\nInstallation\n------------\n\n`make` can be used to install the scripts:\n\n    $ sudo make install\n    cp user-script /etc/zzz.d\n    cp hooks/resume/99-user-script /etc/zzz.d/resume\n    cp hooks/suspend/99-user-script /etc/zzz.d/suspend\n\nThis will result in the following layout being created:\n\n    $ tree /etc/zzz.d/\n    /etc/zzz.d/\n    ├── resume\n    │   └── 99-user-script\n    ├── suspend\n    │   └── 99-user-script\n    └── user-script\n\n    2 directories, 3 files\n\nWith these scripts in place, the following scripts will be run for the currently\nlogged in user:\n\n- `~/.onsuspend` - called before the machine is suspended\n- `~/.onresume` - called when the machine wakes up\n\nThe above scripts will be called with the permissions of the user for whom they\nare being called (using `sudo -Hu \u003cuser\u003e`).  The `DISPLAY` environmental\nvariable will also be set to the currently active display.\n\nYou can uninstall with:\n\n    $ sudo make uninstall\n    rm -f /etc/zzz.d/user-script\n    rm -f /etc/zzz.d/resume/99-user-script\n    rm -f /etc/zzz.d/suspend/99-user-script\n\nExample\n-------\n\n    $ sudo zzz\n    Zzzz... [user-script] called Sun Sep 23 11:33:59 EDT 2018\n    [user-script] running /home/dave/.onsuspend for user dave (DISPLAY=:0)\n    [user-script] ran /home/dave/.onsuspend for user dave, exited 0\n    [user-script] called Sun Sep 23 11:34:05 EDT 2018\n    [user-script] running /home/dave/.onresume for user dave (DISPLAY=:0)\n    [user-script] ran /home/dave/.onresume for user dave, exited 0\n    yawn.\n\nContributing\n------------\n\nEnsure any code contributions pass `make check`:\n\n```\n$ make check\nawk 'length($0) \u003e 80 { exit(1); }' user-script\nshellcheck user-script\nshellcheck hooks/*/99-user-script\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderffx%2Fzzzz_userhooks-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenderffx%2Fzzzz_userhooks-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderffx%2Fzzzz_userhooks-/lists"}