mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8987dd4492 | |||
| 9049818b25 | |||
| 47ef3bd857 | |||
| a9ca566c28 | |||
| 87e31a03c9 | |||
| 7f3ec1cd5b | |||
|
|
e41b15c515 | ||
|
|
690a4465b0 | ||
|
|
9bcfbd3428 | ||
|
|
3c37e18987 |
@@ -105,7 +105,7 @@ __In fish:__
|
||||
And add the following to your `~/.config/fish/config.fish` or equivalent:
|
||||
|
||||
```bash
|
||||
eval (tmuxifier init -)
|
||||
eval (tmuxifier init - fish)
|
||||
```
|
||||
|
||||
### Custom Tmux Arguments
|
||||
|
||||
@@ -11,7 +11,10 @@ end
|
||||
# If `tmuxifier` is available, and `$TMUXIFIER_NO_COMPLETE` is not set, then
|
||||
# load Tmuxifier shell completion.
|
||||
if test -n (which tmuxifier); and test -z $TMUXIFIER_NO_COMPLETE
|
||||
source "$TMUXIFIER/completion/tmuxifier.fish"
|
||||
# fish shell 2.0.0 does not have the source alias
|
||||
if [ (fish --version 2>| awk -F'version ' '{print $2}') = '2.0.0' ];
|
||||
. "$TMUXIFIER/completion/tmuxifier.fish"
|
||||
else
|
||||
source "$TMUXIFIER/completion/tmuxifier.fish"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -105,12 +105,42 @@ select_pane() {
|
||||
tmuxifier-tmux select-pane -t "$session:$window.$1"
|
||||
}
|
||||
|
||||
# Balance windows vertically with the "even-vertical" layout.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: (optional) Window ID or name to operate on.
|
||||
#
|
||||
balance_windows_vertical() {
|
||||
tmuxifier-tmux select-layout even-vertical
|
||||
tmuxifier-tmux select-layout -t "$session:${1:-$window}" even-vertical
|
||||
}
|
||||
|
||||
# Balance windows horizontally with the "even-horizontal" layout.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: (optional) Window ID or name to operate on.
|
||||
#
|
||||
balance_windows_horizontal() {
|
||||
tmuxifier-tmux select-layout even-horizontal
|
||||
tmuxifier-tmux select-layout -t "$session:${1:-$window}" even-horizontal
|
||||
}
|
||||
|
||||
# Turn on synchronize-panes in a window.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: (optional) Window ID or name to operate on.
|
||||
#
|
||||
synchronize_on() {
|
||||
tmuxifier-tmux set-window-option -t "$session:${1:-$window}" \
|
||||
synchronize-panes on
|
||||
}
|
||||
|
||||
# Turn off synchronize-panes in a window.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: (optional) Window ID or name to operate on.
|
||||
#
|
||||
synchronize_off() {
|
||||
tmuxifier-tmux set-window-option -t "$session:${1:-$window}" \
|
||||
synchronize-panes off
|
||||
}
|
||||
|
||||
# Send/paste keys to the currently active pane/window.
|
||||
@@ -253,7 +283,7 @@ initialize_session() {
|
||||
tmuxifier-tmux start-server
|
||||
|
||||
# Check if the named session already exists.
|
||||
if tmuxifier-tmux has-session -t "$session:" 2>/dev/null; then
|
||||
if tmuxifier-tmux list-sessions | grep -q "^$session:"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -76,7 +76,12 @@ case "$shell" in
|
||||
;;
|
||||
fish )
|
||||
echo "set -gx TMUXIFIER \"$TMUXIFIER\";"
|
||||
echo "source \"\$TMUXIFIER/init.fish\";"
|
||||
# fish shell 2.0.0 does not have the source alias
|
||||
if [[ $(fish --version 2>&1 | awk -F'version ' '{print $2}') = '2.0.0' ]]; then
|
||||
echo ". \"\$TMUXIFIER/init.fish\";"
|
||||
else
|
||||
echo "source \"\$TMUXIFIER/init.fish\";"
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
echo "export TMUXIFIER=\"$TMUXIFIER\";"
|
||||
|
||||
@@ -15,7 +15,7 @@ List all session layouts."
|
||||
exit
|
||||
fi
|
||||
|
||||
list=$(find -L "$TMUXIFIER_LAYOUT_PATH" -name "*.session.sh")
|
||||
list=$(find -L "$TMUXIFIER_LAYOUT_PATH" -name "*.session.sh" | sort)
|
||||
for file in $list; do
|
||||
file=${file/$TMUXIFIER_LAYOUT_PATH\//}
|
||||
echo "${file/.session.sh/}"
|
||||
|
||||
@@ -15,7 +15,7 @@ List all window layouts."
|
||||
exit
|
||||
fi
|
||||
|
||||
list=$(find -L "$TMUXIFIER_LAYOUT_PATH" -name "*.window.sh")
|
||||
list=$(find -L "$TMUXIFIER_LAYOUT_PATH" -name "*.window.sh" | sort)
|
||||
for file in $list; do
|
||||
file=${file/$TMUXIFIER_LAYOUT_PATH\//}
|
||||
echo "${file/.window.sh/}"
|
||||
|
||||
@@ -13,4 +13,4 @@ Outputs Tmuxifier version."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "0.12.3"
|
||||
echo "0.13.0"
|
||||
|
||||
Reference in New Issue
Block a user