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.
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
.
If you want to try it out as is:
- Go to https://gitpod.io/user/preferences and scroll down.
- Set https://github.com/gitpod-samples/gitpod.tmux as Dotfiles - Repository URL and click on
Save
.
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"
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.
To open up the functions menu, press prefix + g. (e.g. ctrl+b g
)
This modules basically sets Alt(or Option on Mac) + num keybinds for switching tmux windows easily. You can disable it if you like.
For auto creating tmux windows that attach to .gitpod.yml
task terminals.
Display message in tmux when a new port is opened.
Prompt for running gp validate
upon .gitpod.yml
changes.