diff --git a/layouts/window-wide-left b/layouts/window-wide-left index ebf5d70..d5e6f16 100755 --- a/layouts/window-wide-left +++ b/layouts/window-wide-left @@ -1,6 +1,11 @@ -#!/usr/bin/env -S tmux source-file +#!/usr/bin/env sh -split-window -h -l 43% -c '#{pane_current_path}' -select-pane -t 1 +cols=`tmux display -p "#{pane_width}"` -# vim: ft=tmux +if [[ $cols -gt 300 ]]; then + tmux split-window -h -l 37% -c '#{pane_current_path}' + tmux select-pane -t 1 +else + tmux split-window -h -l 43% -c '#{pane_current_path}' + tmux select-pane -t 1 +fi diff --git a/layouts/window-wide-right b/layouts/window-wide-right index 28e378b..6e50790 100755 --- a/layouts/window-wide-right +++ b/layouts/window-wide-right @@ -1,6 +1,11 @@ -#!/usr/bin/env -S tmux source-file +#!/usr/bin/env sh -split-window -h -l 57% -c '#{pane_current_path}' -select-pane -t 1 +cols=`tmux display -p "#{pane_width}"` -# vim: ft=tmux +if [[ $cols -gt 300 ]]; then + tmux split-window -h -l 63% -c '#{pane_current_path}' + tmux select-pane -t 1 +else + tmux split-window -h -l 57% -c '#{pane_current_path}' + tmux select-pane -t 1 +fi