{"id":16133980,"url":"https://github.com/noah2610/shortstrokes","last_synced_at":"2025-09-22T03:36:06.739Z","repository":{"id":99630675,"uuid":"121309941","full_name":"Noah2610/ShortStrokes","owner":"Noah2610","description":"Simple vim-based shortcut script. Written in Ruby using Curses library.","archived":false,"fork":false,"pushed_at":"2024-06-06T16:59:10.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T15:51:07.223Z","etag":null,"topics":["keybindings","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Noah2610.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-12T22:23:48.000Z","updated_at":"2024-06-06T16:59:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2e7ba46-41ae-4d9a-8513-1b7bc88db822","html_url":"https://github.com/Noah2610/ShortStrokes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Noah2610/ShortStrokes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noah2610%2FShortStrokes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noah2610%2FShortStrokes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noah2610%2FShortStrokes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noah2610%2FShortStrokes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Noah2610","download_url":"https://codeload.github.com/Noah2610/ShortStrokes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noah2610%2FShortStrokes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276342001,"owners_count":25625579,"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-09-22T02:00:08.972Z","response_time":79,"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":["keybindings","ruby"],"created_at":"2024-10-09T22:46:49.511Z","updated_at":"2025-09-22T03:36:06.715Z","avatar_url":"https://github.com/Noah2610.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShortStrokes\n#### by Noah Rosenzweig\n\nA simple shortcut script using vim-like keystrokes.  \nWritten in Ruby using the Curses library.  \n  \nIt also uses my Ruby [Argument Parser](https://github.com/Noah2610/ArgumentParser) to parse command-line options.\n\n---\n\n## Table Of Contents\n* [Description](#description)\n* [Installation](#installation)\n* [Configuration](#configuration)\n* [Command-Line Usage](#command-line-usage)\n  * [Synopsis](#synopsis)\n  * [Options](#options)\n\n---\n\n## Description\nWhen started, this script greets you with a Curses window in which you can  \ntype anything. Whenever your input is matched to a keybinding defined in  \nyour config, it will execute the associated shell script and exit.  \n  \nThe basic usage of this script is to bind it to a keyboard shortcut  \nand define your desired keybindings as shell script  \nin a YAML configuration file.  \nAfter you have entered text inside the program,  \nuse the escape key to clear it or to exit the script when the input is empty.  \n\n## Installation\nRun `git clone https://github.com/Noah2610/ShortStrokes.git` and  \nhave Ruby (probably like 2.0 or up)  \nand ruby-bundler installed, then just run  \n`bundle install` in the root of the project and after that  \nyou should be able to run `./ShortStrokes.rb` without any issues.\n\n## Configuration\nThis script looks for a YAML configuration file  \nin the following order / locations:\n* `~/.config/shortstrokes/config.yml`\n* `~/.shortstrokes.yml`\n* `\u003cPROJECT-ROOT\u003e/config.yml`\n  \nYou can define a custom config path with `--config`.  \nA default config file is included with the project in `./config.yml`.  \n  \nThe configuration file consists of three sections:\n* 'config'  \n    This section can contain all command-line options;  \n    Use a double dash ('--') version of an option without the two dashes  \n    at the start, and separate it from the value with a colon (':').  \n    example:  \n```yaml\nwidth: 47\n```\n* 'constants'  \n    Here you can define any constants/variables you want to be able to use  \n    in your config. Use them by adding a '@' in front of its name,  \n    wherever you want it to be replaced by its associated value.  \n    Currently two constants are set by the script:  \n    `@SHORTSTROKES_ROOT`, this contains the full path to where the script  \n    is located; it is dynamically set everytime the script is called.  \n    `@SHELL`, is set to the shell defined in your config or  \n    from the command-line. The default shell is `/bin/bash`.  \n    example:  \n```yaml\n# defining it:\nbrowser: 'firefox'\n# using it:\nob: '@browser --new-window'\n```\n* 'keybindings'  \n    This is where you actually define all your keystrokes  \n    and their associated shell script commands.  \n    The key is the keystroke and its value is the shell command.  \n    example:  \n```yaml\nhw: 'echo \"Hello World!\"'\n```\n\n## Command-Line Usage\n### Synopsis\n```\nShortStrokes [OPTIONS]\nShortStrokes --config /PATH/TO/CONFIG.yml\n```\n\n### Options\nHere is a list of all available command-line options.  \nAny double dash ('--') version of an option can be used  \nin the config file under the 'config' section.\n\n```\n-h, --help\n  Show help text, basically this README;\n  and exit.\n\n-v, --version\n  Show version;\n  and exit.\n\n-c, --config FILE\n  Use configuration file FILE.\n\n-f, --force\n  Ignore error when using --config with a file\n  without a .yml or .yaml extension.\n\n-w, --width, --cols, --columns CHARS\n  The width/columns in characters used for the Curses window.\n\n-h, --height, --rows, --lines CHARS\n  The height/lines used for the Curses window.\n\n-s, --shell SHELL\n  Use SHELL shell to execute commands.\n  When set to 'false' it will execute the command directly,\n  probably starting /bin/sh anyway.\n\n-p, --text-padding CHARS\n  Text padding in CHARS characters,\n  separating your text input from the borders.\n\n-b, --bg, --exec-background, --exec-bg\n  If this flag is set, the command will be executed in another process\n  in the background. It is recommended to have this option set to true\n  in your config.\n\n-f, --fg, --exec-foreground, --exec-fg\n  The inverse of --exec-background.\n  Execute command from inside the ShortStrokes process.\n  Not recommended, usually.\n\n--no-border, --borderless\n  With this option set, the border of the Curses window\n  will not be drawn. In case you want a cleaner view;\n  can look nice without terminal window borders.\n\n--stdout, --cmdout, --cmd-stdout FILE\n  Redirect stdout of executed command to FILE.\n\n--stderr, --cmderr, --cmd-stderr FILE\n  Redirect stderr of executed command to FILE.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoah2610%2Fshortstrokes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoah2610%2Fshortstrokes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoah2610%2Fshortstrokes/lists"}