{"id":31772946,"url":"https://github.com/dizzib/xawt","last_synced_at":"2026-02-25T08:04:47.375Z","repository":{"id":34391704,"uuid":"38318889","full_name":"dizzib/xawt","owner":"dizzib","description":"A command-line tool to run shell commands whenever the active window focus changes","archived":false,"fork":false,"pushed_at":"2017-01-09T14:40:31.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-10-18T01:35:36.957Z","etag":null,"topics":["active","trigger","window","x-windows"],"latest_commit_sha":null,"homepage":"","language":"LiveScript","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/dizzib.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":"2015-06-30T15:58:22.000Z","updated_at":"2018-10-25T10:34:51.000Z","dependencies_parsed_at":"2022-09-19T01:11:19.297Z","dependency_job_id":null,"html_url":"https://github.com/dizzib/xawt","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dizzib/xawt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizzib%2Fxawt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizzib%2Fxawt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizzib%2Fxawt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizzib%2Fxawt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dizzib","download_url":"https://codeload.github.com/dizzib/xawt/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizzib%2Fxawt/sbom","scorecard":{"id":345647,"data":{"date":"2025-08-11","repo":{"name":"github.com/dizzib/xawt","commit":"4cbbf7da8ed2602774647c1bec55cdfa167dcbbb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T06:57:53.827Z","repository_id":34391704,"created_at":"2025-08-18T06:57:53.828Z","updated_at":"2025-08-18T06:57:53.828Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29815020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"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":["active","trigger","window","x-windows"],"created_at":"2025-10-10T04:18:48.442Z","updated_at":"2026-02-25T08:04:47.370Z","avatar_url":"https://github.com/dizzib.png","language":"LiveScript","readme":"# xawt - X11 active window trigger\n[![Build Status](https://travis-ci.org/dizzib/xawt.svg?branch=master)](https://travis-ci.org/dizzib/xawt)\n\n* run shell commands when a window receives or loses focus\n* optional delay\n* optional retry period for failed commands\n\nI use it to prevent too many idling applications from surreptitiously\nstealing cpu cycles, but you may find it useful in other ways.\n\n## install globally and run\n\nWith [node.js] installed on the target [X11] box:\n\n    $ npm install -g xawt            # might need to prefix with sudo\n    $ xawt\n\nYou should see `echo` commands run whenever the window focus changes.\n\n## configure\n\nOn its first run xawt copies the [default configuration file] to\n`$XDG_CONFIG_HOME/xawt.conf` which [defaults to][$XDG_CONFIG_HOME]\n`$HOME/.config/xawt.conf`. Edit this [leanconf] file with one or more rules:\n\n    /regex/:\n      in: action\n      out: action\n\n* `regex` :\n  a unique [JavaScript regular expression]\n* `in:` :\n  (optional) action to perform when regex matches the title of a window receiving focus (activating).\n* `out:` :\n  (optional) action to perform when regex matches the title of a window losing focus (de-activating).\n* `action` :\n  either the shell command to run immediately, or\n\n      command: shell-command\n      delay: delay-secs\n      retry: retry-secs\n\n  * `delay:` : (optional) number of seconds to wait before running the shell\n    command, as long as the window's focus remains unchanged.\n    If not supplied, a value of 0 is used.\n  * `retry:` : (optional) number of seconds to wait before retrying a failed\n    shell command. If not supplied, a failed command is never retried.\n\nCommands can include [parenthesised substring matches] by the `$` symbol where\n`$1` is the first submatch, `$2` the second, etc.\n\n    # xawt.conf example configuration\n\n    # freeze Firefox (after 10 seconds) unless it has the focus\n    /- (Mozilla Firefox|Vimperator)$/:\n      in: pkill -CONT firefox\n      out:\n        command: pkill -STOP firefox\n        delay: 10\n\n    # unpause any virtualbox guest immediately on gaining focus\n    /^(\\w+) \\[Paused\\] - Oracle VM VirtualBox$/:\n      in: vboxmanage controlvm $1 resume\n\n    # unconditionally pause virtualbox guest 30 seconds after losing focus\n    /^(HERBERT|SANDPIT) \\[Running\\] - Oracle VM VirtualBox$/:\n      out:\n        command: vboxmanage controlvm $1 pause\n        delay: 30\n\n    # pause virtualbox guest 60 seconds after losing focus unless vlc is running,\n    # in which case keep retrying every 90 seconds until vlc closes.\n    /^(SWEEP) \\[Running\\] - Oracle VM VirtualBox$/:\n      out:\n        command: (! vboxmanage guestcontrol $1 run --wait-stdout --exe /bin/pgrep -- arg0 vlc) \u0026\u0026 vboxmanage controlvm $1 pause\n        delay: 60\n        retry: 90\n\n## options\n\n    $ xawt --help\n    Usage: xawt [Options]\n\n    Options:\n\n      -h, --help                output usage information\n      -V, --version             output the version number\n      -c, --config-path [path]  path to configuration file (default:~/.config/xawt.conf)\n      -d, --dry-run             trace commands without executing\n      -v, --verbose             emit detailed trace for debugging\n\n## developer build and run\n\n    $ git clone --branch=dev https://github.com/dizzib/xawt.git\n    $ cd xawt\n    $ npm install     # install dependencies\n    $ npm test        # build all and run tests\n    $ npm start       # start the task runner and dry-run xawt\n\n## license\n\n[MIT](./LICENSE)\n\n[$XDG_CONFIG_HOME]: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html\n[default configuration file]: ./app/default.conf\n[leanconf]: https://github.com/dizzib/leanconf\n[node.js]: http://nodejs.org\n[parenthesised substring matches]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Using_parenthesized_substring_matches\n[JavaScript regular expression]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n[X11]: https://en.wikipedia.org/wiki/X_Window_System\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdizzib%2Fxawt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdizzib%2Fxawt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdizzib%2Fxawt/lists"}