diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-08-06 16:02:32 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-08-06 16:02:32 -0500 |
| commit | af97a24be201f8fffe8ea73a1f1aab1e234fa1ce (patch) | |
| tree | cbeb392eba832d89ab48732dfffb518bc904fa5b /find-file/split.sh | |
| parent | da59e4b84427f1add813a73472bee2d5b32c210d (diff) | |
find-file
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 + |
