From f3be607863839c96a8472cb3ac3cda9a86c062a7 Mon Sep 17 00:00:00 2001 From: Jacob Lundqvist Date: Mon, 29 Dec 2025 18:46:25 +0100 Subject: [PATCH] linting --- power-zoom.tmux | 3 +-- scripts/power_zoom.sh | 8 ++++---- scripts/utils.sh | 42 +++++++++++++++++++++--------------------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/power-zoom.tmux b/power-zoom.tmux index 1942146..a2096cf 100755 --- a/power-zoom.tmux +++ b/power-zoom.tmux @@ -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 diff --git a/scripts/power_zoom.sh b/scripts/power_zoom.sh index a1ca247..a134376 100755 --- a/scripts/power_zoom.sh +++ b/scripts/power_zoom.sh @@ -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')" diff --git a/scripts/utils.sh b/scripts/utils.sh index 1c3ec59..9b45962 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -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