#compdef hyprnome

autoload -U is-at-least

_hyprnome() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" \
'-p[Go to the previous workspace instead of the next]' \
'--previous[Go to the previous workspace instead of the next]' \
'-m[Move the active window to the dispatched workspace]' \
'--move[Move the active window to the dispatched workspace]' \
'-n[Don'\''t create empty workspaces in the given direction]' \
'--no-empty[Don'\''t create empty workspaces in the given direction]' \
'--no-empty-before[Don'\''t create empty workspaces to the left]' \
'-N[Don'\''t create empty workspaces to the right]' \
'--no-empty-after[Don'\''t create empty workspaces to the right]' \
'-k[Don'\''t auto-close special workspaces when switching workspaces]' \
'--keep-special[Don'\''t auto-close special workspaces when switching workspaces]' \
'-c[Cycle between workspaces instead of creating new ones]' \
'--cycle[Cycle between workspaces instead of creating new ones]' \
'-v[Print debugging information]' \
'--verbose[Print debugging information]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
}

(( $+functions[_hyprnome_commands] )) ||
_hyprnome_commands() {
    local commands; commands=()
    _describe -t commands 'hyprnome commands' commands "$@"
}

if [ "$funcstack[1]" = "_hyprnome" ]; then
    _hyprnome "$@"
else
    compdef _hyprnome hyprnome
fi
