Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Open
lowks opened this Issue · 4 comments

2 participants

@lowks

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.

@tony
Owner

@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

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.

@tony
Owner

@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
@tony tony was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.