/vscode-action-buttons

VsCode Extension For Custom Status bar buttons

Primary LanguageTypeScript

VsCode Action Buttons

This allows you to define custom actions such as run or build and append them to a status bar button in vscode.

Features

You can define a custom action to build a rust project like so.

Installation and set up

  • Search for VsCode Action Buttons in the extensions store.

  • After installing, type ctrl + shift + p and open up work space settings.

  • Now you can define, your action buttons. Below is a sample.

  • Now Reload.

	"run": {
   	 "defaultColor": "#ff0034", // Can also use string color names.
   	 "commands": [
   		 {
   			 "name": "Run Cargo",
   			 "color": "green",
   			 "command": "cargo run", // This is executed in the terminal.
   		 },
   		 {
   			 "name": "Build Cargo",
   			 "color": "green",
   			 "command": "cargo build",
   		 }
   	 ]
    }

Alternatively

If you open an existing project and want to set up action buttons for that workspace.

  • Define the action buttons in your workspace settings.
  • Then, type ctrl + shift + p, search for Refresh Action Buttons and click on it.
  • You Should now see the action buttons on the status bar :).

Config Options

singleInstance: boolean default [false]

Kills the running associated process and restarts it.

Usage

	"run": {
   	 "commands": [
   		 {
   			 "name": "Run Cargo",
   			 "singleInstance": true,
   			 "color": "#af565c",
   			 "command": "cargo run",
   		 },
   	 ]
    }

Release Notes

v0.0.8

Added singleInstance option.

v0.0.7

Added support for default Colors

v0.0.6

Added support for reading actions from the scripts segment of package.json.

v0.0.3

Better documentation.

v0.0.1

Initial Release