Last active
January 22, 2017 08:58
-
-
Save chenchun/9894d16b4e082614bbbe to your computer and use it in GitHub Desktop.
linux tmux session remember script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bind Ctrl-a as command prefix | |
set -g prefix C-a | |
unbind C-b | |
bind-key -r Space next-layout | |
bind ^z run "tmux-zoom" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
tmux attach -t chen || tmux new -s chen | |
tmux ls | |
tmux kill-session -t chen | |
:source-file ~/.tmux.conf | |
# Maximizing a pane in tmux, set ^z bind in .tmux.conf first | |
# bind ^z run "tmux-zoom" | |
^a -z | |
# resize panel | |
^a : resize-pane -D (Resizes the current pane down) | |
^a : resize-pane -U (Resizes the current pane upward) | |
^a : resize-pane -L (Resizes the current pane left) | |
^a : resize-pane -R (Resizes the current pane right) | |
^a : resize-pane -D 20 (Resizes the current pane down by 20 cells) | |
^a : resize-pane -U 20 (Resizes the current pane upward by 20 cells) | |
^a : resize-pane -L 20 (Resizes the current pane left by 20 cells) | |
^a : resize-pane -R 20 (Resizes the current pane right by 20 cells) | |
^a : resize-pane -t 2 20 (Resizes the pane with the id of 2 down by 20 cells) | |
^a : resize-pane -t -L 20 (Resizes the pane with the id of 2 left by 20 cells) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment