diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/command-order.sh | 6 | ||||
-rw-r--r-- | regress/conf/21867280ff7e99631046f9cc669b80d2.conf | 8 | ||||
-rw-r--r-- | regress/conf/99749670b62bcb99a9b2e3d59708e357.conf | 93 | ||||
-rw-r--r-- | regress/xenl-terminal.sh | 29 |
4 files changed, 132 insertions, 4 deletions
diff --git a/regress/command-order.sh b/regress/command-order.sh index fb4e0324..04046f0d 100644 --- a/regress/command-order.sh +++ b/regress/command-order.sh @@ -1,7 +1,5 @@ #!/bin/sh -# new-session without clients should be the right size - PATH=/bin:/usr/bin TERM=screen @@ -19,6 +17,7 @@ EOF $TMUX -f$TMP start </dev/null || exit 1 sleep 1 $TMUX lsw -aF '#{session_name},#{window_name}'|sort >$TMP || exit 1 +$TMUX kill-server 2>/dev/null cat <<EOF|cmp -s $TMP - || exit 1 bar,bar0 bar,bar1 @@ -27,7 +26,6 @@ foo,foo0 foo,foo1 foo,foo2 EOF -$TMUX kill-server 2>/dev/null cat <<EOF >$TMP new -sfoo -nfoo0 @@ -40,6 +38,7 @@ EOF $TMUX -f$TMP start </dev/null || exit 1 sleep 1 $TMUX lsw -aF '#{session_name},#{window_name}'|sort >$TMP || exit 1 +$TMUX kill-server 2>/dev/null cat <<EOF|cmp -s $TMP - || exit 1 bar,bar0 bar,bar1 @@ -48,6 +47,5 @@ foo,foo0 foo,foo1 foo,foo2 EOF -$TMUX kill-server 2>/dev/null exit 0 diff --git a/regress/conf/21867280ff7e99631046f9cc669b80d2.conf b/regress/conf/21867280ff7e99631046f9cc669b80d2.conf new file mode 100644 index 00000000..43b142b4 --- /dev/null +++ b/regress/conf/21867280ff7e99631046f9cc669b80d2.conf @@ -0,0 +1,8 @@ +%if #{l:1} +set -g status-style fg=cyan,bg='#001040' +%elif #{l:1} +set -g status-style fg=white,bg='#400040' +%else +set -g status-style fg=white,bg='#800000' +%endif +bind ^X last-window diff --git a/regress/conf/99749670b62bcb99a9b2e3d59708e357.conf b/regress/conf/99749670b62bcb99a9b2e3d59708e357.conf new file mode 100644 index 00000000..dd1700b0 --- /dev/null +++ b/regress/conf/99749670b62bcb99a9b2e3d59708e357.conf @@ -0,0 +1,93 @@ +# ----------------------------------------------------------------------------- +# This config is targeted for tmux 2.1+ and should be placed in $HOME. +# +# Read the "Plugin Manager" section (bottom) before trying to use this config! +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# Global options +# ----------------------------------------------------------------------------- + +# Set a new prefix / leader key. +set -g prefix ` +bind ` send-prefix + +# Allow opening multiple terminals to view the same session at different sizes. +setw -g aggressive-resize on + +# Remove delay when switching between Vim modes. +set -s escape-time 0 + +# Allow Vim's FocusGained to work when your terminal gains focus. +# Requires Vim plugin: https://github.com/tmux-plugins/vim-tmux-focus-events +set -g focus-events on + +# Add a bit more scroll history in the buffer. +set -g history-limit 50000 + +# Enable color support inside of tmux. +set -g default-terminal "screen-256color" + +# Ensure window titles get renamed automatically. +setw -g automatic-rename + +# Start windows and panes index at 1, not 0. +set -g base-index 1 +setw -g pane-base-index 1 + +# Enable full mouse support. +set -g mouse on + +# Status bar optimized for Gruvbox. +set -g status-fg colour244 +set -g status-bg default +set -g status-left '' +set -g status-right-length 0 +#set -g status-right-length 20 +#set -g status-right '%a %Y-%m-%d %H:%M' + +set -g pane-border-fg default +set -g pane-border-bg default +set -g pane-active-border-fg colour250 +set -g pane-active-border-bg default + +set-window-option -g window-status-current-attr bold +set-window-option -g window-status-current-fg colour223 + +# ----------------------------------------------------------------------------- +# Key bindings +# ----------------------------------------------------------------------------- + +# Unbind default keys +unbind C-b +unbind '"' +unbind % + +# Reload the tmux config. +bind-key r source-file ~/.tmux.conf + +# Split panes. +bind-key h split-window -v +bind-key v split-window -h + +# Move around panes with ALT + arrow keys. +bind-key -n M-Up select-pane -U +bind-key -n M-Left select-pane -L +bind-key -n M-Down select-pane -D +bind-key -n M-Right select-pane -R + +# ----------------------------------------------------------------------------- +# Plugin Manager - https://github.com/tmux-plugins/tpm +# In order to use the plugins below you need to install TPM and the plugins. +# Step 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +# Step 2) Reload tmux if it's already started with `r +# Step 3) Launch tmux and hit `I (capital i) to fetch any plugins +# ----------------------------------------------------------------------------- + +# List of plugins. +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-yank' + +# Initialize TPM (keep this line at the very bottom of your tmux.conf). +run -b '~/.tmux/plugins/tpm/tpm' diff --git a/regress/xenl-terminal.sh b/regress/xenl-terminal.sh new file mode 100644 index 00000000..07469ceb --- /dev/null +++ b/regress/xenl-terminal.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +PATH=/bin:/usr/bin +TERM=screen + +[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux) +TMUX="$TEST_TMUX -Ltest" +$TMUX kill-server 2>/dev/null +TMUX2="$TEST_TMUX -Ltest2" +$TMUX2 kill-server 2>/dev/null + +TMP=$(mktemp) +trap "rm -f $TMP" 0 1 15 + +$TMUX2 -f/dev/null new -d || exit 1 +$TMUX2 set -as terminal-overrides ',*:xenl@' || exit 1 +$TMUX2 set -g status-right 'RRR' || exit 1 +$TMUX2 set -g status-left 'LLL' || exit 1 +$TMUX2 set -g window-status-current-format 'WWW' || exit 1 +$TMUX -f/dev/null new -x20 -y2 -d "$TMUX2 attach" || exit 1 +sleep 1 +$TMUX capturep -p|tail -1 >$TMP || exit 1 +$TMUX kill-server 2>/dev/null +$TMUX2 kill-server 2>/dev/null +cat <<EOF|cmp -s $TMP - || exit 1 +LLLWWW RR +EOF + +exit 0 |