Running a python program from a hotkey in kubuntu 22.04?

Question:

I have a python program that can be executed by navigating to the folder it is located in using cd, and using the

python3 main.py

command. Is there any way I can assign a hotkey to run this program, or at least open console, navigate to that folder, and execute the program?

enter image description here

enter image description here

Asked By: Renni Stewart

||

Answers:

On the top of the terminal you can see a button to add the shortcut. After that add the file path as command then set the shortcut

Answered By: user19419589
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.