diff options
Diffstat (limited to 'find-file/split.sh')
| -rwxr-xr-x | find-file/split.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/find-file/split.sh b/find-file/split.sh new file mode 100755 index 0000000..77a6670 --- /dev/null +++ b/find-file/split.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +width=$(tmux display -p "#{pane_width}") +height=$(tmux display -p "#{pane_height}") + +if (( $(echo "$width / $height > 2.5" | bc -l) )); then + tmux split-window -h "$@" +else + tmux split-window -v "$@" +fi + |
