From 4b14ceb4d795e300af6d2d84ebfcbd5ca98727f0 Mon Sep 17 00:00:00 2001 From: Christian Brideau Date: Fri, 5 Apr 2019 11:34:33 -0400 Subject: [PATCH 1/2] Added -p parameter to allow user to specify terminator profile --- README.md | 2 ++ csshnator | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6933dd3..aa8fe50 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ optional arguments: -h, --help show this help message and exit -l LOGIN, --login LOGIN Login username to pass to all hosts used. + -p PROFILE, --profile PROFILE + Profile to use in terminator -c CLUSTER_NAME, --cluster-name CLUSTER_NAME Cluster name is a collection of hosts available on ~/.csshnatorrc file diff --git a/csshnator b/csshnator index 72210f2..54fe99a 100755 --- a/csshnator +++ b/csshnator @@ -35,6 +35,15 @@ def parse_args(argv): help='Login username to pass to all hosts used.' ) + parser.add_argument( + '-p', + '--profile', + dest='profile', + type=str, + default="default", + help='Profile to use in terminator' + ) + parser.add_argument( '-s', '--show', @@ -76,6 +85,7 @@ def main(argv): exit() cluster_name, login = args.cluster_name, args.login + profile = args.profile width = gtk.gdk.screen_width() height = gtk.gdk.screen_height() @@ -189,7 +199,7 @@ def main(argv): term = term_name + str(row) + str(col) cssh_layout[term] = { "command": command, - "profile": "default", + "profile": profile, "type": "Terminal", "order": order, "parent": termparent, From 590c49da1e4b61a9130172b2046e32b698e57a73 Mon Sep 17 00:00:00 2001 From: Christian Brideau Date: Fri, 5 Apr 2019 11:47:32 -0400 Subject: [PATCH 2/2] Missed something in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa8fe50..afcfbbe 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ For more usage information you can consult the help: ``` ./csshnator --help -usage: csshnator [-h] [-l LOGIN] [-c CLUSTER_NAME] +usage: csshnator [-h] [-l LOGIN] [-p PROFILE] [-s] [-c CLUSTER_NAME] [cluster_nodes [cluster_nodes ...]] Open ClusterSSH-like session on Terminator