Skip to content

Instantly share code, notes, and snippets.

@vochicong
Last active July 8, 2022 23:47
Show Gist options
  • Save vochicong/d8e78c88ff137bbd403babe7b2660672 to your computer and use it in GitHub Desktop.
Save vochicong/d8e78c88ff137bbd403babe7b2660672 to your computer and use it in GitHub Desktop.
code-shell, tmux settings for VSCode's terminals
set -g mouse on
set -g status on
set-window-option -g mode-keys vi
set-option -g default-command "/usr/bin/bash"
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind-key -n WheelDownPane select-pane -t= \; send-keys -M
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind r source-file ~/.tmux.conf \; display-message "Reload Config!!"
#!/bin/sh
# /opt/bin/code-shell
set -ex
SESSION="vscode`pwd | md5sum | sed 's/ .*//'`"
tmux attach -d -t $SESSION || tmux new -s $SESSION
{
"terminal.integrated.profiles.osx": {
"code-shell": {
"path": "/opt/bin/code-shell"
}
},
"terminal.integrated.defaultProfile.osx": "code-shell",
"terminal.integrated.profiles.linux": {
"code-shell": {
"path": "/opt/bin/code-shell"
}
},
"terminal.integrated.defaultProfile.linux": "code-shell",
}
@vochicong
Copy link
Author

Note:

  • Use md5sum on Linux and md5 on Mac
  • Use sed to strip trailing spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment