{"id":21515405,"url":"https://github.com/danielfgray/yaxg","last_synced_at":"2025-04-09T20:12:14.483Z","repository":{"id":148822056,"uuid":"70851721","full_name":"DanielFGray/yaxg","owner":"DanielFGray","description":"capture and record your screen with callbacks","archived":false,"fork":false,"pushed_at":"2019-03-27T04:35:29.000Z","size":42,"stargazers_count":49,"open_issues_count":2,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T20:12:08.051Z","etag":null,"topics":["ffmpeg","maim","screencast","screenshot","slop","webm"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielFGray.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":"2016-10-13T22:01:43.000Z","updated_at":"2024-12-17T18:56:09.000Z","dependencies_parsed_at":"2023-06-27T18:34:47.758Z","dependency_job_id":null,"html_url":"https://github.com/DanielFGray/yaxg","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/DanielFGray%2Fyaxg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielFGray%2Fyaxg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielFGray%2Fyaxg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielFGray%2Fyaxg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielFGray","download_url":"https://codeload.github.com/DanielFGray/yaxg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"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":["ffmpeg","maim","screencast","screenshot","slop","webm"],"created_at":"2024-11-23T23:55:08.519Z","updated_at":"2025-04-09T20:12:14.475Z","avatar_url":"https://github.com/DanielFGray.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaxg\n\nYet Another X Grabber script\n\n## Dependencies\n\n* *[slop](https://github.com/naelstrof/slop)* - for selecting regions and windows\n* *[maim](https://github.com/naelstrof/maim)* - for saving screenshots\n* *[ffmpeg](http://ffmpeg.org/)* - for recording videos\n* *[byzanz](http://git.gnome.org/browse/byzanz)* - for recording gifs (soon to be replaced with ffmpeg)\n* *libnotify* / *notify-send* - for notifications\n\n## Usage\nyaxg [OPTIONS] [FILE]  \n\n### Options\n\n```\n-d  specify duration to record for (only works for webms)\n-D  specify delay\n-F  overwrite file if it exists\n-s  select a region or window\n-S  pass a arguments directly to slop\n-e  execute a script in the config dir or a callback string with the current $SHELL\n-g  save as gif (will be overridden by file extension)\n-p  save as png (will be overridden by file extension)\n-w  save as webm (will be overridden by file extension)\n    this is the default behavior when -g or -p is not present and the filename doesn't end in png or gif\n    press Ctrl+C to stop recording or run `yaxg stop`\n-v  increase verbosity (can be stacked)\n    first level will show errors parsing config file, consecutive levels will be passed to ffmpeg\n-h  print this help\n```\n\n### Special Strings\n\nSimilar to `scrot`, the callback and filename parameters can take format specifiers that are expanded when encountered. Characters preceded by\n`%` are interpreted directly by the `date` commmand. See `man strftime` for examples. Characters preceded by `$` are parsed by yaxg and expanded as such:\n\n```\n$f  quoted image path/filename (only available in callback)\n$w  image width\n$h  image height\n```\n\n### Configuration\n\nA configuration file can saved to `~/.config/yaxg/conf`  \nIf a line begins with `#` it is treated as a comment and ignored.  \nThe config file accepts the following values:\n\n```\ncallback\n  a callback string to execute\n  if callback is a script in the config dir, the the quoted filename will automatically be passed to the script\nfilename\n  a default filename to use when none is provided (must not include extension)\n\tdefaults to %FT%R:%S:%:z_$wx$h\nformat\n  default format to use, must be either 'png', 'webm', or 'gif'\nslop\n  arguments to be passed to slop\n```\n\n## Examples\n\n* Example CLI usage:\n\n``` bash\nyaxg '%s-$w-$h'\nyaxg '%s-$w-$h' -e 'mv $f ~/images/$f'\nyaxg -s -S '-l -c 0.3,0.4,0.6,0.4' -e 'mv $f ~/images/$f \u0026\u0026 firefox ~/images/$f'\nprintf '#!/usr/bin/env bash\\n\\n[[ \"$1\" =~ png$ ]] \u0026\u0026 optipng \"$1\"\\n' \u003e ~/.config/yaxg/myScript \u0026\u0026 chmod +x !#:3 \u0026\u0026 yaxg -e 'myScript'\n```\n\n* Example config file:\n\n```\nfilename  %c - $wx$h\nformat    png\nslop      -l -c 0.3,0.4,0.6,0.4\ncallback  myScript\n```\n\nThe wiki has some [example callback scripts](https://github.com/DanielFGray/yaxg/wiki/Example-callback-scripts).\n\n## Installation\n\nArch Linux users can install from the AUR as `yaxg-git` via their favorite AUR helper.\n\nIf you're on another distro, I would suggest cloning the repo and symlink'ing the script into `~/.local/bin` and adding that to your `PATH`.\n\n## See also\n\n* [tekup](https://github.com/DanielFGray/tekup) - upload files to https://teknik.io via `yaxg -e 'tekup $f'`\n\n## Legal\nCopyright (C) 2016 Daniel F Gray \u003cDanielFGray@gmail.com\u003e\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfgray%2Fyaxg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielfgray%2Fyaxg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfgray%2Fyaxg/lists"}