Compare commits
2 Commits
6aeadd4129
...
150c13ab31
Author | SHA1 | Date | |
---|---|---|---|
150c13ab31 | |||
905460fee4 |
4
layouts/session-local
Normal file → Executable file
4
layouts/session-local
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env -S tmux source-file
|
||||||
|
|
||||||
rename-window home
|
rename-window home
|
||||||
|
|
||||||
new-window -c ~/.config/nvim
|
new-window -c ~/.config/nvim
|
||||||
@ -15,4 +17,4 @@ move-window -s local:config/local -t 9
|
|||||||
|
|
||||||
select-window -t local:home
|
select-window -t local:home
|
||||||
|
|
||||||
# vim: filetype=tmux
|
# vim: ft=tmux
|
||||||
|
4
layouts/session-main
Normal file → Executable file
4
layouts/session-main
Normal file → Executable file
@ -1,4 +1,6 @@
|
|||||||
|
#!/usr/bin/env -S tmux source-file
|
||||||
|
|
||||||
rename-session main
|
rename-session main
|
||||||
rename-window home
|
rename-window home
|
||||||
|
|
||||||
# vim: filetype=tmux
|
# vim: ft=tmux
|
||||||
|
2
layouts/session-visor
Normal file → Executable file
2
layouts/session-visor
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env -S tmux source-file
|
||||||
|
|
||||||
rename-window home
|
rename-window home
|
||||||
split-window -h htop
|
split-window -h htop
|
||||||
select-pane -t visor:home.1
|
select-pane -t visor:home.1
|
||||||
|
28
layouts/window-auto
Executable file
28
layouts/window-auto
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
cols=`tput cols`
|
||||||
|
lines=`tput lines`
|
||||||
|
width=$(( $cols / 2 )).0
|
||||||
|
height=$lines.0
|
||||||
|
ratio=$(( ($width / $height) * 100 ))
|
||||||
|
|
||||||
|
# echo "size: ( $width,$height ) ratio: $ratio"
|
||||||
|
|
||||||
|
if [[ $cols -lt 140 ]] && [[ $lines -lt 70 ]]; then
|
||||||
|
# terminal is too small
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $ratio -ge 100 ]]; then
|
||||||
|
# terminal is wide or square
|
||||||
|
if [[ `tput cols` -gt 230 ]]; then
|
||||||
|
# terminal is wide and large
|
||||||
|
`dirname $0`/window-wide-right
|
||||||
|
else
|
||||||
|
# terminal is wide and small
|
||||||
|
tmux split-window -h -l 50%
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# terminal is tall
|
||||||
|
`dirname $0`/window-tall
|
||||||
|
fi
|
5
layouts/window-tall
Normal file → Executable file
5
layouts/window-tall
Normal file → Executable file
@ -1,3 +1,6 @@
|
|||||||
# vim: ft=tmux
|
#!/usr/bin/env -S tmux source-file
|
||||||
|
|
||||||
split-window -v -l 34%
|
split-window -v -l 34%
|
||||||
select-pane -t 1
|
select-pane -t 1
|
||||||
|
|
||||||
|
# vim: ft=tmux
|
||||||
|
5
layouts/window-wide-left
Normal file → Executable file
5
layouts/window-wide-left
Normal file → Executable file
@ -1,3 +1,6 @@
|
|||||||
# vim: ft=tmux
|
#!/usr/bin/env -S tmux source-file
|
||||||
|
|
||||||
split-window -h -l 43%
|
split-window -h -l 43%
|
||||||
select-pane -t 1
|
select-pane -t 1
|
||||||
|
|
||||||
|
# vim: ft=tmux
|
||||||
|
5
layouts/window-wide-right
Normal file → Executable file
5
layouts/window-wide-right
Normal file → Executable file
@ -1,3 +1,6 @@
|
|||||||
# vim: ft=tmux
|
#!/usr/bin/env -S tmux source-file
|
||||||
|
|
||||||
split-window -h -l 57%
|
split-window -h -l 57%
|
||||||
select-pane -t 1
|
select-pane -t 1
|
||||||
|
|
||||||
|
# vim: ft=tmux
|
||||||
|
Loading…
x
Reference in New Issue
Block a user