rbtools

a custom toolbar helper

Ronny Barrera

37

1

Bug Reports

1.4.0

MIT

GitHub

This package consumes the following services:

RBTools package

This package allows creating a custom toolbar with buttons to execute atom commands or nodejs code.

Current support

Icon types

Action types

Parameters

Parameters must be included into an array form where the index of the value will use a base-1 increment. $0 is not supported, yet.

Example of configuration for package settings

Example

{
    "Basic Menu": {
        "Buttons": [
            {
                "Name"      : "Reload window",
                "Type"      : "button",
                "Tooltip"   : "Reload Window",
                "IconType"  : "atomIcon",
                "Icon"      : "sync",
                "ActionType": "atomCommand",
                "Action"    : "window:reload",
                "Params"    : []
            },
            {
                "Name"      : "Open with notepad++",
                "Type"      : "button",
                "Tooltip"   : "Open with notepad++",
                "IconType"  : "atomIcon",
                "Icon"      : "file",
                "ActionType": "nodeCommand",
                "Action"    : "child_process.execFile('C:\\Program Files\\Notepad++\\notepad++.exe', [\"$1\"]);",
                "Params"    : ["$currentFile"]
            },
            {
                "Name"      : "open (CMD) terminal here",
                "Type"      : "button",
                "Tooltip"   : "open (CMD) terminal here",
                "IconType"  : "atomIcon",
                "Icon"      : "browser",
                "ActionType": "nodeCommand",
                "Action"    : "child_process.execFile('cmd', ['/C', 'start', '/d', '$1', 'cmd.exe'])",
                "Params"    : ["$currentFolder"]
            },
            {
                "Name"      : "open (PowerShell) terminal here",
                "Type"      : "button",
                "Tooltip"   : "open (PowerShell) terminal here",
                "IconType"  : "atomIcon",
                "Icon"      : "terminal",
                "ActionType": "nodeCommand",
                "Action"    : "child_process.execFile('cmd', ['/C', 'start', '/d', '$1', 'powershell.exe', '-WindowStyle', 'Maximized'])",
                "Params"    : ["$currentFolder"]
            },
            {
                "Name"      : "open Git Bash here",
                "Type"      : "button",
                "Tooltip"   : "open Git Bash here",
                "IconType"  : "url",
                "Icon"      : "https://cdn.iconscout.com/icon/free/png-512/git-14-599158.png",
                "ActionType": "nodeCommand",
                "Action"    : "child_process.execFile('C:\\Program Files\\Git\\git-bash.exe', ['--cd=$1'])",
                "Params"    : ["$currentFolder"]
            }
        ]
    }
}

Preview

simple screenshot