assign each terminal a uuid and expose it via $TERMINATOR_UUID
This commit is contained in:
parent
221c153268
commit
2590b36a75
|
@ -22,6 +22,9 @@ terminator 0.96:
|
|||
context menu (#308025)
|
||||
* Don't forget tab order and custom labels when closing terminals
|
||||
in them (#711356)
|
||||
* Each terminal is assigned a unique identifier and this is exposed
|
||||
to the processes inside the terminal via the environment variable
|
||||
TERMINATOR_UUID
|
||||
|
||||
terminator 0.95:
|
||||
* Add a configuration option to enable a DBus server
|
||||
|
|
|
@ -14,6 +14,7 @@ import gobject
|
|||
import pango
|
||||
import subprocess
|
||||
import urllib
|
||||
import uuid
|
||||
|
||||
from util import dbg, err, gerr
|
||||
import util
|
||||
|
@ -85,6 +86,7 @@ class Terminal(gtk.VBox):
|
|||
command = None
|
||||
clipboard = None
|
||||
pid = None
|
||||
uuid = None
|
||||
|
||||
matches = None
|
||||
config = None
|
||||
|
@ -120,6 +122,9 @@ class Terminal(gtk.VBox):
|
|||
|
||||
self.pending_on_vte_size_allocate = False
|
||||
|
||||
self.uuid = uuid.uuid4()
|
||||
dbg('assigning Terminal a TERMINATOR_UUID of: %s' % self.uuid.urn)
|
||||
|
||||
self.vte = vte.Terminal()
|
||||
self.vte.set_size(80, 24)
|
||||
self.vte._expose_data = None
|
||||
|
@ -1199,9 +1204,12 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
|||
pass
|
||||
|
||||
dbg('Forking shell: "%s" with args: %s' % (shell, args))
|
||||
self.pid = self.vte.fork_command(command=shell, argv=args, envv=[],
|
||||
loglastlog=login, logwtmp=update_records,
|
||||
logutmp=update_records, directory=self.cwd)
|
||||
self.pid = self.vte.fork_command(command=shell, argv=args,
|
||||
envv=['TERMINATOR_UUID=%s' % self.uuid.urn],
|
||||
loglastlog=login,
|
||||
logwtmp=update_records,
|
||||
logutmp=update_records,
|
||||
directory=self.cwd)
|
||||
self.command = shell
|
||||
|
||||
self.titlebar.update()
|
||||
|
|
Loading…
Reference in New Issue