Run Terminal on Desktop Macro (v11.0.4)

I have tested some apps to open the Terminal in a selected or active Finder folder, but none of them were convincing. So I created a macro to open the Terminal at the Desktop. Then I thought: since I mostly use the Terminal to run a Python script, why not type the command “python3” too?

Run Terminal on Desktop.kmmacros (4.5 KB)

Demo:
Image-000863

On a side note: I’m a big fan of the Norton Commander clone CRAX Commander (what’s in a name…). It offers a command (that can be assigned to a keyboard shortcut) to open the terminal in a selected folder.

I think this one probably serves a particular purpose for your needs. I don’t see how it is of general use but I may have missed the point so could you please make it explicit?

I guess that it’s just one illustration of how to stack some commands together, to start using python right away. Nothing big, just nice. Perhaps some other user gets inspiration from it.

2 Likes

Thanks for clarifying. :+1:

IMHO a few words about a macro are always useful, just to give context.

2 Likes

If you want to execute sequence of commands in terminal - put all commands in one string separated by semicolon like:

cd Desktop; python3 

Additionally you can put some logic into command sequence like here:

cd Desktop 2> /dev/null && python3 ) || echo "No directory or python3 interpreter exists"

If directory exists, python will be run, if not , error message will be displayed.

2 Likes