:computer: tmux session manager. built on libtmux

Overview

tmuxp, tmux session manager. built on libtmux.

Python Package Docs Build status Code Coverage License

We need help! tmuxp is a trusted session manager for tmux. If you could lend your time to helping answer issues and QA pull requests, please do! See issue #290!

New to tmux? The Tao of tmux is available on Leanpub and Amazon Kindle. Read and browse the book for free on the web.

Installation

$ pip install --user tmuxp

Load a tmux session

Load tmux sessions via json and YAML, tmuxinator and teamocil style.

session_name: 4-pane-split
windows:
- window_name: dev window
  layout: tiled
  shell_command_before:
    - cd ~/                    # run as a first command in all panes
  panes:
    - shell_command:           # pane no. 1
        - cd /var/log          # run multiple commands in this pane
        - ls -al | grep \.log
    - echo second pane         # pane no. 2
    - echo third pane          # pane no. 3
    - echo forth pane          # pane no. 4

Save as mysession.yaml, and load:

$ tmuxp load ./mysession.yaml

Projects with .tmuxp.yaml or .tmuxp.json load via directory:

$ tmuxp load path/to/my/project/

Load multiple at once (in bg, offer to attach last):

$ tmuxp load mysession ./another/project/

Name a session:

$ tmxup load -s session_name ./mysession.yaml

simple and very elaborate config examples

User-level configurations

tmuxp checks for configs in user directories:

  • $TMUXP_CONFIGDIR, if set
  • $XDG_CONFIG_HOME, usually $HOME/.config/tmuxp/
  • $HOME/.tmuxp/

Load your tmuxp config from anywhere by using the filename, assuming ~/.config/tmuxp/mysession.yaml (or .json):

$ tmuxp load mysession

See author's tmuxp configs and the projects' tmuxp.yaml.

Shell

New in 1.6.0:

tmuxp shell launches into a python console preloaded with the attached server, session, and window in libtmux objects.

$ tmuxp shell

(Pdb) server
<libtmux.server.Server object at 0x7f7dc8e69d10>
(Pdb) server.sessions
[Session($1 your_project)]
(Pdb) session
Session($1 your_project)
(Pdb) session.name
'your_project'
(Pdb) window
Window(@3 1:your_window, Session($1 your_project))
(Pdb) window.name
'your_window'
(Pdb) window.panes
[Pane(%6 Window(@3 1:your_window, Session($1 your_project)))
(Pdb) pane
Pane(%6 Window(@3 1:your_window, Session($1 your_project))

Python 3.7+ supports PEP 553 breakpoint() (including PYTHONBREAKPOINT). Also supports direct commands via -c:

$ tmuxp shell -c 'print(window.name)'
my_window

$ tmuxp shell -c 'print(window.name.upper())'
MY_WINDOW

Read more on tmuxp shell in the CLI docs.

Pre-load hook

Run custom startup scripts (such as installing project dependencies before loading tmux. See the bootstrap_env.py and before_script example

Load in detached state

You can also load sessions in the background by passing -d flag

Screenshot

https://raw.github.com/tmux-python/tmuxp/master/doc/_static/tmuxp-demo.gif

Freeze a tmux session

Snapshot your tmux layout, pane paths, and window/session names.

$ tmuxp freeze session-name

See more about freezing tmux sessions.

Convert a session file

Convert a session file from yaml to json and vice versa.

$ tmuxp convert filename

This will prompt you for confirmation and shows you the new file that is going to be written.

You can auto confirm the prompt. In this case no preview will be shown.

$ tmuxp convert -y filename
$ tmuxp convert --yes filename

Plugin System

tmuxp has a plugin system to allow for custom behavior. See more about the Plugin System.

Debugging Helpers

The load command provides a way to log output to a log file for debugging purposes.

$ tmuxp load --log-file <log-file-name> .

Collect system info to submit with a Github issue:

$ tmuxp debug-info
------------------
environment:
    system: Linux
    arch: x86_64

# ... so on

Docs / Reading material

See the Quickstart.

Documentation homepage (also in 中文)

Want to learn more about tmux itself? Read The Tao of Tmux online.

Donations

Your donations fund development of new features, testing and support. Your money will go directly to maintenance and development of the project. If you are an individual, feel free to give whatever feels right for the value you get out of the project.

See donation options at https://git-pull.com/support.html.

Project details

Comments
  • attempt at fixing #309 layout issues with tmux 2.6

    attempt at fixing #309 layout issues with tmux 2.6

    even after setting -x and -y with new-session, select-layout won't take effect. However, it is necessary in 2.6 to get pane creation in detached mode to work.

    the only way found for tmux select-layout to take effect and prior behavior to have viewed the window you are running "select-layout" for in the client.

    a solution has been devised to connect the client to the session, then run select-layout on each window in the session. However, it's still not enough to load the session, it seems the window must be selected by the client at least once for the select-layout to take effect.

    so a hook against the session is created for the session that selects each window, runs select layout ~~at the -t target for the window id~~. and after that, the hook is neatly unset when that's finished.

    opened by tony 59
  • Switch to MIT license

    Switch to MIT license

    I'd like to switch the license to something even more permissive than BSD 3-clause (MIT).

    Sorry for causing the ping, but wanted to get it out of the way.

    If you're ok with it, please reply with a note that you agree for your code contribution(s) to tmuxp to be released under the MIT license.

    • [x] @ikirudennis
    • [x] @ThiefMaster
    • [x] @sebastianst
    • [x] @kmactavish
    • [x] @thomasballinger
    • [x] @madprog
    • [x] @tasdomas
    • [x] @myw
    • [x] @fpietka
    • [ ] @roxit
    • [x] @jorise
    • [x] @apieum (by thumbs up)
    • [x] @marbu
    • [x] @rafi
    • [x] @mexicarne
    • [x] @stemid (by thumbs up)
    • [x] @abeyer
    • [x] @ohardy
    • [x] @gtback
    • [x] @techtonik
    • [x] @raine
    • [x] @yegortimoshenko
    • [ ] @cryptojuice
    • [x] @yvaucher
    • [x] @estin
    • [x] @achals
    • [x] @sehe
    • [x] @Omeryl
    • [x] @joelwallis
    • [x] @Ilyes512
    pinned 
    opened by tony 41
  • ValueError: Session requires a `session_id`

    ValueError: Session requires a `session_id`

    I am getting the following error in all configurations. (I tried the config from the readme as well)

    Traceback (most recent call last):
      File "/home/vn-ki/.local/bin/tmuxp", line 11, in <module>
        load_entry_point('tmuxp==1.4.0', 'console_scripts', 'tmuxp')()
      File "/usr/lib/python3.6/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python3.6/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python3.6/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python3.6/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/home/vn-ki/.local/lib/python3.6/site-packages/tmuxp/cli.py", line 602, in command_load
        load_workspace(config[-1], **tmux_options)
      File "/home/vn-ki/.local/lib/python3.6/site-packages/tmuxp/cli.py", line 328, in load_workspace
        builder.build()
      File "/home/vn-ki/.local/lib/python3.6/site-packages/tmuxp/workspacebuilder.py", line 141, in build
        session_name=self.sconf['session_name']
      File "/home/vn-ki/.local/lib/python3.6/site-packages/libtmux/server.py", line 511, in new_session
        session = Session(server=self, **session)
      File "/home/vn-ki/.local/lib/python3.6/site-packages/libtmux/session.py", line 42, in __init__
        raise ValueError('Session requires a `session_id`')
    ValueError: Session requires a `session_id`
    
    bug pinned 
    opened by vn-ki 25
  • tmux freeze fails

    tmux freeze fails

    Hi,

    I just installed tmuxp using pip3 install tmuxp. It believed it installed fine because if I type just tmuxp, it shows the help.

    I have a tmux session named main. But when I typed tmuxp freeze main, I got this backtrace:

    > tmuxp freeze main
    Traceback (most recent call last):
      File "/home/kmodi/stowed/bin/tmuxp", line 11, in <module>
        load_entry_point('tmuxp==1.2.8', 'console_scripts', 'tmuxp')()
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/tmuxp/cli.py", line 387, in command_freeze
        sconf = freeze(session)
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/tmuxp/workspacebuilder.py", line 324, in freeze
        'options': w.show_window_options(),
      File "/home/kmodi/stow/pkgs/python/3.6.1/lib/python3.6/site-packages/libtmux/window.py", line 195, in show_window_options
        window_options = dict(cmd)
    ValueError: dictionary update sequence element #2 has length 4; 2 is required
    

    Python version: 3.6.1 OS: RHEL 6.6

    opened by kaushalmodi 25
  • tests/test_workspacebuilder.py::test_pane_order does not return

    tests/test_workspacebuilder.py::test_pane_order does not return

    During packaging tmuxp and after building tmuxp, I run the tests using python3 setup.py test.

    However, test_workspacebuilder.py does never return (hangs forever) and I have to kill the build and build without tests (not good):

    running test
    Searching for pytest==3.4.2
    Reading https://pypi.python.org/simple/pytest/
    Downloading https://files.pythonhosted.org/packages/f1/5c/411ceafef3b5e5486d16f174db18dc26f49e7704dbf59ef488e95db47339/pytest-3.4.2-py2.py3-none-any.whl#sha256=062027955bccbc04d2fcd5d79690947e018ba31abe4c90b2c6721abec734261b
    Best match: pytest 3.4.2
    Processing pytest-3.4.2-py2.py3-none-any.whl
    Installing pytest-3.4.2-py2.py3-none-any.whl to /build/tmuxp/src/tmuxp-1.4.0/.eggs
    writing requirements to /build/tmuxp/src/tmuxp-1.4.0/.eggs/pytest-3.4.2-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /build/tmuxp/src/tmuxp-1.4.0/.eggs/pytest-3.4.2-py3.6.egg
    running egg_info
    writing tmuxp.egg-info/PKG-INFO
    writing dependency_links to tmuxp.egg-info/dependency_links.txt
    writing entry points to tmuxp.egg-info/entry_points.txt
    writing requirements to tmuxp.egg-info/requires.txt
    writing top-level names to tmuxp.egg-info/top_level.txt
    reading manifest file 'tmuxp.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'tmuxp.egg-info/SOURCES.txt'
    running build_ext
    ============================= test session starts ==============================
    platform linux -- Python 3.6.5, pytest-3.4.2, py-1.5.3, pluggy-0.6.0
    rootdir: /build/tmuxp/src/tmuxp-1.4.0, inifile: setup.cfg
    plugins: rerunfailures-4.0
    collected 94 items
    
    tests/test_cli.py .......................................                [  0%]
    tests/test_config.py ...............                                     [  0%]
    tests/test_config_teamocil.py ........                                   [  0%]
    tests/test_config_tmuxinator.py ...                                      [  0%]
    tests/test_util.py .....                                                 [  0%]
    tests/test_workspacebuilder.py ...s...........
    

    Do I have to run the tests somehow differently? Am I missing something?

    bug 
    opened by dvzrv 23
  • Add `shell`-configuration to pane layer

    Add `shell`-configuration to pane layer

    This is supposed to fix #139.

    I added a shell-configuration to the pane layer. This way you can specify for every pane what shell/application is supposed to be started. I added an example to the documentation to drive the point home why it makes sense.

    I wasn't really able to understand how to add the test cases to the test environment. I hope someone can help with this. The example should hopefully already contain most edge cases in any case.

    The more complicated part was to make sure that the shell command for the first pane gets respected by the window creation, as the shell for the first pane has to be handed over to the create-window-command.

    opened by jerri 22
  • Second window comes into focus first

    Second window comes into focus first

    I have a simple config with three windows. I have set focus: true for the first window to show upon loading a new session. Instead of the first, second window opens up.

    session.yaml

    session_name: daily
    windows:
      - window_name: default
        focus: true
        layout: main-horizontal
        options:
          main-pane-height: 4
        panes:
        - shell_command:
          - watch acpi --thermal
        - shell_command:
          - task
      - window_name: projects
        start_directory: ~/projects
        panes:
        - shell_command:
          - ls
      - window_name: prog
        layout: main-horizontal
        panes:
        - shell_command:
          - py3
        - shell_command:
          - node
    

    What is wrong with my configuration?

    Version information:

    tmuxp 1.3.5 tmux 2.6 Debian Testing

    opened by anmsh 22
  • Remove version pinning

    Remove version pinning

    The Pipfile lists many version pinned requirements. IMHO requirements should ideally never be version pinned (only if really really required). Please remove the version pinning, where not needed! It's hard to do proper packaging with this (especially for distributions, that follow upstream closely, such as Arch Linux).

    opened by dvzrv 19
  • ERROR:libtmux.session:list index out of range

    ERROR:libtmux.session:list index out of range

    For the following session file (~/.tmuxp/mail.yaml):

    session_name: mail
    windows:
    - window_name: foo
      panes:
        - mutt
    - window_name: bar
      panes:
        - mutt -F ~/.muttrc.bar
    

    I'm getting

    ~ ❯❯❯ tmuxp load mail
    [Loading] /home/francisco/.tmuxp/mail.yaml
    ERROR:libtmux.session:list index out of range
    Traceback (most recent call last):
      File "/usr/lib/python3.5/site-packages/libtmux/common.py", line 238, in __getattr__
        return self._info[self.formatter_prefix + key]
    TypeError: 'NoneType' object is not subscriptable
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/bin/tmuxp", line 9, in <module>
        load_entry_point('tmuxp==1.2.0', 'console_scripts', 'tmuxp')()
      File "/usr/lib/python3.5/site-packages/click/core.py", line 716, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python3.5/site-packages/click/core.py", line 696, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3.5/site-packages/click/core.py", line 1060, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python3.5/site-packages/click/core.py", line 889, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python3.5/site-packages/click/core.py", line 534, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 484, in command_load
        load_workspace(config[-1], **tmux_options)
      File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 260, in load_workspace
        builder.build()
      File "/usr/lib/python3.5/site-packages/tmuxp/workspacebuilder.py", line 144, in build
        assert(self.sconf['session_name'] == session.name)
      File "/usr/lib/python3.5/site-packages/libtmux/common.py", line 241, in __getattr__
        (self.__class__, key))
    AttributeError: <class 'libtmux.session.Session'> has no property name
    

    I'm on ArchLinux using the AUR package: https://aur.archlinux.org/packages/tmuxp.

    bug stale 
    opened by oblitum 19
  • feat(builder): allow environments for windows and panes

    feat(builder): allow environments for windows and panes

    This fixes #832.

    Open question: what's the intended/desired fallback behavior?

    1. (Currently implemented) If a pane doesn't have a environment configuration it uses the environment configuration of the window. This means that in order to change one environment variable (compared to the window) the full environment configuration needs to be duplicated. This also makes it possible to unset some variable if needed (compared to 2.) by skipping it int the configuration.
    2. The environment of a pane is ChainMapped with the one of the window (and possibly the session?) which means that the final environment contains all variables from both pane and window with the pane value taking precedence over the one from the window. This would avoid the possible duplication of 1. but makes it harder to unset an variable (in case an empty value doesn't suffice).
    3. Something else? Proposals welcome.

    Tests are currently failing as the check for old tmux versions isn't implemented yet.

    opened by zappolowski 18
  • layout is broken on 1.3.4

    layout is broken on 1.3.4

    With this simple configuration now the main window is always with width 2. It doesn't matter whether I set main-pane-width: 160 or not, it's always loaded in a strip of just 2 columns.

    session_name: foo
    windows:
    - layout: main-vertical
      panes:
      - blank
      - blank
    

    I'm using the package from AUR.

    Issue is present both in vertical and horizontal layouts.

    opened by oblitum 18
  • 1.22.0: test_window_shell fails

    1.22.0: test_window_shell fails

    Step 1: Provide a summary of your problem

    When packaging 1.22.0, the test test_window_shell fails.

    Step 2: Provide tmuxp details

    n/a

    Step 3: Describe the problem:

    Steps to reproduce:

    Same as in my other tickets

    Observed Results:

    =================================== FAILURES ===================================
    ______________________________ test_window_shell _______________________________
    
    session = Session($1 libtmux_a2zoq8m_)
    
        def test_window_shell(session):
            workspace = ConfigReader._from_file(
                test_utils.get_workspace_file("workspace/builder/window_shell.yaml")
            )
            workspace = loader.expand(workspace)
    
            builder = WorkspaceBuilder(sconf=workspace)
    
    >       for w, wconf in builder.iter_create_windows(session):
    
    tests/workspace/test_builder.py:319:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    test_dir/usr/lib/python3.10/site-packages/tmuxp/workspace/builder.py:376: in iter_create_windows
        w = session.new_window(
    /usr/lib/python3.10/site-packages/libtmux/session.py:552: in new_window
        return Window.from_window_id(
    /usr/lib/python3.10/site-packages/libtmux/window.py:92: in from_window_id
        window = fetch_obj(
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    server = Server(socket_name=libtmux_testeupg4wcy), obj_key = 'window_id'
    obj_id = '@2', list_cmd = 'list-windows', list_extra_args = ('-a',)
    
        def fetch_obj(
            server: "Server",
            obj_key: str,
            obj_id: str,
            list_cmd: "ListCmd" = "list-panes",
            list_extra_args: "ListExtraArgs" = None,
        ) -> OutputRaw:
            obj_formatters_filtered = fetch_objs(
                server=server, list_cmd=list_cmd, list_extra_args=list_extra_args
            )
    
            obj = None
            for _obj in obj_formatters_filtered:
                if _obj.get(obj_key) == obj_id:
                    obj = _obj
    
    >       assert obj is not None
    E       assert None is not None
    
    /usr/lib/python3.10/site-packages/libtmux/neo.py:242: AssertionError
    =========================== short test summary info ============================
    FAILED tests/workspace/test_builder.py::test_window_shell - assert None is no...
    

    tmuxp-1.22.0-1-x86_64-check.log

    Expected Results:

    All tests pass

    Relevant Code:

    n/a

    opened by dvzrv 3
  • tmuxp pane name doesn't work - they all have the same name: zsh

    tmuxp pane name doesn't work - they all have the same name: zsh

    Step 1: Provide a summary of your problem

    Panes name doesn't work, all have the same name: zsh Screenshot from 2022-12-22 03-58-16

    OS: Linux Mint 21.1 (Ubuntu 22.04 based) Shell: zsh. I use powerlevel10k for terminal customization, the theme is based on the zsh shell.

    .tmux.conf

    unbind C-b
    set-option -g prefix C-a
    set-option -g allow-rename off
    set -g default-terminal "screen-256color"
    set -g pane-border-format "#{pane_index} #{pane_title}"
    set -g pane-border-status bottom
    set -g status-left-length 85
    set-window-option -g window-status-current-style bg=yellow
    set -g mouse on
    # List of TMUX Plugins
    set -g @plugin 'tmux-plugins/tpm'
    set -g @plugin 'tmux-plugins/tmux-sensible'
    set -g @plugin 'tmux-plugins/tmux-resurrect'
    set -g @plugin 'tmux-plugins/tmux-continuum'
    # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
    run '~/.tmux/plugins/tpm/tpm'
    

    Step 2: Provide tmuxp details

    tmuxp debug-info

    -------------------------
    environment:
    	dist: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
    	arch: x86_64
    	uname: Linux; marius; 5.15.0-56-generic
    	version: #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022
    -------------------------
    python version: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
    system PATH: /home/marius/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/usr/local/bin:/home/marius/
    tmux version: 3.2
    libtmux version: 0.10.1
    tmuxp version: 1.9.2
    tmux path: /usr/bin/tmux
    tmuxp path: /usr/lib/python3/dist-packages/tmuxp/__init__.py
    shell: /usr/bin/zsh
    -------------------------
    tmux sessions:
    	0: 1 windows (created Thu Dec 22 03:55:48 2022) (attached)
    	4-pane-split: 1 windows (created Thu Dec 22 03:57:58 2022)
    	alt-pane-split: 1 windows (created Thu Dec 22 03:56:54 2022)
    
    tmux windows:
    	0: zsh* (1 panes) [190x43] [layout b8bd,190x43,0,0,0] @0 (active)
    
    tmux panes:
    	0: [190x42] [history 287/50000, 131286 bytes] %0 (active)
    
    tmux global options:
    	@continuum-save-last-timestamp 1671675049
    	@plugin tmux-plugins/tmux-continuum
    	@resurrect-restore-script-path /home/marius/.tmux/plugins/tmux-resurrect/scripts/restore.sh
    	@resurrect-save-script-path /home/marius/.tmux/plugins/tmux-resurrect/scripts/save.sh
    	@resurrect-strategy-irb default_strategy
    	@resurrect-strategy-mosh-client default_strategy
    	activity-action other
    	assume-paste-time 1
    	base-index 0
    	bell-action any
    	default-command ''
    	default-shell /usr/bin/zsh
    	default-size 80x24
    	destroy-unattached off
    	detach-on-destroy on
    	display-panes-active-colour red
    	display-panes-colour blue
    	display-panes-time 1000
    	display-time 4000
    	history-limit 50000
    	key-table root
    	lock-after-time 0
    	lock-command "lock -np"
    	message-command-style bg=black,fg=yellow
    	message-style bg=yellow,fg=black
    	mouse off
    	prefix C-a
    	prefix2 None
    	renumber-windows off
    	repeat-time 500
    	set-titles off
    	set-titles-string "#S:#I:#W - \"#T\" #{session_alerts}"
    	silence-action other
    	status on
    	status-bg default
    	status-fg default
    	status-format[0] "#[align=left range=left #{status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]#[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]#{W:#[range=window|#{window_index} #{window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{window-status-last-style},default}}, #{window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{window-status-bell-style},default}}, #{window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{window-status-activity-style},default}}, #{window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{window-status-current-style},default},#{window-status-current-style},#{window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{window-status-last-style},default}}, #{window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{window-status-bell-style},default}}, #{window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{window-status-activity-style},default}}, #{window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}#[nolist align=right range=right #{status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]"
    	status-format[1] "#[align=centre]#{P:#{?pane_active,#[reverse],}#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
    	status-interval 5
    	status-justify left
    	status-keys emacs
    	status-left "[#{session_name}] "
    	status-left-length 85
    	status-left-style default
    	status-position bottom
    	status-right "#(/home/marius/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh)#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\"#{=21:pane_title}\" %H:%M %d-%b-%y"
    	status-right-length 40
    	status-right-style default
    	status-style bg=green,fg=black
    	update-environment[0] DISPLAY
    	update-environment[1] KRB5CCNAME
    	update-environment[2] SSH_ASKPASS
    	update-environment[3] SSH_AUTH_SOCK
    	update-environment[4] SSH_AGENT_PID
    	update-environment[5] SSH_CONNECTION
    	update-environment[6] WINDOWID
    	update-environment[7] XAUTHORITY
    	visual-activity off
    	visual-bell off
    	visual-silence off
    	word-separators " "
    
    tmux window options:
    	aggressive-resize on
    	allow-rename off
    	alternate-screen on
    	automatic-rename on
    	automatic-rename-format "#{?pane_in_mode,[tmux],#{pane_current_command}}#{?pane_dead,[dead],}"
    	clock-mode-colour blue
    	clock-mode-style 24
    	copy-mode-match-style bg=cyan,fg=black
    	copy-mode-current-match-style bg=magenta,fg=black
    	copy-mode-mark-style bg=red,fg=black
    	main-pane-height 24
    	main-pane-width 80
    	mode-keys emacs
    	mode-style bg=yellow,fg=black
    	monitor-activity off
    	monitor-bell on
    	monitor-silence 0
    	other-pane-height 0
    	other-pane-width 0
    	pane-active-border-style "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}"
    	pane-base-index 0
    	pane-border-format "#{pane_index} #{pane_title}"
    	pane-border-lines single
    	pane-border-status bottom
    	pane-border-style default
    	remain-on-exit off
    	synchronize-panes off
    	window-active-style default
    	window-size latest
    	window-style default
    	window-status-activity-style reverse
    	window-status-bell-style reverse
    	window-status-current-format "#I:#W#{?window_flags,#{window_flags}, }"
    	window-status-current-style bg=yellow
    	window-status-format "#I:#W#{?window_flags,#{window_flags}, }"
    	window-status-last-style default
    	window-status-separator " "
    	window-status-style default
    	wrap-search on
    	xterm-keys on
    

    Step 3: Describe the problem:

    Steps to reproduce:

    1. tmuxp load mysession (cretated folder .tmuxp in home directory that hold all the .yml files)
    2. My .yml file (mysession) is the default example from tmuxp

    Expected Results:

    The pane must respect the name declared in the .yml file

    opened by Adelante10k 3
  • Running tmux commands after creating session

    Running tmux commands after creating session

    I want to run a tmux command after the session creation. Using the following command in my tmux.conf:

    set-hook -g after-new-session 'display-popup -w 80% -h 60% neofetch'
    

    causes the following exception:

    Traceback (most recent call last):
      File "/usr/bin/tmuxp", line 8, in <module>
        sys.exit(cli.cli())
      File "/usr/lib/python3.10/site-packages/tmuxp/cli/__init__.py", line 134, in cli
        command_load(
      File "/usr/lib/python3.10/site-packages/tmuxp/cli/load.py", line 655, in command_load
        load_workspace(
      File "/usr/lib/python3.10/site-packages/tmuxp/cli/load.py", line 446, in load_workspace
        _load_attached(builder, detached)
      File "/usr/lib/python3.10/site-packages/tmuxp/cli/load.py", line 183, in _load_attached
        builder.build()
      File "/usr/lib/python3.10/site-packages/tmuxp/workspace/builder.py", line 217, in build
        session = self.server.new_session(
      File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 605, in new_session
        raise exc.LibTmuxException(proc.stderr)
    libtmux.exc.LibTmuxException: ['no current client']
    

    Is there any way to do this using tmuxp?

    opened by 1995parham 0
  • Improve logging for workspacebuilder

    Improve logging for workspacebuilder

    in re: debugging cases like #364

    Requirements / blockers

    Requires improvements for libtmux and its subprocess calls

    Details

    1. There's no way to assert the message is raised - except maybe checking pytest's caplog with logging turned up to the max.
    2. We need better introspection of events at the libtmux level:
      • Being able to trace where in the config / workspacebuilder libtmux methods are being run
        • and the subprocess calls to tmux(1) within those
    WorkspaceBuilder 
    opened by tony 0
  • fix(tests): explicitly state the shell to use

    fix(tests): explicitly state the shell to use

    tmux uses the default login shell and thus tests might fail if this is not bash (or something compatible). Explicitly stating which shell to use circumvents issues arising from accidentally using another shell.

    opened by zappolowski 12
Releases(v1.24.0)
  • v1.24.0(Dec 30, 2022)

    What's Changed

    • CLI Tests: Refactor to tests/cli by @tony in https://github.com/tmux-python/tmuxp/pull/858

    • WorkspaceBuilder: Harden typings by @tony in https://github.com/tmux-python/tmuxp/pull/857

    • libtmux: 0.18.1 -> 0.18.2

      Fix for launching new tmux servers with default socket path/socket name (https://github.com/tmux-python/tmuxp/issues/856)

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.24.0a0...v1.24.0

    Source code(tar.gz)
    Source code(zip)
  • v1.24.0a0(Dec 30, 2022)

    What's Changed

    • CLI Tests: Refactor to tests/cli by @tony in https://github.com/tmux-python/tmuxp/pull/858

    • WorkspaceBuilder: Harden typings by @tony in https://github.com/tmux-python/tmuxp/pull/857

    • libtmux: 0.18.1 -> 0.18.2

      Fix for launching new tmux servers with default socket path/socket name (https://github.com/tmux-python/tmuxp/issues/856)

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.23.0...v1.24.0a0

    Source code(tar.gz)
    Source code(zip)
  • v1.23.0(Dec 28, 2022)

    Recalled, see https://github.com/tmux-python/tmuxp/issues/856

    Improve code standards

    • mypy: Strict annotations by @tony in https://github.com/tmux-python/tmuxp/pull/796

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.22.1...v1.23.0

    Source code(tar.gz)
    Source code(zip)
  • v1.22.1(Dec 28, 2022)

    Maintenance only, no bug fixes or new features

    Bump libtmux 0.18.0 -> 0.18.1 (just code documentation touchups)

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.22.0...v1.22.1

    Source code(tar.gz)
    Source code(zip)
  • v1.22.0(Dec 27, 2022)

    tmuxp shell improvement

    • feat(shell): Detect TMUX for current console, if exists by @tony in https://github.com/tmux-python/tmuxp/pull/854

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.21.0...v1.22.0

    Source code(tar.gz)
    Source code(zip)
  • v1.21.0(Dec 27, 2022)

    Maintenance only, no bug fixes or features

    libtmux 0.17.2 -> 0.18.0: Improved Server __repr__

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.20.3...v1.21.0

    Source code(tar.gz)
    Source code(zip)
  • v1.20.2(Dec 27, 2022)

  • v1.20.1(Dec 27, 2022)

  • v1.20.0(Dec 27, 2022)

    Breaking: Internal refactor

    • Use libtmux w/ dataclasses branch by @tony in https://github.com/tmux-python/tmuxp/pull/850

    Development

    • test(automatic rename): Fix renaming by @tony in https://github.com/tmux-python/tmuxp/pull/853

    The rest

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.19.1...v1.20.0

    Source code(tar.gz)
    Source code(zip)
  • v1.20.0a0(Dec 27, 2022)

    Breaking internal change

    • Use libtmux w/ dataclasses branch by @tony in https://github.com/tmux-python/tmuxp/pull/850

    Minor tweaks

    • test(automatic rename): Fix renaming by @tony in https://github.com/tmux-python/tmuxp/pull/853

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.19.1...v1.20.0a0

    Source code(tar.gz)
    Source code(zip)
  • v1.19.1(Dec 12, 2022)

    • Update libtmux 0.16.0 -> 0.16.1 to remove packaging dependency

      See also: https://github.com/tmux-python/libtmux/issues/460

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.19.0...v1.19.1

    Source code(tar.gz)
    Source code(zip)
  • v1.19.0(Dec 11, 2022)

    What's new

    • feat(builder): allow environments for windows and panes by @zappolowski in https://github.com/tmux-python/tmuxp/pull/845

    Internals

    • Fix distutils.version.Version deprecation warning (python 3.10) by @tony in https://github.com/tmux-python/tmuxp/pull/727
    • Bump libtmux 0.15.9 -> 0.16.0

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.18.2...v1.19.0

    Source code(tar.gz)
    Source code(zip)
  • v1.19.0a1(Dec 11, 2022)

    Internal fix

    • Fix distutils.version.Version deprecation warning (python 3.10) by @tony in https://github.com/tmux-python/tmuxp/pull/727

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.19.0a0...v1.19.0a1

    Source code(tar.gz)
    Source code(zip)
  • v1.19.0a0(Nov 26, 2022)

    What's new

    • feat(builder): allow environments for windows and panes by @zappolowski in https://github.com/tmux-python/tmuxp/pull/845

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.18.2...v1.19.0a0

    Source code(tar.gz)
    Source code(zip)
  • v1.18.2(Nov 5, 2022)

    Development

    • Bump libtmux from 0.15.9 -> 0.15.10 (only test tweaks)
    • Poetry no longer forces in-project: true

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.18.1...v1.18.2

    Source code(tar.gz)
    Source code(zip)
  • v1.18.1(Oct 31, 2022)

    Bug fix

    CLI: tmuxp load: Fix passthru of tmux config_file by @zappolowski in https://github.com/tmux-python/tmuxp/pull/843

    New Contributors

    • @zappolowski made their first contribution in https://github.com/tmux-python/tmuxp/pull/843

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.18.0...v1.18.1

    Source code(tar.gz)
    Source code(zip)
  • v1.18.0(Oct 31, 2022)

    ♻️ Massive refactor / organization by @tony in https://github.com/tmux-python/tmuxp/pull/840

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.17.3...v1.18.0

    Source code(tar.gz)
    Source code(zip)
  • v1.17.3(Oct 30, 2022)

    Packaging update

    • ci,pyenv: Add python 3.11 in https://github.com/tmux-python/tmuxp/pull/842
    • Add python 3.11 to classifiers

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.17.2...v1.17.3

    Source code(tar.gz)
    Source code(zip)
  • v1.17.2(Oct 29, 2022)

    Fix tmuxp load w/ multiple workspaces

    • tests,fix(cli): Fix loading of multiple workspace files by @tony in https://github.com/tmux-python/tmuxp/pull/838

      Fixes https://github.com/tmux-python/tmuxp/pull/837

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.17.1...v1.17.2

    Source code(tar.gz)
    Source code(zip)
  • v1.17.1(Oct 15, 2022)

    shtab completion improvements

    • feat(cli): Add shtab completions, remove unused code by @tony in https://github.com/tmux-python/tmuxp/pull/834

    Full Cangelog: https://github.com/tmux-python/tmuxp/compare/v1.17.0...v1.17.1

    Source code(tar.gz)
    Source code(zip)
  • v1.17.0(Oct 9, 2022)

    Breaking changes

    • Completions have changed (#830)

      Completions now use a different tool: shtab. See the completions page for more information.

      If you were using earlier versions of tmuxp (earlier than 1.17.0), you may need to uninstall the old completions, first.

    • Deprecate click in favor of argparse (#830)

    Packages

    • Remove click dependency

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.16.2...v1.17.0

    Source code(tar.gz)
    Source code(zip)
  • v1.17.0a0(Oct 9, 2022)

    CLI overhaul

    • CLI: click -> argparse by @tony in https://github.com/tmux-python/tmuxp/pull/830

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.16.2...v1.17.0a0

    Source code(tar.gz)
    Source code(zip)
  • v1.16.2(Oct 8, 2022)

    Packaging fix

    • Fix issue where pyyaml may be missing due to 1.16.0's move from kaptan to ConfigReader in https://github.com/tmux-python/tmuxp/pull/828

      Promote PyYaml to a direct dependency by @heindsight in https://github.com/tmux-python/tmuxp/pull/833

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.16.1...v1.16.2

    Source code(tar.gz)
    Source code(zip)
  • v1.16.1(Oct 2, 2022)

    • Bug fix for window_name: '' via libtmux 0.15.7 -> 0.15.8

      See also: https://github.com/tmux-python/libtmux/pull/444

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.16.0...v1.16.1

    Source code(tar.gz)
    Source code(zip)
  • v1.16.0(Oct 1, 2022)

    Maintenance / packaging only: No bug fixes or features

    Internal update

    • Remove kaptan -> ConfigReader by @tony in https://github.com/tmux-python/tmuxp/pull/828

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.15.3...v1.16.0

    Source code(tar.gz)
    Source code(zip)
  • v1.16.0a0(Oct 1, 2022)

    Internal refactor

    • Remove kaptan -> ConfigReader by @tony in https://github.com/tmux-python/tmuxp/pull/828

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.15.3...v1.16.0a0

    Source code(tar.gz)
    Source code(zip)
  • v1.15.3(Oct 1, 2022)

    Bug fix

    • WorkspaceBuilder: Pass start_directory to new_session when building a session

      by @heindsight in https://github.com/tmux-python/tmuxp/pull/829

    New Contributors

    • @heindsight made their first contribution in https://github.com/tmux-python/tmuxp/pull/829

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.15.2...v1.15.3

    Source code(tar.gz)
    Source code(zip)
  • v1.15.2(Sep 24, 2022)

    Maintenance only release, no bugfixes or new features

    Packaging

    • Don't package conftest.py in wheel by @tony in https://github.com/tmux-python/tmuxp/pull/826, for Arch package (https://github.com/tmux-python/tmuxp/pull/825)

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.15.1...v1.15.2

    Source code(tar.gz)
    Source code(zip)
  • v1.15.1(Sep 24, 2022)

    Infrastructure

    • CI speedups (#819)

      • Split out release to separate job so the PyPI Upload docker image isn't pulled on normal runs

      • Clean up CodeQL

    • Bump poetry 1.1.x -> 1.2.x

    • Bump libtmux 0.15.1 -> 0.15.6

      • 0.15.7 (move .coveragerc -> pyproject.toml)

      • 0.15.6 (#823, pytest fixes, packaging improvements)

      • 0.15.3 (#821, pytest plugin improvements, root-level conftest.py)

    • Move .coveragerc -> pyproject.toml (#824)

    Packaging

    • Remove MANIFEST.in

      This is handled by poetry's include in pyproject.toml.

    • Remove .tmuxp-before-script.sh from .tmuxp.yaml

    Automated

    • Document conditions for suppress_history by @jpcirrus in https://github.com/tmux-python/tmuxp/pull/817
    • CI: Speed improvements by @tony in https://github.com/tmux-python/tmuxp/pull/819
    • build(deps): Bump libtmux 0.15.1 -> 0.15.3 by @tony in https://github.com/tmux-python/tmuxp/pull/821
    • build(deps): Bump libtmux to 0.15.6 by @tony in https://github.com/tmux-python/tmuxp/pull/823
    • build: Remove .coveragerc, use pyproject.toml by @tony in https://github.com/tmux-python/tmuxp/pull/824

    New Contributors

    • @jpcirrus made their first contribution in https://github.com/tmux-python/tmuxp/pull/817

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.15.0...v1.15.1

    Source code(tar.gz)
    Source code(zip)
  • v1.15.0(Sep 11, 2022)

    Maintenance release, no features or fixes

    There will be several of these releases as infrastructure and APIs are upgraded to facilitate fixes for layout issues and general contributions.

    Project moved to src/ layout by @tony in #814

    Full Changelog: https://github.com/tmux-python/tmuxp/compare/v1.14.0...v1.15.0

    Source code(tar.gz)
    Source code(zip)
Owner
python utilities for tmux
permissively licensed. for the public good.
python utilities for tmux
ANKIT-OS/TG-SESSION-HACK-BOT: A Special Repository.Telegram Bot Which Can Hack The Victim By Using That Victim Session

?? ᵀᴱᴸᴱᴳᴿᴬᴹ ᴴᴬᶜᴷ ᴮᴼᵀ ?? The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • ??️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs ?? • If

ANKIT KUMAR 2 Dec 24, 2021
FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management

FastAPI Server-sided Session FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management.

DevGuyAhnaf 5 Dec 23, 2022
Official repository for "Exploiting Session Information in BERT-based Session-aware Sequential Recommendation", SIGIR 2022 short.

Session-aware BERT4Rec Official repository for "Exploiting Session Information in BERT-based Session-aware Sequential Recommendation", SIGIR 2022 shor

Jamie J. Seol 22 Dec 13, 2022
Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Carter 19 Aug 24, 2022
A simple file transfer tools, similar to rz / sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar

trzsz A simple file transfer tools, similar to rz/sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar. Why

null 561 Jan 5, 2023
Tmux Based Dropdown Dashboard For Python

sextans It's a private configuration and an ongoing experiment while I use Archlinux. A simple drop down dashboard based on tmux. It includes followin

秋葉 4 Dec 22, 2021
This script will detect changes in your session using Discords built in Gateway.

Detect Session Gateway This script will detect changes in your session using Discords built in Gateway. What does this log? Discord build version Oper

Omega 5 Dec 18, 2021
Installer, package manager, build wrapper and version manager for Piccolo

Piccl Installer, package manager, build wrapper and version manager for Piccolo

null 1 Dec 19, 2021
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

PIPCONF - The PIP configuration manager If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was m

João Paulo Carvalho 11 Nov 30, 2022
ArinjoyTheDev 1 Jul 17, 2022
File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Samuel Ko 1 Feb 5, 2022
Expense-manager - Expense manager with python

Expense_manager TO-DO Source extractor: Credit Card, Wallet Destination extracto

null 1 Feb 13, 2022
First Party data integration solution built for marketing teams to enable audience and conversion onboarding into Google Marketing products (Google Ads, Campaign Manager, Google Analytics).

Megalista Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analy

Google 76 Dec 29, 2022
SMAM2 is a package manager built specifically for SourceMod.

SourceMod Addon Manager 2 (SMAM2) SMAM2 is a package manager built specifically for SourceMod. This was heavily inspired by Phil25's SMAM. I thought t

John Mascagni 6 Sep 16, 2022
An extensive password manager built using Python, multiple implementations. Something to meet everyone's taste.

An awesome open-sourced password manager! Explore the docs » View Demo · Report Bug · Request Feature ?? Python Password Manager ?? An extensive passw

Sam R 7 Sep 28, 2021
This is a repository to learn and get more computer vision skills, make robotics projects integrating the computer vision as a perception tool and create a lot of awesome advanced controllers for the robots of the future.

This is a repository to learn and get more computer vision skills, make robotics projects integrating the computer vision as a perception tool and create a lot of awesome advanced controllers for the robots of the future.

Elkin Javier Guerra Galeano 17 Nov 3, 2022
Face Mask Detection System built with OpenCV, TensorFlow using Computer Vision concepts

Face mask detection Face Mask Detection System built with OpenCV, TensorFlow using Computer Vision concepts in order to detect face masks in static im

Vaibhav Shukla 1 Oct 27, 2021
Flask user session management.

Flask-Login Flask-Login provides user session management for Flask. It handles the common tasks of logging in, logging out, and remembering your users

Max Countryman 3.2k Dec 28, 2022
Big-Papa Integrates Javascript and python for remote cookie stealing which then can be used for session hijacking

Big-Papa is a remote cookie stealer which can then be used for session hijacking and Bypassing 2 Factor Authentication

null 77 Jan 3, 2023
Flask user session management.

Flask-Login Flask-Login provides user session management for Flask. It handles the common tasks of logging in, logging out, and remembering your users

Max Countryman 2.7k Feb 17, 2021