add method to open a terminal in the current course

This commit is contained in:
Maximilian Keßler 2021-09-18 14:43:18 +02:00
parent 6e9f6c0c06
commit ced953bb82
2 changed files with 7 additions and 1 deletions

View File

@ -103,6 +103,11 @@ class Notes:
)
return result.returncode
def open_terminal(self):
result = subprocess.Popen(
['termite'], env=self.environment(), cwd=self.root
)
def compile_master(self):
result = subprocess.run(
['latexmk', '-f', '-interaction=nonstopmode', '-dvi-', '-pdf', str(self.master_file)],

View File

@ -8,7 +8,8 @@ def open_spec(specification: str):
switcher = {
'full': current.notes.open_full,
'master': current.notes.open_master
'master': current.notes.open_master,
'terminal': current.notes.open_terminal
}
if specification in switcher.keys():