changeset 627:84791ac85abd

Update tmux 2.9+ compatible syntax
author nanaya <me@nanaya.pro>
date Sun, 30 Jun 2019 20:25:30 +0900
parents ffc095d36df2
children 7bcc81f6b210
files rc/bashrc rc/tmux-2.9.conf
diffstat 2 files changed, 27 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rc/bashrc	Sun Jun 30 20:24:46 2019 +0900
+++ b/rc/bashrc	Sun Jun 30 20:25:30 2019 +0900
@@ -287,13 +287,17 @@
 
 if command -v tmux > /dev/null 2>&1; then
   case "${_os}" in
+  "OpenBSD "*" "6.[5-9]" "*|"OpenBSD "*" "[7-9].[0-9]" "*|"OpenBSD "*" "[1-9][0-9][0-9]*.[0-9]" "*)
+    _tmux_conf_ver=2.9
+  ;;
   OpenBSD)
-    # FIXME: OpenBSD version check
+    # probably not accurate enough but I don't want to dig through all the previous versions.
     _tmux_conf_ver=2.2
   ;;
   *)
     case "$(tmux -V 2> /dev/null)" in
-    "tmux 2."[2-9]|"tmux "[3-9]"."[0-9]|"tmux "[1-9][0-9][0.9]*"."[0-9]) _tmux_conf_ver=2.2;;
+    "tmux 2."[9][a-z]*|"tmux "[3-9]"."[0-9]|"tmux "[1-9][0-9][0.9]*"."[0-9]) _tmux_conf_ver=2.9;;
+    "tmux 2."[2-8]) _tmux_conf_ver=2.2;;
     "tmux 1.9"|"tmux 2."[0-1]) _tmux_conf_ver=1.9;;
     "tmux 1."[4-8]) _tmux_conf_ver=1.4;;
     *) _tmux_conf_ver=1.3;;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rc/tmux-2.9.conf	Sun Jun 30 20:25:30 2019 +0900
@@ -0,0 +1,21 @@
+set -g repeat-time 0
+set -g status-bg cyan
+set -g status-fg black
+
+set -g status-left '#[bg=white,fg=black] #S #[default] '
+
+set -g status-right '#[bg=white,fg=black] #H #[bg=black,fg=white] %b-%d %H:%M '
+
+set -g pane-active-border "fg=cyan"
+
+set -g set-titles on
+set -g set-titles-string '[#S] #I:#W #T'
+
+set -g escape-time 0
+set -g history-limit 10000
+
+setw -g window-status-current-style "bg=black fg=white"
+
+bind-key c new-window -c "#{pane_current_path}"
+bind-key '"' split-window -c "#{pane_current_path}"
+bind-key % split-window -h -c "#{pane_current_path}"