forked from gnome-terminator/terminator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New Plugin] Plugin that inserts the name
This plugin inserts the name of the terminal, as determined by Terminal.get_window_title() to all open terminals. Fixes gnome-terminator#540
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from gi.repository import Gtk | ||
|
||
import terminatorlib.plugin as plugin | ||
from terminatorlib.terminator import Terminator | ||
|
||
AVAILABLE = ['InsertTermName'] | ||
|
||
class InsertTermName(plugin.MenuItem): | ||
capabilities = ['terminal_menu'] | ||
config = None | ||
|
||
def __init__(self): | ||
# self.connect_signals() | ||
plugin.MenuItem.__init__(self) | ||
|
||
def callback(self, menuitems, menu, terminal): | ||
item = Gtk.MenuItem.new_with_label('Insert terminal name') | ||
item.connect('activate', lambda x: terminal.emit('insert-term-name')) | ||
menuitems.append(item) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters