0

I recently bought a new keyboard with macro keys. Unfortunately, the manufacture has proprietary software that only runs on Windows.

I have been doing some workarounds to use the macro-keys by first creating custom keyboard shortcuts and them use them in the macro-keys.

Currently, I am trying to create a shortcut to open a local terminal in a folder and lunch visual code.

In ubuntu, a local terminal can be opened by doing:

right click + E

Shift + F10 + E

I would like to know if this is possible through a command line: with something like:

gnome-terminal --working-directory= something to be defined --LocationOfVisualStudioLuncher

Best Regards!

2 Answers2

0

For me in Ubuntu 20.10, a

cd <your folder> && gnome-terminal

will open a terminal in <your folder>.

To spawn a terminal and your custom application, you can launch to background as in

cd <your folder> && gnome-terminal & your_application &

vanadium
  • 97,564
0

You can accomplish this by executing something like this in one line:

gnome-terminal --working-directory ~/GIT --title "code terminal" && gnome-terminal -- code

for convenience add this to your ~/.bashrc file so that you have direct access to a shortcut command "gt":

alias gt='gnome-terminal --working-directory ~/GIT --title "code terminal" && gnome-terminal -- code'

Hope that helps!

SLS
  • 178