#compdef pypr

# AUTOMATICALLY GENERATED by `shtab`


_shtab_pypr_commands() {
    local _commands=(
        "attach:"
        "attract_lost:"
        "bar:"
        "change_workspace:"
        "dumpjson:"
        "edit:"
        "exit:"
        "expose:"
        "fetch_client_menu:"
        "help:"
        "hide:"
        "layout_center:"
        "menu:"
        "relayout:"
        "reload:"
        "shift_monitors:"
        "show:"
        "toggle:"
        "toggle_dpms:"
        "toggle_special:"
        "unfetch_client:"
        "version:"
        "wall:"
        "zoom:"
    )
    _describe 'pypr commands' _commands
}

_shtab_pypr_options=(
    "--debug[Enable debug mode and log to a file]:debug:_files"
    "--config[Use a different configuration file]:config:_files -g '(*.toml|*.TOML)'"
    "(- : *)--print-completion[print shell completion script]:print_completion:(bash zsh tcsh)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_defaults_added=0

_shtab_pypr_attach_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_attach_defaults_added=0

_shtab_pypr_attract_lost_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_attract_lost_defaults_added=0

_shtab_pypr_bar_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":Starts gBar on the first available monitor:(restart stop toggle)"
    ":Starts gBar on the first available monitor:(restart stop toggle)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_bar_defaults_added=0

_shtab_pypr_change_workspace_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":direction to switch workspaces:(-1 +1)"
    ":direction to switch workspaces:(-1 +1)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_change_workspace_defaults_added=0

_shtab_pypr_dumpjson_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_dumpjson_defaults_added=0

_shtab_pypr_edit_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_edit_defaults_added=0

_shtab_pypr_exit_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_exit_defaults_added=0

_shtab_pypr_expose_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_expose_defaults_added=0

_shtab_pypr_fetch_client_menu_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_fetch_client_menu_defaults_added=0

_shtab_pypr_help_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_help_defaults_added=0

_shtab_pypr_hide_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":scratchpad name:"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_hide_defaults_added=0

_shtab_pypr_layout_center_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":Change the active window:(toggle next prev next2 prev2)"
    ":Change the active window:(toggle next prev next2 prev2)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_layout_center_defaults_added=0

_shtab_pypr_menu_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":submenu to show:"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_menu_defaults_added=0

_shtab_pypr_relayout_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_relayout_defaults_added=0

_shtab_pypr_reload_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_reload_defaults_added=0

_shtab_pypr_shift_monitors_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":Swaps monitors\' workspaces in the given direction:(+1 -1)"
    ":Swaps monitors\' workspaces in the given direction:(+1 -1)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_shift_monitors_defaults_added=0

_shtab_pypr_show_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":scratchpad name:"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_show_defaults_added=0

_shtab_pypr_toggle_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":scratchpad name:"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_toggle_defaults_added=0

_shtab_pypr_toggle_dpms_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_toggle_dpms_defaults_added=0

_shtab_pypr_toggle_special_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":special workspace name:"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_toggle_special_defaults_added=0

_shtab_pypr_unfetch_client_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_unfetch_client_defaults_added=0

_shtab_pypr_version_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_version_defaults_added=0

_shtab_pypr_wall_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":Skip the current background image:(next clear pause color)"
    ":Optional parameter (e.g. color hex):"
    ":Skip the current background image:(next clear pause color)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_wall_defaults_added=0

_shtab_pypr_zoom_options=(
    "(- : *)"{-h,--help}"[show this help message and exit]"
    ":Zoom to the given factor:(+1 -1 ++0.5 --0.5 1)"
    ":Zoom to the given factor:(+1 -1 ++0.5 --0.5 1)"
)

# guard to ensure default positional specs are added only once per session
_shtab_pypr_zoom_defaults_added=0


_shtab_pypr() {
    local context state line curcontext="$curcontext" one_or_more='(*)' remainder='(-)*' default='*::: :->pypr'

    # Add default positional/remainder specs only if none exist, and only once per session
    if (( ! _shtab_pypr_defaults_added )); then
        if (( ${_shtab_pypr_options[(I)${(q)one_or_more}*]} +          ${_shtab_pypr_options[(I)${(q)remainder}*]} +          ${_shtab_pypr_options[(I)${(q)default}]} == 0 )); then
            _shtab_pypr_options+=(': :_shtab_pypr_commands' '*::: :->pypr')
        fi
        _shtab_pypr_defaults_added=1
    fi
    _arguments -C -s $_shtab_pypr_options

    case $state in
        pypr)
            words=($line[1] "${words[@]}")
            (( CURRENT += 1 ))
            curcontext="${curcontext%:*:*}:_shtab_pypr-$line[1]:"
            case $line[1] in
                attach) _arguments -C -s $_shtab_pypr_attach_options ;;
                attract_lost) _arguments -C -s $_shtab_pypr_attract_lost_options ;;
                bar) _arguments -C -s $_shtab_pypr_bar_options ;;
                change_workspace) _arguments -C -s $_shtab_pypr_change_workspace_options ;;
                dumpjson) _arguments -C -s $_shtab_pypr_dumpjson_options ;;
                edit) _arguments -C -s $_shtab_pypr_edit_options ;;
                exit) _arguments -C -s $_shtab_pypr_exit_options ;;
                expose) _arguments -C -s $_shtab_pypr_expose_options ;;
                fetch_client_menu) _arguments -C -s $_shtab_pypr_fetch_client_menu_options ;;
                help) _arguments -C -s $_shtab_pypr_help_options ;;
                hide) _arguments -C -s $_shtab_pypr_hide_options ;;
                layout_center) _arguments -C -s $_shtab_pypr_layout_center_options ;;
                menu) _arguments -C -s $_shtab_pypr_menu_options ;;
                relayout) _arguments -C -s $_shtab_pypr_relayout_options ;;
                reload) _arguments -C -s $_shtab_pypr_reload_options ;;
                shift_monitors) _arguments -C -s $_shtab_pypr_shift_monitors_options ;;
                show) _arguments -C -s $_shtab_pypr_show_options ;;
                toggle) _arguments -C -s $_shtab_pypr_toggle_options ;;
                toggle_dpms) _arguments -C -s $_shtab_pypr_toggle_dpms_options ;;
                toggle_special) _arguments -C -s $_shtab_pypr_toggle_special_options ;;
                unfetch_client) _arguments -C -s $_shtab_pypr_unfetch_client_options ;;
                version) _arguments -C -s $_shtab_pypr_version_options ;;
                wall) _arguments -C -s $_shtab_pypr_wall_options ;;
                zoom) _arguments -C -s $_shtab_pypr_zoom_options ;;
            esac
    esac
}



typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
    # eval/source/. command, register function for later
    compdef _shtab_pypr -N pypr
else
    # autoload from fpath, call function directly
    _shtab_pypr "$@"
fi

