mirror of
https://github.com/jaclu/tmux-power-zoom.git
synced 2026-09-10 07:06:18 -04:00
linting
This commit is contained in:
parent
3078520f3d
commit
f3be607863
|
|
@ -61,12 +61,11 @@ eval "$TMUX_BIN $cmd_kb" || {
|
|||
}
|
||||
log_it "using trigger: $trigger_key"
|
||||
|
||||
|
||||
#
|
||||
# If @power_zoom_mouse_action is defined, also bind a mouse action to this
|
||||
#
|
||||
mouse_action="$(get_tmux_option "@power_zoom_mouse_action")"
|
||||
[[ -z "$mouse_action" ]] && exit 0 # no mouse action defined, setup is done
|
||||
[[ -z "$mouse_action" ]] && exit 0 # no mouse action defined, setup is done
|
||||
|
||||
#
|
||||
# Simplistic check if tmux version is >= 3
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ check_pz_status() {
|
|||
|
||||
case $1 in
|
||||
|
||||
"$is_zoomed" | "$get_placeholder" | "$get_zoomed") ;;
|
||||
"$is_zoomed" | "$get_placeholder" | "$get_zoomed") ;;
|
||||
|
||||
*)
|
||||
error_msg "ERROR: check_pz_status - invalid param: [$1]"
|
||||
;;
|
||||
*)
|
||||
error_msg "ERROR: check_pz_status - invalid param: [$1]"
|
||||
;;
|
||||
esac
|
||||
|
||||
this_id="$($TMUX_BIN display -p '#D')"
|
||||
|
|
|
|||
|
|
@ -113,29 +113,29 @@ normalize_bool_param() {
|
|||
nbp_param="$(lowercase_it "$nbp_param")"
|
||||
|
||||
case "$nbp_param" in
|
||||
#
|
||||
# Handle the unfortunate tradition in the tmux community to use
|
||||
# 1 to indicate selected / active.
|
||||
# This means that as far as these booleans go 1 is 0 and 0 is 1, how Orwellian...
|
||||
#
|
||||
1 | yes | true)
|
||||
# Be a nice guy and accept some common positive notations
|
||||
return 0
|
||||
;;
|
||||
#
|
||||
# Handle the unfortunate tradition in the tmux community to use
|
||||
# 1 to indicate selected / active.
|
||||
# This means that as far as these booleans go 1 is 0 and 0 is 1, how Orwellian...
|
||||
#
|
||||
1 | yes | true)
|
||||
# Be a nice guy and accept some common positive notations
|
||||
return 0
|
||||
;;
|
||||
|
||||
0 | no | false)
|
||||
# Be a nice guy and accept some common false notations
|
||||
return 1
|
||||
;;
|
||||
0 | no | false)
|
||||
# Be a nice guy and accept some common false notations
|
||||
return 1
|
||||
;;
|
||||
|
||||
*)
|
||||
if [[ -n "$nbp_variable_name" ]]; then
|
||||
prefix="$nbp_variable_name=$nbp_param"
|
||||
else
|
||||
prefix="$nbp_param"
|
||||
fi
|
||||
error_msg "$prefix - should be yes/true or no/false"
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$nbp_variable_name" ]]; then
|
||||
prefix="$nbp_variable_name=$nbp_param"
|
||||
else
|
||||
prefix="$nbp_param"
|
||||
fi
|
||||
error_msg "$prefix - should be yes/true or no/false"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue