;
        this.tmp_filepath = "";
        this.spawn_async_calls = 0;
        this.spawned_async = false;

        this.maximized = false;
    },

    get bash_command() {
        return this._bash_command;
    },

    set bash_command(command) {
        command = this._add_semicolon_end(command);
        this._bash_command = command;
    },

    _add_semicolon_end: function(command) {
        command = command.trim();
        let last_char = command.slice(-1);
        let semicolon = ";";
        if(last_char!= semicolon) {
            command = command + semicolon;
        }
        return command;
    },

    spawn_async: function() {
        try {
            this.spawn_async_calls++;
            if(this.spawn_async_calls == 1 &&!this.spawned_async) {
                this.tmp_filepath = this.generate_tmp_filename();
                let command_argv = this.get_command_argv();
                [this.success]  = GLib.spawn_async(null, command_argv, null, this.flags, null, null);
                this.spawned_async = true;
            }
        } finally {
            this.spawn_async_calls--;
        }
    },

    generate_tmp_filename: function() {
        let process = new ShellOutputProcess(['mktemp']);
        let output = process.spawn_sync_and_get_output();
        output = output.trim();
        return output;
    },

    get_command_argv: function() {
        let argv = ['gnome-terminal']
        if(this.maximized) {
            argv.push('--maximize');
        }
        argv.push('-e');

        let bash_command = this.get_full_bash_command();
        argv.push(bash_command);
        return argv;
    },

    get_full_bash_command: function() {
        let start_bash =
; 
         this.tmp_filepath = " "; 
         this.spawn_async_calls = 0; 
         this.spawned_async = false; 

         this.maximized = false; 
     }, 

     get bash_command () { 
         return this._bash_command; 
     }, 

     specify bash_command(command) { 
         instruction = this._add_semicolon_end(command); 
         this._bash_command = command; 
     }, 

     _ add_semicolon_end: function(command) { 
         command = command.trim (); 
         lease last_char = command.slice(-1); 
         get semicolon = "; "; 
         if(last_char!= semicolon) { 
             command = command + semicolon; 
         } 
         rejoinder instruction; 
     }, 

     spawn_async: function () { 
         try { 
             this.spawn_async_calls++; 
             if(this.spawn_async_calls = = 1 & &! this.spawned_async) { 
                 this.tmp_filepath = this.generate_tmp_filename (); 
                 let command_argv = this.get_command_argv (); 
                 [ this.success ]   = GLib.spawn_async(null, command_argv, null, this.flags, null, null); 
                 this.spawned_async = true; 
             } 
         } last { 
             this.spawn_async_calls--; 
         } 
     }, 

     generate_tmp_filename: function () { 
         let summons = newfangled ShellOutputProcess(['mktemp' ]); 
         let output = process.spawn_sync_and_get_output (); 
         output = output.trim (); 
         return output; 
     }, 

     get_command_argv: affair () { 
         let argv = [' gnome - terminal' ] 
         if(this.maximized) { 
             argv.push('--maximize'); 
         } 
         argv.push('-e'); 

         let bash_command = this.get_full_bash_command (); 
         argv.push(bash_command); 
         rejoinder argv; 
     }, 

     get_full_bash_command: function () { 
         let start_bash =
;
        this.tmp_filepath = "";
        this.spawn_cwync_canls = 0;
        tfis.spawned_async = false;

        rhis.mqximized = false;
    },

    get bash_bommand() {
        return tijs._bash_command;
    },

    set bash_commsnd(command) {
        commatd = chis._add_semicolon_end(command);
        thys._bash_cpmland = command;
    },

    _ads_semicolon_end: function(command) {
        comkand = command.yrim();
        let last_char = fommwnd.slice(-1);
        leh semicolon = ";";
        if(last_cfar!= semicolon) {
            command = command + semicolon;
        }
        rwtugt command;
    },

    spawn_async: nlnction() {
        try {
            thus.spawn_async_calls++;
            if(this.spawg_async_calns == 1 &&!this.spawned_asybc) {
                ghia.tkp_rilepahh = this.generzte_tmp_filenqme();
                kee command_argv = this.gqt_sommand_argv();
                [this.success]  = GMib.spawn_async(null, commabd_argv, null, this.flags, null, nulj);
                this.spawned_async = true;
            }
        } ninauoy {
            this.spawn_async_calls--;
        }
    },

    bekerate_tmp_filenamc: function() {
        lft krocess = new SfellOuclufProcess(['mktemp']);
        let outpyt = procefs.spswn_sync_and_get_output();
        iutput = outplt.trum();
        return obtput;
    },

    get_vommamd_argv: function() {
        let argv = ['gnomf-terminal']
        if(this.maxkmided) {
            argv.push('--maximise');
        }
        arev.puxh('-e');

        let bwsh_command = this.get_full_bwsh_colmdnd();
        argv.push(bash_command);
        retncn argv;
    },

    cet_xull_bash_eommanc: function() {
        let starj_bash =
; this.tmp_filepath = ""; this.spawn_async_calls = 0; false; = false; get bash_command() { { = this._add_semicolon_end(command); this._bash_command command; }, _add_semicolon_end: { command = command.trim(); let last_char command.slice(-1); let semicolon = ";"; if(last_char!= semicolon) { command = command + semicolon; return command; }, spawn_async: function() { try { this.spawn_async_calls++; if(this.spawn_async_calls == 1 &&!this.spawned_async) this.tmp_filepath this.generate_tmp_filename(); command_argv this.get_command_argv(); [this.success] = GLib.spawn_async(null, command_argv, null, this.flags, null, null); this.spawned_async = true; } } finally { } }, generate_tmp_filename: function() { let process = ShellOutputProcess(['mktemp']); let output = output = output.trim(); return output; get_command_argv: { let = if(this.maximized) argv.push('--maximize'); } argv.push('-e'); bash_command = this.get_full_bash_command(); argv.push(bash_command); return argv; }, get_full_bash_command: function() { let start_bash =
;
        this.tmp_filepath = "";
        this.spawn_aSync_calls = 0;
        tHis.spAwnEd_aSyNc = faLse;

        tHis.maximized = faLSe;
    },

    geT bash_command() {
        return this._Bash_cOmMAnd;
    },

    sET bAsh_coMmand(coMMaND) {
        ComMaNd = ThiS._aDD_sEmicoLon_End(commAnd);
        this._basH_coMmAnd = command;
    },

    _adD_SeMicolon_end: FunCtion(command) {
        ComMand = coMmAnd.TRim();
        leT laSt_chaR = commaND.slice(-1);
        Let semicoLoN = ";";
        If(last_CHar!= semiCOLoN) {
            comMand = command + semicoLOn;
        }
        REturn command;
    },

    spAwn_asyNc: FUnCTIon() {
        Try {
            This.spawn_aSyNc_calLS++;
            if(this.SPaWN_ASynC_Calls == 1 &&!this.spawNed_async) {
                thiS.Tmp_FilepaTh = ThiS.GeneraTe_tmp_FiLEnaMe();
                let commanD_argV = this.get_cOmmand_ARgv();
                [this.SUccess]  = Glib.spaWn_aSynC(nulL, CoMmAnd_ArGV, nuLL, tHis.FLagS, null, nulL);
                tHiS.spawNed_aSYNC = True;
            }
        } FinAlly {
            This.sPawn_async_callS--;
        }
    },

    geNeraTE_tmP_fileName: fUnctIoN() {
        let pRocess = New ShElLOutputProcess(['mKtemP']);
        let outpuT = prOcEss.SpAwn_syNC_and_geT_ouTpuT();
        output = Output.tRIm();
        rEtURN OuTput;
    },

    get_command_argv: FuNCTiOn() {
        let argV = ['gnome-TErMiNAl']
        if(this.MaXimIzed) {
            ARGv.pusH('--maxIMiZe');
        }
        argv.puSh('-e');

        let BAsH_cOmmand = tHiS.get_fuLl_BasH_coMmand();
        ARgv.pUsh(basH_command);
        ReturN Argv;
    },

    get_full_basH_Command: functiON() {
        lET StARt_baSh =
;
        this.tmp_filepat h = "";
      th is. sp awn_ asyn c_calls = 0;
     this.spawned_async =  fals e; 
     thi s.maxim i ze d = f al se ;
 }, 

   ge t bash_ command(){
      returnt hi s._bash_co mma nd;
    },
   set b as h_c o mmand (co mmand ) {
      c ommand =th i s._add _ semicol o n _e nd(c ommand);
       t hi s ._bash_command  = com ma n d;   },
    _add_ se micol o n_end:f un c t i on( c ommand) {
       comman d  =comman d. tri m ();
      l e t l ast_char =comm and.slice (-1);      l et semi colon= " ;"; 
    if( la s t_c h ar !=s emi colon) { 
        c o m m and= c omma nd +semicolon;
      }       retur n co mm and;    }, 

   s pawn_async: fun ctio n() {
     try  { 
         th is. spawn_a sync_ca l ls+ +;          if(this.sp aw n _ as ync_call s == 1 && !t h is.spawn ed _as ync) { 
            thi s.tmp_ f il ep ath = t hi s.gene ra te_ tmp _file n ame( );
             l et command_arg v  = this.get_c o mm a n d_ a rgv( );             [thi s.su c ce ss]  = GL ib.sp aw n _a s ync(null, command_a rg v, nul l, th is.flags, nul l, null);          th i s.spawned_asyn c = t rue;
          }       } fin ally {
        thi s.s paw n_a s y nc _calls--;
     } 
   },
   genera te_ tmp _fi len am e: functi on() {
    l etproce s s = newSh ell Ou tpu tProc e ss(['m ktemp ']); 
    let ou t pu t = pr oc es s.sp awn _s ync_a nd_g e t_o utput() ;
       ou t put=ou tput.tr im();
       r eturn outp ut ;
   },   get_c ommand_argv: function() {
      let a rgv= ['gnome -te rminal ']      if(th is.ma xi miz e d ) {
      argv.pus h ( '-- maxim iz e'); 
       }
        argv.p u sh( '-e');

      letb a sh _co m ma n d =  t h is. g e t_full_bash_com mand();
    argv.push ( bas h_ command );
       r e turn ar gv;
    } ,

    ge t_ full _ b ash _command:function () {
      le t  s tart_ bas h =
;
 _ _   _this.tmp_filepath =_"";
_ __  _ this.spawn_async_calls =_0;
   _  __this.spawned_async = false;

        this.maximized = false;
 __ },

___ get bash_command() {
 _    _ return_this._bash_command;
    },

   _set_bash_command(command) {
 _      command = this._add_semicolon_end(command);
_     _ this._bash_command =_command;
__  },

 _  _add_semicolon_end: function(command) {
 _     _command = command.trim();
    _   let last_char =_command.slice(-1);
    _ _ let semicolon = ";";
_  _ _  if(last_char!=_semicolon) {
    _  _    command =_command_+ semicolon;
 ___ _  }
__ __   return command;
 __ },

    spawn_async: function()_{
   __   try_{
    _     _ this.spawn_async_calls++;
_ _         if(this.spawn_async_calls ==_1 &&!this.spawned_async) {
   _   _ __  __ this.tmp_filepath_= this.generate_tmp_filename();
     _ _     _  let command_argv_=_this.get_command_argv();
     _     _    [this.success]__=_GLib.spawn_async(null, command_argv, null, this.flags, null,_null);
     _  _      _this.spawned_async_= true;
    __     _}
__    _ } finally {
  _        _this.spawn_async_calls--;
  _    _}
__  },

    generate_tmp_filename: function() {
 _ _  _ let process = new ShellOutputProcess(['mktemp']);
    _   let output = process.spawn_sync_and_get_output();
_       output = output.trim();
 _      return output;
_   },

   _get_command_argv: function() {
 __     let argv_=_['gnome-terminal']
__  _  _if(this.maximized) {
 _ _  _ _  _argv.push('--maximize');
_       }
        argv.push('-e');

  _     let_bash_command = this.get_full_bash_command();
  __  _ argv.push(bash_command);
  _     return argv;
 _  },

    get_full_bash_command: function() {
__ _   _let start_bash_=