Skip to content

Instantly share code, notes, and snippets.

@ltfschoen
Created August 28, 2023 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltfschoen/31fb96fc29f275bcc3ced45c043d3b98 to your computer and use it in GitHub Desktop.
Save ltfschoen/31fb96fc29f275bcc3ced45c043d3b98 to your computer and use it in GitHub Desktop.
wip - tmux notes
docker exec -w /multix/squid --user=root -it multix-ui-dev /bin/sh
apk add --update tmux

# new Tmux session and window
# references:
# * https://gist.github.com/michaellihs/b6d46fa460fa5e429ea7ee5ff8794b96
# * https://dev.to/iggredible/useful-tmux-configuration-examples-k3g

# commands
vim $HOME/.tmux.conf
ln -s /multix/.tmux.conf $HOME/.tmux.conf
tmux source-file $HOME/.tmux.conf

# contents for .tmux.conf
# change default prefix from CTRL+B to CTRL+SPACE
unbind C-Space
set -g prefix C-Space
bind C-Space send-prefix
# number window indexes starting from 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g mouse on
set-option -g history-limit 5000
# preserve path when create new windows
bind c new-window -c "#{pane_current_path}"
# Prefix + __
# jump to window number by index (i.e. `\1`)
bind \` switch-client -t'{marked}'
# split window vertical or horizontal
bind-key "|" split-window -h -c "#{pane_current_path}"
bind-key "\\" split-window -fh -c "#{pane_current_path}"
bind-key "-" split-window -v -c "#{pane_current_path}"
bind-key "_" split-window -fv -c "#{pane_current_path}"
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
# toggle b/w current and previous window
bind Space last-window
# break a window out with `Prefix + !`


tmux new -s multix -n indexer
tmux list-sessions
tmux attach -t multix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment