.dotfiles/home/.config/tmux/tmux-set-resize-mode.sh
Martin Larsson d094fce66d Add tmux config and replace zellij with tmux in zshrc.
Zhrc also has some light refactoring, and has added a zsh local file
which gets sourced if it exists, useful for adding local environment
variables
2024-06-29 14:01:03 +02:00

13 lines
340 B
Bash
Executable file

#!/bin/zsh
desired_state=$1
current_state=$(tmux show-environment -g @resize_mode 2>/dev/null | cut -d '=' -f 2)
[ "$current_state" = "$desired_state" ] && exit 0
tmux set -g @tmux_resize_mode $desired_state
if [ "$desired_state" = "1" ]; then
tmux display-message "Resize mode ON"
else
tmux display-message "Resize mode OFF"
fi