#compdef pypr

# PARTIALLY GENERATED by `shtab`


_shtab_pypr_commands() {
    local _commands=(
        "help:Show this help message and exit."
        "version:Show the version."
        "dumpjson:Dump the current state of the window manager in JSON format."
        "edit:Edit the configuration file."
        "reload:Reload the configuration file."
        "exit:Exit the window manager."
        "attach:A command to attach a client to a workspace. [scratchpads]"
        "show:Show a scratchpad. [scratchpads]"
        "toggle:Toggle a scratchpad. [scratchpads]"
        "hide:Hide a scratchpad. [scratchpads]"
        "attract_lost:Bring lost windows to the current workspace. [lost_windows]"
        "change_workspace:Change the active workspace. [workspaces_follow_focus]"
        "expose:Show all windows in the current workspace. [expose]"
        "fetch_client_menu:Fetch a client menu. [fetch_client_menu]"
        "unfetch_client:Unfetch a client. [fetch_client_menu]"
        "bar:restart MenuBar on the first available monitor. [menubar]"
        "layout_center:Change the active window. [layout_center]"
        "menu:Show a menu. [shortcuts_menu]"
        "relayout:Relayout the current workspace. [monitors]"
        "shift_monitors:Swaps monitors\' workspaces in the given direction. [shift_monitors]"
        "toggle_dpms:Toggle DPMS. [toggle_dpms]"
        "toggle_special:Toggle a special workspace. [toggle_special]"
        "wall:Skip or clear the current background image. [wallpapers]"
        "zoom:Zoom to the given factor or toggle zoom level. [magnify]"
    )
    _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)'"
)

_shtab_pypr_attach_options=(
)

_shtab_pypr_attract_lost_options=(
)

_shtab_pypr_change_workspace_options=(
    ":direction to switch workspaces:(-1 +1)"
)

_shtab_pypr_dumpjson_options=(
)

_shtab_pypr_edit_options=(
)

_shtab_pypr_exit_options=(
)

_shtab_pypr_expose_options=(
)

_shtab_pypr_fetch_client_menu_options=(
)

_shtab_pypr_bar_options=(
    ":action:(restart)"
)

_shtab_pypr_help_options=(
)

_shtab_pypr_hide_options=(
    ":scratchpad name:"
)

_shtab_pypr_layout_center_options=(
    ":action:(toggle next prev)"
)

_shtab_pypr_menu_options=(
    ":submenu to show:"
)

_shtab_pypr_relayout_options=(
)

_shtab_pypr_reload_options=(
)

_shtab_pypr_shift_monitors_options=(
    ":swaps monitors\' workspaces in the given direction:(-1 +1)"
)

_shtab_pypr_show_options=(
    ":scratchpad name:"
)

_shtab_pypr_toggle_options=(
    ":scratchpad name:"
)

_shtab_pypr_toggle_dpms_options=(
)

_shtab_pypr_toggle_special_options=(
    ":special workspace name:"
)

_shtab_pypr_unfetch_client_options=(
)

_shtab_pypr_version_options=(
)

_shtab_pypr_wall_options=(
    ":wallpaper action:(next clear)"
)

_shtab_pypr_zoom_options=(
    ":zoom factor (use +,++,- or -- to update):"
)


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

    if ((${_shtab_pypr_options[(I)${(q)one_or_more}*]} + ${_shtab_pypr_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
        _shtab_pypr_options+=(': :_shtab_pypr_commands' '*::: :->pypr')
    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 ;;
                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 ;;
                bar) _arguments -C -s $_shtab_pypr_bar_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

