[Enhancement]: Add another task to tmuxp to generate sample config file #24

Closed
lowks opened this Issue Nov 24, 2013 · 5 comments

Comments

2 participants

lowks commented Nov 24, 2013

Can you add a task to tmuxp to generate a sample config file, the use case is as follows:

  1. tmuxp generate edit
  2. next tmuxp will ask Save as .{json/yaml} [y/n] ?

The sample is just a very simple say two column config which users can start on. This will help speed up users which are new to tmuxp.

Owner

tony commented Nov 24, 2013

@lowks Good idea, this would be very helpful to have.

I have a two-pronged approach for this:

I am considering JS making a widget on the Readthedocs that helps the user build a YAML or JSON via a visual interface.

I could also make a wizard to assist in creating a boilerplate config.

Would something like this be better ?

$ tmuxp wizard

JSON or YAML? [json, yaml]

>>> yaml

Session name?

>>> my session

session_name: my session

Create a window? [y]

>>> y

Window name:

>>> my window

For Window 'my window', will have a default directory? [dir, n]

>>> ~/mydir

How many panes will it have? [1-9999] (To keep it simple, we can fill the windows with ``-pane`` in the place holders.)

>>> 91

Create another window? [y/n]

Save to: ~/.tmuxp/session-name.yaml?

Open in ``$ EDITOR``? [y,n]

lowks commented Nov 24, 2013

Or you could just check for the existence of config files upon running and if they are not there then just copy over the template files. I know this sorta flies against what I initially thought, but the reasoning is that if a user just installed tmuxp the first time he might not know all of the terminology for the settings. I think that your documentation where you provide sample pics of what the settings do is very good.

Owner

tony commented Nov 24, 2013

@lowks When running tmuxp, before creation of the ~/.tmuxp folder, we can offer to copy example configurations to the user's tmuxp directory.

  • example1.json
  • example2.yaml

Copy an example json and a yaml config into the user's config folder. How about that?

lowks commented Nov 24, 2013

Yes that would be cool!

On 24 Nov, 2013, at 6:06 pm, Tony Narlock notifications@github.com wrote:

This message is eligible for Automatic Cleanup! (notifications@github.com) Add cleanup rule | More info
@lowks When running tmuxp, before creation of the ~/.tmuxp folder, we can offer to copy example configurations to the user's tmuxp directory.

example1.json
example2.yaml
Copy an example json and a yaml config into the user's config folder. How about that?


Reply to this email directly or view it on GitHub.

@ghost ghost assigned tony Nov 24, 2013

@tony tony removed this from the Milestone 0.2 milestone Jun 15, 2016

stale bot commented Nov 12, 2017

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

This bot is used to handle issues where the issue hasn't been discussed or
has gone out of date. If an issue isn't resolved and handled in a certain
period of time, it may be closed. If you would like your issue re-opened,
please create a fresh issue with the latest, up to date information and
mention this issue in it.

@stale stale bot added the stale label Nov 12, 2017

@stale stale bot closed this Nov 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment