In MatterControl, you can get the custom G-Code that it starts and ends with from Settings>Printer>Custom G-Code.
I made a combination of the Cura settings and the MatterControl settings for something I liked more.
My start G-Code that I use in Cura is:
G92 E0 ; reset expected extruder position
M565 Z+1 ; set z offset
G28 X0 Y0 Z0 ; home all axes
G1 Z5 F5000 ; lift nozzle
G28 X0 Y0 Z0 ; Home Z again in case there was filament on nozzle
G29 ; probe the bed
-------------------------------------------------------------------------------------------------------------------------------------
My end G-code:
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F{speed_travel} ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning
Hope this helps people in the future!