{"id":15638894,"url":"https://github.com/seunlanlege/vscode-action-buttons","last_synced_at":"2025-04-04T07:04:03.677Z","repository":{"id":22013827,"uuid":"94710881","full_name":"seunlanlege/vscode-action-buttons","owner":"seunlanlege","description":"VsCode extension for custom status bar buttons","archived":false,"fork":false,"pushed_at":"2024-12-12T13:51:16.000Z","size":615,"stargazers_count":92,"open_issues_count":31,"forks_count":25,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T06:05:44.312Z","etag":null,"topics":["developer","developer-tools","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/seunlanlege.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":"2017-06-18T20:17:16.000Z","updated_at":"2025-03-13T10:20:24.000Z","dependencies_parsed_at":"2025-01-15T02:19:29.161Z","dependency_job_id":null,"html_url":"https://github.com/seunlanlege/vscode-action-buttons","commit_stats":{"total_commits":61,"total_committers":17,"mean_commits":3.588235294117647,"dds":0.7868852459016393,"last_synced_commit":"1c31b94ae39d228b1d23a35f9a4edebe85ff921d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seunlanlege%2Fvscode-action-buttons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seunlanlege%2Fvscode-action-buttons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seunlanlege%2Fvscode-action-buttons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seunlanlege%2Fvscode-action-buttons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seunlanlege","download_url":"https://codeload.github.com/seunlanlege/vscode-action-buttons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135139,"owners_count":20889420,"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":["developer","developer-tools","vscode","vscode-extension"],"created_at":"2024-10-03T11:23:48.254Z","updated_at":"2025-04-04T07:04:03.660Z","avatar_url":"https://github.com/seunlanlege.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VsCode Action Buttons\n\nAdd customizable buttons to the status bar to execute actions or tasks in VS Code.\n\n## Features\n\n* Execute command in terminal\n* Execute VS Code command\n    * Any command that can be activated via a keyboard shortcut can be activated via a button\n* Ability to customize text color for each button\n* Add icons to buttons\n    * Icons can be added to buttons by using the Markdown icons-in-labels syntax. For example, to add an alert icon you include `$(alert) in the button name. See https://code.visualstudio.com/api/references/icons-in-labels for more info\n\n### Example\n\n![](action.gif)\n\n## Installation and setup\n\n - [x] Install the `VsCode Action Buttons` extension in your VS Code instance.\n - [x] After installing, open your VS Code settings (`Ctrl + ,`). Navigate to the `VsCode Action Buttons` section.\n - [x] Define the action buttons you want. Below is a sample configuration for reference.\n - [x] Reload the VS Code window to see the new buttons. Alternatively, you can run the `Refresh Action Buttons` command to refresh without reloading the window.\n\n ```json\n \t\"actionButtons\": {\n\t\t \"defaultColor\": \"#ff0034\", // Can also use string color names.\n\t\t \"loadNpmCommands\":false, // Disables automatic generation of actions for npm commands.\n\t\t \"reloadButton\":\"♻️\", // Custom reload button text or icon (default ↻). null value enables automatic reload on configuration change\n\t\t \"inheritGlobalCommands\": false, // In case you use workspace-scope settings, and want to also use User (global) scope settings, you might enable this\n\t\t \"commands\": [\n\t\t\t {\n\t\t\t\t \"cwd\": \"/home/custom_folder\", \t// Terminal initial folder ${workspaceFolder} and os user home as defaults\n\t\t\t\t \"name\": \"$(triangle-right) Run Cargo\",\n\t\t\t\t \"color\": \"green\",\n\t\t\t\t \"singleInstance\": true,\n\t\t\t\t \"command\": \"cargo run ${file}\", // This is executed in the terminal.\n\t\t\t },\n\t\t\t {\n\t\t\t\t \"name\": \"$(tools) Build Cargo\",\n\t\t\t\t \"color\": \"green\",\n\t\t\t\t \"command\": \"cargo build ${file}\",\n\t\t\t },\n\t\t\t {\n\t\t\t\t\"name\": \"$(split-horizontal) Split editor\",\n\t\t\t\t\"color\": \"orange\",\n\t\t\t\t\"useVsCodeApi\": true,\n\t\t\t\t\"command\": \"workbench.action.splitEditor\"\n\t\t     }\n\t\t ]\n\t }\n ```\n\n## Config Options\n\n* **reloadButton**\n    * Text for reload actions button. Defaults to `↻`. If null, the reload button is disabled.\n* **defaultColor**\n    * Default text color of action buttons. Defaults to `white`. To set default theme color type `none`.\n* **loadNpmCommands**\n    * Whether or not to automatically generate action buttons from commands specified in `package.json`. Defaults to `false`.\n* **commands**\n    * List of action buttons to add to the status bar. Defaults to `[]`. See below for a list of valid options for each command\n\n### Command Options\n\n* **name**\n    * Name of the action button. This field is required. You can add icons in command name by typing `$(icon-name)`. Look [here](https://code.visualstudio.com/api/references/icons-in-labels#icon-listing) for icons. (Note: If you will misspell no icons will show)\n* **saveAll**\n    * Save all open files before execute command\n* **command**\n    * Command to execute when action is activated. This field is required.\n\t* If `useVsCodeApi` is `true`, this is the VS Code command to execute. Otherwise, this specifies the command to execute in the terminal\n* **color**\n    * Specifies the action button text color. Defaults to `defaultColor`.\n* **tooltip**\n    * Tooltip text to display when hovering over the button. Defaults to `command`.\n* **cwd**\n    * Start directory when executing terminal command. Defaults to `${workspaceFolder}`. Only valid when `useVsCodeApi` is `false`\n* **singleInstance**\n    * Reopen associated terminal each time this action is activated. Defaults to `false`. Only valid when `useVsCodeApi` is `false`\n* **focus**\n    * Focus the terminal after executing the command. Defaults to `false`. Only valid when `useVsCodeApi` is `false`\n* **useVsCodeApi**\n    * Specifies whether to execute a VS Code command or terminal command. Defaults to `false`.\n* **args**\n    * Specifies additional arguments to pass to VS Code command. Only valid when `useVsCodeApi` is `true`.\n\n## Usage\n\n ```json\n \t\"actionButtons\": {\n\t\t \"reloadButton\": null,\n\t\t \"loadNpmCommands\": false,\n\t\t \"commands\": [\n\t\t\t {\n\t\t\t\t \"name\": \"Run Cargo\",\n\t\t\t\t \"singleInstance\": true,\n\t\t\t\t \"color\": \"#af565c\",\n\t\t\t\t \"command\": \"cargo run ${file}\",\n\t\t\t },\n\t\t ]\n\t }\n ```\n\n## Config Vars\n\nAs seen in the previous example, vars such as `${file}` can be used. Below is a list of each of them and what they do.\n\n* `workspaceFolder` - the path of the folder opened in VS Code\n* `workspaceFolderBasename` - the name of the folder opened in VS Code without any slashes (/)\n* `file` - the current opened file\n* `relativeFile` - the current opened file relative to workspaceFolder\n* `fileBasename` - the current opened file's basename\n* `fileBasenameNoExtension` - the current opened file's basename with no file extension\n* `fileDirname` -  the current opened file's dirname\n* `fileExtname` - the current opened file's extension\n* `cwd` -  the task runner's current working directory on startup\n* `lineNumber` - the current selected line number in the active file\n* `selectedText` - the current selected text in the active file\n* `execPath` - the path to the running VS Code executable\n\n## Release Notes\n\n### v1.2.2\n\nFix clear terminal command on windows [#85](https://github.com/seunlanlege/vscode-action-buttons/pull/85)\n\n### v1.1.5\nAdded support for VSCode API calls\nAdded `api` option.\n\n### v1.1.4\nAdded support for VSCode predefined variables as ${file}\nAdded `cwd` option.\nAdded `reloadButton` option.\n\n### v1.1.3\nAdded `loadNpmCommands` option.\n\n### v1.1.2\n\n\n### v1.1.0\nAdded `Refresh Action Buttons` action button\n\n### v1.0.0\nChanged configuration name from `run` to `actionButton`\nBetter support for js projects\n\n### v0.0.8\nAdded `singleInstance` option.\n\n### v0.0.7\nAdded support for default Colors\n\n### v0.0.6\nAdded support for reading actions from the scripts segment of package.json.\n\n### v0.0.3\nBetter documentation.\n\n### v0.0.1\n  Initial Release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseunlanlege%2Fvscode-action-buttons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseunlanlege%2Fvscode-action-buttons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseunlanlege%2Fvscode-action-buttons/lists"}