Great idea but work still required for general use
reaperzn opened this issue · 2 comments
This is a great idea but still needs a bit of work.
-
The help output does not include the -m flag description that you mention in the README.md
-
This has a dependency on configobj which is not a standard pre-installed package (At least on Ubuntu 16.04). You should a) mention this in the README.md or b) preferably try to rewrite this functionality using built-in functions in python.
-
Currently this does not work for me, it may be because I have adjusted some of my default key bindings but I have not looked into this yet. It may be something you want to look into for your project.
-
This seems to try create a new terminator window with splits which ssh session to the specified hosts in each split. This is a really great idea however this could be set as a separate option (ie --ssh) and have the default option to just open a new terminator session with X number of windows/tty sessions/splits
Overall, This is a great idea and I hope you keep working on it.
For your reference, this is the error message I get when using the "-m" flag:
# ./terminator-split -m localhost localhost -d
args:Namespace(command="ssh '{}'", config='/home/reaper/.config/terminator/config', hostname=['localhost', 'localhost'], level='DEBUG', terminator='/usr/bin/terminator')
unknown_args:['-m']
config:/tmp/tmpWEmTPj:'{'global_config': {'handle_size': '5', 'inactive_color_offset': '1.0'}, 'keybindings': {'broadcast_all': '<Primary><Shift>a', 'broadcast_group': '<Primary><Shift>q', 'broadcast_off': '<Primary><Shift>z', 'close_window': '<Primary><Shift><Alt>k'}, 'layouts': {'default': {'child0': {'type': 'Window', 'parent': ''}, 'child1': {'type': 'HPaned', 'parent': 'child0'}, 'child2': {'type': 'Terminal', 'command': "ssh 'localhost'", 'parent': 'child1'}, 'child3': {'type': 'Terminal', 'command': "ssh 'localhost'", 'parent': 'child1'}}}, 'plugins': {}, 'profiles': {'default': {'background_darkness': '0.92', 'background_image': 'None', 'background_type': 'transparent', 'palette': '#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff', 'scrollback_infinite': 'True'}}}'
This is without the "-m":
./terminator-split localhost localhost -d
args:Namespace(command="ssh '{}'", config='/home/reaper/.config/terminator/config', hostname=['localhost', 'localhost'], level='DEBUG', terminator='/usr/bin/terminator')
unknown_args:[]
config:/tmp/tmp33RcCG:'{'global_config': {'handle_size': '5', 'inactive_color_offset': '1.0'}, 'keybindings': {'broadcast_all': '<Primary><Shift>a', 'broadcast_group': '<Primary><Shift>q', 'broadcast_off': '<Primary><Shift>z', 'close_window': '<Primary><Shift><Alt>k'}, 'layouts': {'default': {'child0': {'type': 'Window', 'parent': ''}, 'child1': {'type': 'HPaned', 'parent': 'child0'}, 'child2': {'type': 'Terminal', 'command': "ssh 'localhost'", 'parent': 'child1'}, 'child3': {'type': 'Terminal', 'command': "ssh 'localhost'", 'parent': 'child1'}}}, 'plugins': {}, 'profiles': {'default': {'background_darkness': '0.92', 'background_image': 'None', 'background_type': 'transparent', 'palette': '#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff', 'scrollback_infinite': 'True'}}}'
reaper@reaper-Desktop:~/Scripts/terminator-split$
** (terminator:13453): WARNING **: Binding '<Shift><Control><Alt>a' failed!
Unable to bind hide_window key, another instance/window has it.
- "-m" is one of the TERMINATOR_OPTIONS
$ terminator-split --help
usage: terminator-split [-h] [-d]
[-e COMMAND] [-g CONFIG] [-t TERMINATOR]
[TERMINATOR_OPTIONS]
hostname [hostname ...]
$ terminator --help
-m, --maximise Maximise the window
2., 3. Should I expect a pull request from you? :)
- I have some aliases in ~/.bashrc
alias tsn='terminator_split_number'
terminator_split_number() {
local number="${1:-4}"
for ((i=0; i<${number}; i++)); do
echo $i
done | xargs terminator-split -e "bash -l" -m -pdefault8
}
Then execute it like this
$ tsn 2
$ tsn 4
$ tsn 8
$ tsn 16
Try latest version.
$ terminator-split 2
$ terminator-split 4
$ terminator-split 8
$ terminator-split 16