Exemple #1
0
 def terminal_spawn(self, directory=None):
     terminal = GuakeTerminal(self.guake)
     terminal.grab_focus()
     if not isinstance(directory, str):
         directory = os.environ['HOME']
         try:
             if self.guake.settings.general.get_boolean('open-tab-cwd'):
                 active_terminal = self.get_focused_terminal()
                 directory = os.path.expanduser('~')
                 if active_terminal:
                     directory = active_terminal.get_current_directory()
         except Exception as e:
             pass
     log.info("Spawning new terminal at %s", directory)
     terminal.spawn_sync_pid(directory)
     return terminal
Exemple #2
0
 def terminal_spawn(self, directory=None):
     terminal = GuakeTerminal(self.guake)
     terminal.grab_focus()
     if not isinstance(directory, str):
         directory = os.environ['HOME']
         try:
             if self.guake.settings.general.get_boolean('open-tab-cwd'):
                 active_terminal = self.get_focused_terminal()
                 directory = os.path.expanduser('~')
                 if active_terminal:
                     directory = active_terminal.get_current_directory()
         except Exception as e:
             pass
     log.info("Spawning new terminal at %s", directory)
     terminal.spawn_sync_pid(directory)
     return terminal
Exemple #3
0
 def terminal_spawn(self, directory=None):
     terminal = GuakeTerminal(self.guake)
     terminal.grab_focus()
     if not isinstance(directory, str):
         directory = os.environ["HOME"]
         try:
             if self.guake.settings.general.get_boolean("open-tab-cwd"):
                 # Do last focused terminal still alive?
                 active_terminal = self.get_current_terminal()
                 if not active_terminal:
                     # If not alive, can we get any focused terminal?
                     active_terminal = self.get_focused_terminal()
                 directory = os.path.expanduser("~")
                 if active_terminal:
                     # If found, we will use its directory as new terminal's directory
                     directory = active_terminal.get_current_directory()
         except BaseException:
             pass
     log.info("Spawning new terminal at %s", directory)
     terminal.spawn_sync_pid(directory)
     return terminal
Exemple #4
0
 def terminal_spawn(self, directory=None):
     terminal = GuakeTerminal(self.guake)
     terminal.grab_focus()
     if not isinstance(directory, str):
         directory = os.environ['HOME']
         try:
             if self.guake.settings.general.get_boolean('open-tab-cwd'):
                 # Do last focused terminal still alive?
                 active_terminal = self.get_current_terminal()
                 if not active_terminal:
                     # If not alive, can we get any focused terminal?
                     active_terminal = self.get_focused_terminal()
                 directory = os.path.expanduser('~')
                 if active_terminal:
                     # If found, we will use its directory as new terminal's directory
                     directory = active_terminal.get_current_directory()
         except Exception as e:
             pass
     log.info("Spawning new terminal at %s", directory)
     terminal.spawn_sync_pid(directory)
     return terminal