tmux-python / tmux-python/libtmux

Feature request: Clean up

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
127
Avg merge
2h 13m
Merged PRs (30d)
1

Description

Using tmux with Python means we lose the ability to interact with tmux. libtmux is a great tool, though currently my biggest worry is that I create a bunch of sessions, windows and panes.

Exiting out of panes is easy, since if you do && exit at the end of the command you execute it closes that terminal and hence closes that pane.

However, I find that there is no easy way to close windows or sessions. Im currently contemplating writing my own script with some simple logic like...

if does_window_contain_pane(window-number) == False:
    tmux kill-window -t window-number
if session_contains_windows(sesh) == False:
    tmux kill-session -t sesh

Think this is possible to implement? I have noticed a lot of scripts floating around trying to accomplish this. It would make libtmux all the more powerful and all the helper scripts obsolete.

Thanks for the great tool!!

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

No file, test, or entry point is named. Start by locating libtmux's existing session, window, and pane APIs and how they issue tmux lifecycle commands; define the behavior for empty windows and sessions, then add coverage showing that the requested cleanup is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.