{"id":18489732,"url":"https://github.com/abicky/swap-pane","last_synced_at":"2025-04-08T21:30:46.384Z","repository":{"id":16691664,"uuid":"19448138","full_name":"abicky/swap-pane","owner":"abicky","description":"Swap tmux panes easily","archived":false,"fork":false,"pushed_at":"2017-03-22T17:24:35.000Z","size":1516,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T18:11:16.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abicky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-05T07:46:14.000Z","updated_at":"2018-04-20T17:17:56.000Z","dependencies_parsed_at":"2022-09-16T14:31:31.901Z","dependency_job_id":null,"html_url":"https://github.com/abicky/swap-pane","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abicky%2Fswap-pane","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abicky%2Fswap-pane/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abicky%2Fswap-pane/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abicky%2Fswap-pane/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abicky","download_url":"https://codeload.github.com/abicky/swap-pane/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247931047,"owners_count":21020156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T12:57:41.344Z","updated_at":"2025-04-08T21:30:44.841Z","avatar_url":"https://github.com/abicky.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swap tmux panes easily\n\n![](/img/demo.gif)\n\n## Installation\n\n### 1. Clone this repository and put swap-pane in your PATH\n\n```\n% git clone https://github.com/abicky/swap-pane.git\n% cp swap-pane/swap-pane /path/to/your/bin/\n```\n\n### 2. Install peco\n\nswap-pane depends on [peco](https://github.com/peco/peco), so you must install it.\n\n### 3. Add the following lines in your .zshrc and .tmux.conf\n\n#### .zshrc\n\n```\nautoload -U add-zsh-hook\n\nif [ \"$TMUX\" ]; then\n    function _set-pane-name() {\n        local max_cmd_length=20\n        local cmd=\"$1\"\n        if [ $#cmd -gt $max_cmd_length ]; then\n            cmd=\"${cmd:0:$max_cmd_length}...\"\n        fi\n        printf \"\\033]2;${PWD/$HOME/~}: $cmd\\033\\\\\"\n    }\n\n    add-zsh-hook preexec _set-pane-name\n    add-zsh-hook precmd _set-pane-name\nfi\n```\n\n#### .tmux.conf\n\n```\nbind-key b new-window -nswap-pane 'swap-pane -t'\nbind-key B run-shell 'swap-pane -n'\n```\n\n\n## Usage\n\nExecute `swap-pane` command or type `\u003ctmux prefix\u003e b` to swap the current pane.\n\n```\n% swap-pane\n```\n\n`\u003ctmux prefix\u003e b` opens a temporary window to select an existing pane, so you can swap the current pane even if its process is not finished yet.\n\nYou can also execute `swap-pane -n` or type `\u003ctmux prefix\u003e B` to swap the current pane with a new pane.\n\n```\n% swap-pane -n\n```\n\n\n## Author\n\nTakeshi Arabiki (abicky)\n\n\n## Copyright and License\n\nCopyright (c) 2014-2017 Takeshi Arabiki licensed under the [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabicky%2Fswap-pane","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabicky%2Fswap-pane","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabicky%2Fswap-pane/lists"}