Skip to content

Better defaults, less verbosity #237

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
rafi opened this issue Apr 20, 2017 · 6 comments
Open

Better defaults, less verbosity #237

rafi opened this issue Apr 20, 2017 · 6 comments

Comments

@rafi
Copy link
Contributor

rafi commented Apr 20, 2017

Better defaults, less verbosity:

  • Default focus behavior: (Argument: Normally being first means top priority)
    • Focus the first window
    • Focus the first pane in every window
  • Change suppress_history default to false (Argument: More common to re-use a command after CTRL+C for example, suppress should be the exception)
  • Allow name instead (or as-well) as window_name (Argument: We're already in the windows collection)
  • Allow shell instead (or as-well) as shell_command (Argument: Verbose, two words)
BEFORE                                                                │ AFTER
---                                                                   │ ---
                                                                      │
session_name: acme                                                    │   session_name: acme
start_directory: ./                                                   │   start_directory: ./
suppress_history: false                                               │   windows:
windows:                                                              │     - name: edit
  - window_name: edit                                                 │       panes:
    focus: true                                                       │         - nvim -S ~/.cache/vim/session/acme-react-native.vim
    panes:                                                            │     - name: git
      - nvim -S ~/.cache/vim/session/acme-react-native.vim            │       panes:
  - window_name: git                                                  │         - shell:
    panes:                                                            │           - git status -sb
      - shell_command:                                                │           - git log --graph --all --oneline --decorate
        - git status -sb                                              │     - name: android
        - git log --graph --all --oneline --decorate                  │       layout: main-vertical
  - window_name: android                                              │       panes:
    layout: main-vertical                                             │         - shell:
    panes:                                                            │           - sleep 2
      - focus: true                                                   │           - react-native run-android
        shell_command:                                                │         - shell:
        - sleep 2                                                     │           - sleep 2
        - react-native run-android                                    │           - adb logcat
      - shell_command:                                          ---------→      - react-native start
        - sleep 2                                                     │     - name: db
        - adb logcat                                                  │       layout: main-vertical
      - react-native start                                            │       panes:
  - window_name: db                                                   │         - shell:
    layout: main-vertical                                             │           - sleep 4
    panes:                                                            │           - pgcli -h localhost -U acme acme
      - focus: true                                                   │           - SET search_path = public;
        shell_command:                                                │           - \dn; \dt public.*
        - sleep 4                                                     │         - shell:
        - pgcli -h localhost -U acme acme                             │           - cd ../api
        - SET search_path = public;                                   │           - docker-compose up db redis
        - \dn; \dt public.*                                           │     - name: api
      - shell_command:                                                │       panes:
        - cd ../api                                                   │       - shell:
        - docker-compose up db redis                                  │         - cd ../api
  - window_name: api                                                  │         - sleep 4
    panes:                                                            │         - find . -name '*py' | entr -r docker-compose up api
    - focus: true                                                     │  
      shell_command:                                                  │  
      - cd ../api                                                     │  
      - sleep 4                                                       │  
      - find . -name '*py' | entr -r docker-compose up api            │  
                                                                      │  
@stale
Copy link

stale bot commented Nov 11, 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 11, 2017
@stale stale bot closed this as completed Nov 18, 2017
@rightaway
Copy link

@rafi I agree with all of this. As you're a contributor can you incorporate these changes?

@tony tony added enhancement and removed stale labels Mar 12, 2022
@tony
Copy link
Member

tony commented Mar 12, 2022

I like a lot of these suggestions

2.0 will give a fresh look at the config format

libtmux will have similar refinements and cleanup at the API level.

@tony
Copy link
Member

tony commented Mar 12, 2022

Change `suppress_history default to false (Argument: More common to re-use a command after CTRL+C for example, suppress should be the exception)

I agree with this. I often try to reach for the last few commands in the pane.

However, the reason suppress_history is used is the history file itself doesn't get flooded with repeated commands over startups.

If we want a cross platform way to satisfy all worlds i'm all ears

@tony tony reopened this Mar 19, 2022
@rightaway
Copy link

However, the reason suppress_history is used is the history file itself doesn't get flooded with repeated commands over startups.

@tony People who care about how clean the history file is set their shell settings so that their history files don't have duplicates. It's easy to do in most shells. And other people probably don't even care or know what a history file is.

@tony
Copy link
Member

tony commented Mar 20, 2022

People who care about how clean the history file is set their shell settings so that their history files don't have duplicates.

What would be nice to have instructions for hiding duplicate history on https://tmuxp.git-pull.com

Then I will entertain this behavior as a default. Users need warning before a default like this changes

#760 2.0 is where i'm happy to put in any kind of default behavioral change

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants