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)
|
context menu (#308025)
|
||||||
* Don't forget tab order and custom labels when closing terminals
|
* Don't forget tab order and custom labels when closing terminals
|
||||||
in them (#711356)
|
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:
|
terminator 0.95:
|
||||||
* Add a configuration option to enable a DBus server
|
* Add a configuration option to enable a DBus server
|
||||||
|
|
|
@ -14,6 +14,7 @@ import gobject
|
||||||
import pango
|
import pango
|
||||||
import subprocess
|
import subprocess
|
||||||
import urllib
|
import urllib
|
||||||
|
import uuid
|
||||||
|
|
||||||
from util import dbg, err, gerr
|
from util import dbg, err, gerr
|
||||||
import util
|
import util
|
||||||
|
@ -85,6 +86,7 @@ class Terminal(gtk.VBox):
|
||||||
command = None
|
command = None
|
||||||
clipboard = None
|
clipboard = None
|
||||||
pid = None
|
pid = None
|
||||||
|
uuid = None
|
||||||
|
|
||||||
matches = None
|
matches = None
|
||||||
config = None
|
config = None
|
||||||
|
@ -120,6 +122,9 @@ class Terminal(gtk.VBox):
|
||||||
|
|
||||||
self.pending_on_vte_size_allocate = False
|
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 = vte.Terminal()
|
||||||
self.vte.set_size(80, 24)
|
self.vte.set_size(80, 24)
|
||||||
self.vte._expose_data = None
|
self.vte._expose_data = None
|
||||||
|
@ -1199,9 +1204,12 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
dbg('Forking shell: "%s" with args: %s' % (shell, args))
|
dbg('Forking shell: "%s" with args: %s' % (shell, args))
|
||||||
self.pid = self.vte.fork_command(command=shell, argv=args, envv=[],
|
self.pid = self.vte.fork_command(command=shell, argv=args,
|
||||||
loglastlog=login, logwtmp=update_records,
|
envv=['TERMINATOR_UUID=%s' % self.uuid.urn],
|
||||||
logutmp=update_records, directory=self.cwd)
|
loglastlog=login,
|
||||||
|
logwtmp=update_records,
|
||||||
|
logutmp=update_records,
|
||||||
|
directory=self.cwd)
|
||||||
self.command = shell
|
self.command = shell
|
||||||
|
|
||||||
self.titlebar.update()
|
self.titlebar.update()
|
||||||
|
|
Loading…
Reference in New Issue