Skip to content

Commit

Permalink
Renamed h -> v and v -> h.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmezza committed Dec 8, 2020
1 parent c69ecf1 commit 80a4df4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ TODOs
===

- Add support for in-the-middle selection of pane: `sp v20 h50 0 h50` to have a bottom row halved at 20% and a top 80% row halved too
- maybe rename actual v to h cause I don't think it makes sense as it is now
- ~~maybe rename actual v to h cause I don't think it makes sense as it is now~~
8 changes: 7 additions & 1 deletion sp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ EOF

for sp in ${@:1:${#}-1}
do
eval "tmux split-window -${sp:0:1}p ${sp:1:3}"
local DIRECTION=${sp:0:1}
if [ $DIRECTION = "h" ]; then
DIRECTION="v"
else
DIRECTION="h"
fi
eval "tmux split-window -${DIRECTION}p ${sp:1:3}"
done
eval "tmux select-pane -t$PANESELECT"
}
Expand Down

0 comments on commit 80a4df4

Please sign in to comment.