How to add a custom button in Komodo X?

Hi, I would like to have a “Commit” and “Push” button somewhere, like Komodo 9.

Currently there is a SCC button on the left side, it’s shows a dropdown menu.

Komodo X

Komodo 9

There are any way to do it faster like Komodo 9? (1 click)

Thank you in advance!

I just found a Commit panel on the bottom! there is no push button, but there is a commit button! :smiley:

So, All what i need is a Push button…

This would work the same way it did back in Komodo 9; you create a “Toolbar” in your toolbox and place a command or userscript under there which will then show up as a button on your toolbar. Note you may have this toolbar hidden, check by right clicking your toolbar and hitting “Customize”.

1 Like

@nathanr, the SCC toolbar buttons weren’t custom toolbar buttons. It looks like they got removed (or just moved to the dynamic button) in the upgrade from Komodo 9 to Komodo X.

Having said that, @stramin, if you want a toolbar button you’ll have to do @nathanr suggestion of creating a custom button and adding it to your toolbar. But that would be essentially same as using the SCC dynamic button that you already found.

  • Carey
1 Like

Well it would be in a different place and cost 2 clicks.

My thinking when I created the Dynamic button is that push/pull is not something you do that often that you would need it available at a single click.

1 Like

I can’t do it :open_mouth:

I made a Toolbar called SCC, I tried adding a Command inside, but I don’t know how to make it work as a Push Button


What should I write for “Command:” input?

The command you want it to run, probably git push?

1 Like

@stramin,

Unfortunately there are a few things wrong here.
First, you’ve added the Description of the command to the field. Not the command name. The command is actually called cmd_SCCpush.

Second, the “command” tool is meant for things that would run in the command line, not internal Komodo commands.

If you want to use a Komodo command you need to create a Userscript and add the following code:
ko.commands.doCommandAsync("cmd_SCCpush");

If you want to use a Toolbox command you would use the regular git command:
git push

  • Carey
1 Like

It works!! :smiley:

Thank you careyh and nathanr, many years helping me!

1 Like

I just wanted to extend @careyh answer by explaining how this can be done using the command in you’re toolbox.

First thing you want to do is add a custom toolbar to you’re toolbox:

In the next screen you can give the toolbar a name:

If you did that, you will now have custom toolbar where you can add you’re git commands:

In the commands configuration screen you will have the following options:

For me running git <command> is not working.
I have to specify the directory to run the command in like this:
git -C %i <command>

The %i is a interpolation shortcut for the current project directory, you will find more interpolation shortcuts under the “arrow” button:

To change the icon click on “change icon…”, to show all the source control icons you have to type ko_scc:

After saving the command the button will appear in you’re toolbar:

For the ko.commands.doCommandAsync("<command>"); you can find a reference for the commands here

4 Likes

Damn @babobski, making us look bad here :wink: Thanks for sharing! :slight_smile:

1 Like

That’s the reason why I like @babobski. The way he describes something is incredible!

1 Like

Thank you for the nice, complete and easy to understand explanation.

1 Like