Skip to content

Tmux plugin for Gitpod, with .gitpod.yml tasks integration. Provides theme, resource meters, indicators, keybindings and menus.

License

Notifications You must be signed in to change notification settings

gitpod-samples/gitpod.tmux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitpod.tmux

Tmux plugin for Gitpod, with .gitpod.yml tasks integration. Provides theme, resource meters, indicators, keybindings and menus.

Can be used locally as well for the ui:theme module, other modules will be disabled outside of Gitpod.

Installation

You do not need to install it if you are using dotsh. But you can always install it in your own way in case you don't want to use dotsh.

Quickstart

If you want to try it out as is:

Custom setup

If you already have a dotfiles repository that you use on Gitpod, you can copy the contents from install.sh and append (while excluding the first shebang line) to your own installation script.

(ADVANCED) With Tmux Plugin Manager, if you're using TPM

Add plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'axonasif/gitpod.tmux'

Example install.sh for Gitpod dotfiles:

#!/usr/bin/env bash

# Install latest static tmux
sudo curl -L https://github.com/axonasif/build-static-tmux/releases/latest/download/tmux.linux-amd64.stripped -o /usr/bin/tmux
sudo chmod +x /usr/bin/tmux

# Auto start tmux on SSH or xtermjs
cat >> "$HOME/.bashrc" <<'EOF'
if test ! -v TMUX && (test -v SSH_CONNECTION || test "$PPID" == "$(pgrep -f '/ide/xterm/bin/node /ide/xterm/index.cjs' | head -n1)"); then {
  if ! tmux has-session 2>/dev/null; then {
    tmux new-session -n "editor" -ds "gitpod"
  } fi
  exec tmux attach
} fi
EOF

# Install TPM and non-interactively install the plugins
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
"$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh"

Modules

The following modules are available:

  • indicator:dotfiles_progress
  • meter:cpu
  • meter:disk
  • meter:memory
  • misc:keybindings
  • misc:gitpod_tasks
  • misc:ports_notify
  • misc:validate_gitpodyml
  • menu:general
  • ui:theme

By default, all are enabled unless you explicitly specify which ones you want.

For example, if you only want the CPU meter and theme, you can put the following line in your .tmux.conf:

set -g @gitpod-modules "meter:cpu ui:theme"

As you can see, the modules can be specified this way, separated by space.

menu:general

To open up the functions menu, press prefix + g. (e.g. ctrl+b g)

misc:keybindings

This modules basically sets Alt(or Option on Mac) + num keybinds for switching tmux windows easily. You can disable it if you like.

misc:gitpod_tasks

For auto creating tmux windows that attach to .gitpod.yml task terminals.

misc:ports_notify

Display message in tmux when a new port is opened.

misc:validate_gitpodyml

Prompt for running gp validate upon .gitpod.yml changes.

Development and contributing

Hack in Gitpod!

About

Tmux plugin for Gitpod, with .gitpod.yml tasks integration. Provides theme, resource meters, indicators, keybindings and menus.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages