Change size of xterm when running c++ (f5)


#1

When writing and compiling c++ in atom, how can I change the size of the xterm window that opens? In codeblocks I can pass arguments to xterm like -geometry 100x50 but I don’t see where to set that in Atom.


#2

What package are you using to run code?


#3

Using gcc-compiler package


#4

I’m not a C++ developer, so I don’t have personal experience with the package, but I think I can help figure it out.
Here’s the code where gpp-compiler defines the xterm instruction. It seems that this is controlled by a config setting, but that config setting is just a dropdown list of terminals and there’s no way to input extra arguments to be added to the command. So here are your options:

  1. Look for a different package. You could replicate the same compile and run process via process-palette, and in that case you could run xterm with whatever arguments you want.
  2. Patch gpp-compiler so that the xterm command includes your custom argument. There’s the quick and dirty way of editing the package source, which will be overwritten when the package updates, and there’s the proper way using git clone https://github.com/krisscross07/gpp-compiler, apm install, and apm link which will prevent automatic updates.
  3. Make a pull request on the gpp-compiler repo with a new config option for additional arguments.