Skip to content

phil/tmux-devcontainers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmux-devcontainers

A Tmux plugin for working with devcontainers featuring:

  • Status bar placeholders to show the status of the devcontainers for the current workspace.
  • Key binding to create a new login shell in the devcontainer (via devcontainer exec).
  • A menu to interact with the devcontainers in the current workspace.

Status bar integration

Status information

tmux-devcontainers provides a status bar placeholder to show the status of the devcontainers from your docker-compose file:

set -g status-right '#{devcontainers_workspace} #{devcontainers_status}'
  • #{devcontainers_workspace}: shows the name of the devcontainer workspace.
  • #{devcontainers_status}: shows the status of each container in the workspace.

Menu commands

Status information

Commands to manage devcontainers. Commands run in new windows and try to be unintrusive by automatically closing on success.

Key bindings

tmux-devcontainers provides a key bindings to interact with the devcontainers:

  • prefix + E: creates a new tmux pane with a login shell in the devcontainer.
  • prefix + (Ctrl + e): shows a menu to interact with the devcontainers in the current workspace.

The Exec command will default to running /bin/bash in the devcontainer. This can be overridden per project by adding the following to your devcontainer.json:

{
    "customizations": {
        "tmux": {
            "execCommand": "/bin/sh" // or "rails console", etc.
        }
    },
}

Key bindings can be customized by setting the following options in your ~/.tmux.conf file:

set-option -g @devcontainers_exec_key 'T' # default: 'E'
set-option -g @devcontainers_menu_key 'M' # default: 'Ctrl + e'

## Installation

Pre-requisites

Installation Using Tmux Plugin Manager (TPM)

Add the following line to your ~/.tmux.conf file:

set -g @plugin 'phil/tmux-devcontainers'

About

tmux-devcontainers is designed to be as flexible as possible, allowing you to interact with devcontainers in your workspace directly from Tmux. It provides a simple way to manage and monitor the status of your devcontainers without leaving your terminal. Commands and status updates are scoped to the current Tmux pane, so you can easily switch between different devcontainer workspaces within Tmux sessions.

Contributing

Check out how to contribute to the CLI in CONTRIBUTING.md.

License

This project is under an MIT license.

About

A Tmux plugin for working with dev containers

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages