summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-11-17 12:35:21 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-11-17 12:35:21 +0100
commiteb270afea4bd3fddbd4dce9c25eb81b1b9c09a1c (patch)
tree209e7ed3b116e6790e2a3bcfb19bf5e09b03a14a
parentb8fcd27d3286a29dfadef5842fa8d757180cbc54 (diff)
downloaddotfiles-eb270afea4bd3fddbd4dce9c25eb81b1b9c09a1c.tar.gz
dotfiles-eb270afea4bd3fddbd4dce9c25eb81b1b9c09a1c.tar.xz
dotfiles-eb270afea4bd3fddbd4dce9c25eb81b1b9c09a1c.zip
tmate: Add initial config
-rw-r--r--tmate/.tmate.conf69
1 files changed, 69 insertions, 0 deletions
diff --git a/tmate/.tmate.conf b/tmate/.tmate.conf
new file mode 100644
index 0000000..a7b1c11
--- /dev/null
+++ b/tmate/.tmate.conf
@@ -0,0 +1,69 @@
+# use ctrl+a as modifier
+set -g prefix C-a
+bind-key C-a send-prefix
+unbind-key C-b
+set-option -g prefix C-a
+
+#set -g prefix C-a
+#unbind C-b
+#bind C-a send-prefix
+
+# Disable esc-wait off, so vi works
+set-option -sg escape-time 0
+
+# ctrl+a ctrl+a for last window
+bind-key C-a last-window
+
+# use ctrl+a ctrl+c for new window too
+bind C-c new-window
+
+# use base to go to next window
+unbind space
+bind space next-window
+
+# split windows like vim
+#unbind s
+#bind s split-window -v
+bind S split-window -v -l 40
+bind v split-window -h
+bind V split-window -h -l 120
+
+# navigate panes with hjkl
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+# bind vi key-mapping
+set -g status-keys vi
+# vi-style controls for copy mode
+set-window-option -g mode-keys vi
+
+# vi copy mode keys
+#bind-key -t vi-copy 'v' begin-selection
+#bind-key -t vi-copy 'y' copy-selection
+bind -Tcopy-mode-vi v send -X begin-selection
+bind -Tcopy-mode-vi y send -X copy-selection
+
+# bind R to get a root shell
+bind R new-window -n 'root' 'sudo -i'
+
+# set term to truecolor
+set-option -ga terminal-overrides ',*:Tc'
+set -g default-terminal "screen-256color"
+
+# get bigger history
+set-option -g history-limit 100000
+
+# highlight window when it has new activity
+setw -g monitor-activity on
+set -g visual-activity off
+
+if-shell 'test -r ~/.tmux-statusline.conf' 'source ~/.tmux-statusline.conf'
+
+if-shell 'test ! -r ~/.ssh/tmate_rsa' 'run -b "/usr/bin/ssh-keygen -b 4096 -t rsa -N \"\" -f ~/.ssh/tmate_rsa"'
+if-shell 'test "${TMUX#*tmate}" != "$TMUX"' 'set -g tmate-identity tmate_rsa'
+
+#set -g tmate-server-host tm.samba.org
+#set -g tmate-server-port 1234
+#set -g tmate-server-ecdsa-fingerprint "SHA256:ZENCW2qGz8YyCTTghxBd4M1+viMA9OeyYd6thJngyPI"