tmux-python / tmux-python/tmuxp

Better defaults, less verbosity

Open
#237 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
4.6k
Forks
248
Avg merge
2h 13m
Merged PRs (30d)
1

Description

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            │  
                                                                      │  

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names configuration defaults and aliases but no files, tests, or entry points. Start by locating the configuration parsing and session-generation code for focus, suppress_history, window_name, and shell_command; done means the proposed defaults and shorter names work while the shown configuration remains representable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.