Skip to content

Commit

Permalink
I was wondering why the editor couldn't recognize any of the compilat…
Browse files Browse the repository at this point in the history
…ion commands and then I realized that I surrounded all of the cmd commands with single quotes. My brain is smooth, but I am happy to have fixed this problem. You should be able to compile and run your code from the editor.
  • Loading branch information
SethWalkeroo committed Oct 30, 2020
1 parent 4a1c121 commit 8e85aed
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
22 changes: 11 additions & 11 deletions src/data/config/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ autoclose_singlequotes: true
autoclose_squarebrackets: true
current_line_indicator: false
current_line_indicator_symbol: '>'
font_color: '#f8f8f2'
font_color: '#e6d6ba'
font_family: consolas
font_size: 18
font_size: 16
horizontal_scrollbar_active_bg: '#8a7575'
horizontal_scrollbar_color: '#383030'
horizontal_scrollbar_show: true
horizontal_scrollbar_trough_color: '#2e2724'
horizontal_scrollbar_width: 0
insertion_blink: false
insertion_color: '#f8f8f2'
menu_active_bg: '#36342c'
menu_active_fg: '#a1efe4'
menu_bg: '#272822'
menu_fg: '#75715E'
menubar_active_bg: '#36342c'
menubar_active_fg: '#a1efe4'
insertion_color: '#e6d6ba'
menu_active_bg: '#1f1c1a'
menu_active_fg: '#d14c04'
menu_bg: '#0b0e12'
menu_fg: '#453d36'
menubar_active_bg: '#1f1c1a'
menubar_active_fg: '#d14c04'
tab_size: 4
text_bottom_lineheight: '6'
text_selection_bg: '#36342c'
text_selection_bg: '#1f1c1a'
text_top_lineheight: '0'
text_wrap: none
textarea_background_color: '#272822'
textarea_background_color: '#0b0e12'
textarea_border: 0
textarea_padding_x: '5'
textarea_padding_y: '5'
Expand Down
2 changes: 2 additions & 0 deletions src/quiet_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ def open_file(self, *args):
('Swift Files', '*.swift')])

self.initialize_syntax()
if not self.filename:
self.filename = self.previous_file
self.set_window_title(name=self.filename)
except Exception as e:
print(e)
Expand Down
42 changes: 21 additions & 21 deletions src/quiet_menubar.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,38 +312,38 @@ def build(self, *args):
if self._parent.operating_system == 'Linux':
build = f"gnome-terminal -- bash -c 'go build {self._parent.filename}; read'"
elif self._parent.operating_system == 'Windows':
build = f'start cmd.exe @cmd /k "go build {self._parent.filename}"'
build = f'start cmd.exe @cmd /k go build {self._parent.filename}'
os.system(build)
elif filename[-2:] == '.c':
compiled_name = filename[:-2]
if self._parent.operating_system == 'Linux':
compile_cmd = f"gnome-terminal -- bash -c 'cc {filename} -o {compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
compile_cmd = f'start cmd.exe @cmd /k "cc {filename} -o {compiled_name}"'
compile_cmd = f'start cmd.exe @cmd /k cc {filename} -o {compiled_name}'
os.chdir(file_path)
os.system(compile_cmd)
elif filename[-4:] == '.cpp':
compiled_name = filename[:-4]
if self._parent.operating_system == 'Linux':
compile_cmd = f"gnome-terminal -- bash -c 'g++ -o {compiled_name} {filename}; read'"
elif self._parent.operating_system == 'Windows':
compile_cmd = f"start cmd.exe @cmd /k 'g++ -o {compiled_name} {filename}'"
compile_cmd = f"start cmd.exe @cmd /k g++ -o {compiled_name} {filename}"
os.chdir(file_path)
os.system(compile_cmd)
elif filename[-5:] == '.java':
compiled_name = filename[:-5]
if self._parent.operating_system == 'Linux':
compile_cmd = f"gnome-terminal -- bash -c 'javac {filename}; read'"
elif self._parent.operating_system == 'Windows':
compile_cmd = f"start cmd.exe @cmd /k 'javac {filename}'"
compile_cmd = f"start cmd.exe @cmd /k javac {filename}"
os.chdir(file_path)
os.system(compile_cmd)
elif filename[-3:] == '.rs':
compiled_name = filename[:-3]
if self._parent.operating_system == 'Linux':
compile_cmd = f"gnome-terminal -- bash -c 'rustc {filename}; read'"
elif self._parent.operating_system == 'Windows':
compile_cmd = f"start cmd.exe @cmd /k 'rustc {filename}'"
compile_cmd = f"start cmd.exe @cmd /k rustc {filename}"
os.chdir(file_path)
os.system(compile_cmd)
else:
Expand All @@ -360,15 +360,15 @@ def run(self, *args):
if filename[-3:] == '.py':
#run separate commands for different os
if self._parent.operating_system == 'Windows':
cmd = f'start cmd.exe @cmd /k "python {self._parent.filename}"'
cmd = f'start cmd.exe @cmd /k python {self._parent.filename}'
elif self._parent.operating_system == 'Linux':
cmd = f"gnome-terminal -- bash -c 'python3 {self._parent.filename}; read'"
os.system(cmd)
elif filename[-5:] == '.html':
if self._parent.operating_system == 'Linux':
cmd = f"gnome-terminal -- bash -c '{self._parent.browser} {filename}; read'"
elif self._parent.operating_system == 'Windows':
cmd = f'start cmd.exe @cmd /k "{self._parent.browser} {filename}"'
cmd = f'start cmd.exe @cmd /k {self._parent.browser} {filename}'
os.system(cmd)
elif filename[-3:] == '.js':
if self._parent.operating_system == 'Linux':
Expand All @@ -380,38 +380,38 @@ def run(self, *args):
if self._parent.operating_system == 'Linux':
cmd = f"gnome-terminal -- bash -c 'go run {self._parent.filename}; read'"
elif self._parent.operating_system == 'Windows':
cmd = f'start cmd.exe @cmd /k "go run {self._parent.filename}"'
cmd = f'start cmd.exe @cmd /k go run {self._parent.filename}'
os.system(cmd)
elif filename[-2:] == '.c':
compiled_name = filename[:-2]
if self._parent.operating_system == 'Linux':
run_cmd = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
run_cmd = f"start cmd.exe @cmd /k '{compiled_name}'"
run_cmd = f"start cmd.exe @cmd /k {compiled_name}"
os.chdir(file_path)
os.system(run_cmd)
elif filename[-4:] == '.cpp':
compiled_name = filename[:-4]
if self._parent.operating_system == 'Linux':
run_cmd = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
run_cmd = f"start cmd.exe @cmd /k '{compiled_name}'"
run_cmd = f"start cmd.exe @cmd /k {compiled_name}"
os.chdir(file_path)
os.system(run_cmd)
elif filename[-5:] == '.java':
compiled_name = filename[:-5]
if self._parent.operating_system == 'Linux':
run_cmd = f"gnome-terminal -- bash -c 'java {compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
run_cmd = f"start cmd.exe @cmd /k 'java {compiled_name}'"
run_cmd = f"start cmd.exe @cmd /k java {compiled_name}"
os.chdir(file_path)
os.system(run_cmd)
elif filename[-3:] == '.rs':
compiled_name = filename[:-3]
if self._parent.operating_system == 'Linux':
run_cmd = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
run_cmd = f"start cmd.exe @cmd /k '{compiled_name}'"
run_cmd = f"start cmd.exe @cmd /k {compiled_name}"
os.chdir(file_path)
os.system(run_cmd)
else:
Expand All @@ -433,7 +433,7 @@ def build_run(self, *args):
run = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
build = f'start cmd.exe @cmd /k "go build {self._parent.filename}"'
run = f'start cmd.exe @cmd /k "{compiled_name}"'
run = f'start cmd.exe @cmd /k {compiled_name}'
os.chdir(file_path)
os.system(build)
os.system(run)
Expand All @@ -443,8 +443,8 @@ def build_run(self, *args):
build = f"gnome-terminal -- bash -c 'cc {filename} -o {compiled_name}; read'"
run = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
build = f'start cmd.exe @cmd /k "cc {filename} -o {compiled_name}"'
run = f"start cmd.exe @cmd /k '{compiled_name}'"
build = f'start cmd.exe @cmd /k cc {filename} -o {compiled_name}'
run = f"start cmd.exe @cmd /k {compiled_name}"
os.chdir(file_path)
os.system(build)
os.system(run)
Expand All @@ -454,8 +454,8 @@ def build_run(self, *args):
build = f"gnome-terminal -- bash -c 'g++ -o {compiled_name} {filename}; read'"
run = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
build = f"start cmd.exe @cmd /k 'g++ -o {compiled_name} {filename}'"
run = f"start cmd.exe @cmd /k '{compiled_name}'"
build = f"start cmd.exe @cmd /k g++ -o {compiled_name} {filename}"
run = f"start cmd.exe @cmd /k {compiled_name}"
os.chdir(file_path)
os.system(build)
os.system(run)
Expand All @@ -465,8 +465,8 @@ def build_run(self, *args):
build = f"gnome-terminal -- bash -c 'javac {filename}; read'"
run = f"gnome-terminal -- bash -c 'java {compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
build = f"start cmd.exe @cmd /k 'javac {filename}'"
run = f"start cmd.exe @cmd /k 'java {compiled_name}'"
build = f"start cmd.exe @cmd /k javac {filename}"
run = f"start cmd.exe @cmd /k java {compiled_name}"
os.chdir(file_path)
os.system(build)
os.system(run)
Expand All @@ -476,8 +476,8 @@ def build_run(self, *args):
build = f"gnome-terminal -- bash -c 'rustc {filename}; read'"
run = f"gnome-terminal -- bash -c './{compiled_name}; read'"
elif self._parent.operating_system == 'Windows':
build = f"start cmd.exe @cmd /k 'rustc {filename}'"
run = f"start cmd.exe @cmd /k '{compiled_name}'"
build = f"start cmd.exe @cmd /k rustc {filename}"
run = f"start cmd.exe @cmd /k {compiled_name}"
os.chdir(file_path)
os.system(build)
os.system(run)
Expand Down

0 comments on commit 8e85aed

Please sign in to comment.