Code Monkey home page Code Monkey logo

terminator_plugins's Introduction

Terminator plugins

I am not using Linux desktop since few years already, and I am not supporting this repository since then as well. I am sorry for inconvenience.

Clone session

Quite often we need to connect to our servers to view logs, etc. Typical usage pattern is to establish several sessions to the same server, tailing the logs on one of them, tweaking configs, checking something else at the same time on the other consoles.

I find Split window feature in Terminator useful, and what I was missing always is cloning current ssh session. When I have a remote console open and want to have connection to the same server from the same window, i.e. I do not want to have several windows, then arrange them on the display.

Good that Terminator is written in Python and can easily be extended with plugins. I had to spend some time reading source code of the Terminator to get an idea how it all works.

Installation is very simple:

mkdir -p ~/.config/terminator/plugins
cd ~/.config/terminator/plugins
wget --no-check-certificate https://github.com/ilgarm/terminator_plugins/raw/master/clone_session.py

Then, restart Terminator, go to Preferences | Plugins, and select ClonedSplittingMenu plugin. With this plugin there will be two items added to the popup menu of Terminator: Clone Horizontally and Clone Vertically.

Plugin has a limitation at the moment, it expects that all ssh connections within the same Terminator window will be established to the same server. This is due to the way how I am trying to find current remote session: by getting child processes of current terminal process and checking if it is a ssh command. If there are any, it will just grab the first one.

For my use case, this limitation is not critical so far, so I did not spent time trying to fix that.

P.S. some useful information on writing Terminator plugins can be found here.

Let me know if there are any bugs found.

terminator_plugins's People

Contributors

cristobal-ortega avatar ilgarm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terminator_plugins's Issues

No install instructions

Please put installation instructions in your README, the blog you have linked to is a password protected link.

Repositories on github always outlive blogs. It doesn't make sense to list instructions elsewhere.

Keybind witht the original split

I suggest to keybind with the original split

say if i click ctrl+shift+o

then it will check if there is ssh session already

if not, then use the original split,
if yes then use your clone split.

no attribute AVAILABLE, no attribute uuid

I'm not a python person but I'm going to look into fixing this issue. I just thought I would share the info.

The menu items do show up but they don't perform the function. If the terminator is lauched from another emulator then we get some output. The first comes on terminators initialization.

PluginRegistry::load_plugins: Importing plugin __init__.py failed: 'module' object has no attribute 'AVAILABLE'

No trace is given.

Signing into ssh gives no issue.

Cloning vertically or horizontally gives this traceback.

Traceback (most recent call last):
  File "/home/k/.config/terminator/plugins/clone_session.py", line 69, in clone_session
    sibling.spawn_child_with_command(cmd)
  File "/home/k/.config/terminator/plugins/clone_session.py", line 198, in spawn_child_with_command
    envv.append('TERMINATOR_UUID=%s' % self.uuid.urn)
AttributeError: 'ClonableTerminal' object has no attribute 'uuid'

I've noticed that this has worked for others without flaw so I suspect this might be a python2/3 issue. This is on arch where python3 is the default python. Edit: It would not get that far with python3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.