Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate completions, update man pages. #5877

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/hyprctl.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ INFO COMMANDS

Lists all workspaces with their properties.

**workspacerules**

Lists all workspace rules.

**clients**

Lists all windows with their properties.
Expand Down Expand Up @@ -104,6 +108,10 @@ OPTIONS

Outputs information in JSON.

**-i, --instance**

Select instances (id or index in hyprctl instances).

BUGS
====

Expand Down
40 changes: 20 additions & 20 deletions hyprctl/hyprctl.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ _hyprctl_cmd_2 () {
hyprctl monitors | grep Monitor | awk '{ print $2 }'
}

_hyprctl_cmd_1 () {
_hyprctl_cmd_0 () {
hyprpm list | grep "Plugin" | awk '{print $4}'
}

_hyprctl_cmd_0 () {
hyprctl clients | grep class | awk '{print $2}'
_hyprctl_cmd_1 () {
hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}'
}

_hyprctl_cmd_3 () {
hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}'
hyprctl clients | grep class | awk '{print $2}'
}

_hyprctl () {
Expand All @@ -23,25 +23,25 @@ _hyprctl () {
local words cword
_get_comp_words_by_ref -n "$COMP_WORDBREAKS" words cword

local -a literals=("cyclenext" "globalshortcuts" "cursorpos" "bordersize" "renameworkspace" "animationstyle" "focuswindow" "0" "auto" "swapnext" "forceallowsinput" "moveactive" "activebordercolor" "alphafullscreen" "wayland" "layers" "minsize" "monitors" "1" "kill" "settiled" "3" "focusmonitor" "swapwindow" "moveoutofgroup" "notify" "movecursor" "setcursor" "seterror" "movecurrentworkspacetomonitor" "4" "nomaxsize" "forcenoanims" "setprop" "-i" "togglefloating" "workspacerules" "movetoworkspace" "disable" "setignoregrouplock" "workspaces" "movegroupwindow" "closewindow" "0" "--instance" "binds" "movewindow" "splitratio" "alpha" "denywindowfromgroup" "workspace" "configerrors" "togglegroup" "getoption" "forceopaque" "keepaspectratio" "killactive" "pass" "decorations" "devices" "focuscurrentorlast" "submap" "global" "alphafullscreenoverride" "forcerendererreload" "movewindowpixel" "headless" "version" "dpms" "resizeactive" "moveintogroup" "5" "alphaoverride" "setfloating" "rollinglog" "::=" "rounding" "layouts" "moveworkspacetomonitor" "exec" "alphainactiveoverride" "alterzorder" "fakefullscreen" "nofocus" "keyword" "forcenoborder" "forcenodim" "pin" "output" "forcenoblur" "togglespecialworkspace" "fullscreen" "toggleopaque" "focusworkspaceoncurrentmonitor" "next" "changegroupactive" "-j" "instances" "execr" "exit" "clients" "all" "--batch" "dismissnotify" "inactivebordercolor" "switchxkblayout" "movetoworkspacesilent" "movewindoworgroup" "-r" "movefocus" "focusurgentorlast" "remove" "activeworkspace" "dispatch" "create" "centerwindow" "2" "hyprpaper" "-1" "reload" "alphainactive" "systeminfo" "plugin" "dimaround" "activewindow" "swapactiveworkspaces" "splash" "maxsize" "lockactivegroup" "windowdancecompat" "forceopaqueoverriden" "lockgroups" "movecursortocorner" "x11" "prev" "1" "resizewindowpixel" "forcenoshadow")
local -a literals=("resizeactive" "changegroupactive" "-r" "moveintogroup" "forceallowsinput" "4" "::=" "systeminfo" "all" "layouts" "animationstyle" "setprop" "switchxkblayout" "create" "denywindowfromgroup" "headless" "activebordercolor" "exec" "setcursor" "wayland" "focusurgentorlast" "workspacerules" "movecurrentworkspacetomonitor" "movetoworkspacesilent" "hyprpaper" "alpha" "inactivebordercolor" "movegroupwindow" "movecursortocorner" "movewindowpixel" "prev" "movewindow" "clients" "dimaround" "setignoregrouplock" "splash" "execr" "monitors" "0" "forcenoborder" "1" "nomaxsize" "splitratio" "moveactive" "pass" "swapnext" "devices" "layers" "rounding" "lockactivegroup" "5" "moveworkspacetomonitor" "-i" "forcenodim" "pin" "0" "1" "forceopaque" "forcenoshadow" "setfloating" "minsize" "alphaoverride" "workspaces" "cyclenext" "alterzorder" "togglegroup" "lockgroups" "bordersize" "dpms" "focuscurrentorlast" "-1" "--batch" "notify" "remove" "instances" "moveoutofgroup" "killactive" "2" "movetoworkspace" "movecursor" "configerrors" "closewindow" "swapwindow" "auto" "forcerendererreload" "centerwindow" "focuswindow" "seterror" "nofocus" "alphafullscreen" "binds" "version" "togglespecialworkspace" "fullscreen" "windowdancecompat" "globalshortcuts" "keyword" "toggleopaque" "3" "--instance" "togglefloating" "renameworkspace" "alphafullscreenoverride" "activeworkspace" "x11" "kill" "forceopaqueoverriden" "output" "global" "dispatch" "reload" "forcenoblur" "-j" "disable" "activewindow" "keepaspectratio" "dismissnotify" "focusmonitor" "movefocus" "plugin" "exit" "workspace" "getoption" "alphainactiveoverride" "alphainactive" "decorations" "settiled" "resizewindowpixel" "fakefullscreen" "rollinglog" "swapactiveworkspaces" "submap" "next" "movewindoworgroup" "cursorpos" "forcenoanims" "focusworkspaceoncurrentmonitor" "maxsize")

declare -A literal_transitions
literal_transitions[0]="([103]=1 [74]=2 [33]=3 [1]=2 [2]=2 [77]=2 [105]=4 [36]=2 [108]=5 [40]=2 [45]=2 [112]=2 [84]=6 [113]=8 [51]=2 [53]=2 [88]=9 [117]=2 [119]=2 [121]=2 [15]=2 [58]=10 [59]=2 [17]=11 [122]=12 [19]=2 [124]=2 [126]=2 [25]=13 [67]=2 [96]=5 [97]=2 [27]=2 [28]=14 [100]=2 [102]=5)"
literal_transitions[3]="([72]=18 [13]=2 [32]=18 [54]=18 [55]=18 [89]=18 [104]=2 [120]=2 [76]=1 [16]=2 [123]=18 [3]=1 [5]=2 [63]=18 [127]=2 [129]=18 [80]=18 [130]=18 [83]=18 [31]=18 [48]=2 [12]=2 [85]=18 [10]=18 [86]=18 [137]=18)"
literal_transitions[7]="([103]=1 [74]=2 [33]=3 [1]=2 [2]=2 [77]=2 [105]=4 [36]=2 [40]=2 [45]=2 [112]=2 [84]=6 [113]=8 [51]=2 [53]=2 [88]=9 [117]=2 [119]=2 [121]=2 [15]=2 [58]=10 [59]=2 [17]=11 [122]=12 [19]=2 [124]=2 [126]=2 [25]=13 [67]=2 [97]=2 [27]=2 [28]=14 [100]=2)"
literal_transitions[8]="([128]=2 [131]=2 [0]=2 [73]=2 [35]=2 [106]=2 [37]=2 [107]=2 [4]=2 [78]=2 [39]=2 [79]=2 [110]=2 [6]=2 [41]=2 [42]=2 [81]=2 [82]=2 [46]=2 [47]=2 [9]=2 [109]=2 [50]=2 [52]=2 [11]=2 [115]=2 [87]=2 [49]=2 [56]=2 [90]=2 [57]=2 [91]=2 [92]=2 [60]=2 [61]=2 [125]=2 [93]=2 [62]=2 [20]=2 [95]=2 [22]=2 [23]=2 [64]=2 [65]=2 [24]=2 [132]=2 [26]=2 [68]=2 [98]=2 [69]=2 [29]=2 [136]=2 [70]=2 [99]=2)"
literal_transitions[9]="([114]=15 [111]=16)"
literal_transitions[11]="([101]=2)"
literal_transitions[13]="([21]=1 [116]=1 [30]=1 [135]=1 [118]=1 [43]=1 [71]=1)"
literal_transitions[14]="([38]=2)"
literal_transitions[15]="([8]=2 [66]=2 [14]=2 [133]=2)"
literal_transitions[17]="([75]=19)"
literal_transitions[18]="([18]=2 [7]=2)"
literal_transitions[19]="([34]=5 [44]=5)"
literal_transitions[20]="([134]=2 [94]=2)"
literal_transitions[0]="([74]=2 [2]=17 [47]=2 [46]=2 [114]=2 [7]=2 [80]=2 [9]=2 [11]=3 [116]=4 [12]=5 [87]=6 [91]=2 [119]=7 [90]=2 [21]=2 [18]=2 [122]=2 [125]=8 [24]=2 [95]=2 [96]=9 [129]=2 [62]=2 [103]=2 [32]=2 [71]=17 [35]=2 [134]=2 [105]=2 [37]=10 [107]=11 [72]=13 [109]=12 [110]=2 [112]=17)"
literal_transitions[1]="([47]=2 [46]=2 [114]=2 [7]=2 [80]=2 [9]=2 [11]=3 [116]=4 [12]=5 [87]=6 [91]=2 [119]=7 [90]=2 [21]=2 [18]=2 [122]=2 [125]=8 [24]=2 [95]=2 [96]=9 [129]=2 [62]=2 [103]=2 [32]=2 [35]=2 [105]=2 [37]=10 [107]=11 [110]=2 [109]=12 [72]=13 [134]=2 [74]=2)"
literal_transitions[3]="([124]=2 [57]=14 [58]=14 [41]=14 [94]=14 [26]=2 [25]=2 [48]=4 [4]=14 [60]=2 [61]=14 [115]=14 [102]=14 [10]=2 [67]=4 [89]=2 [33]=14 [135]=14 [88]=14 [53]=14 [106]=14 [39]=14 [16]=2 [123]=14 [137]=2 [111]=14)"
literal_transitions[6]="([113]=2)"
literal_transitions[10]="([8]=2)"
literal_transitions[11]="([13]=19 [73]=18)"
literal_transitions[12]="([0]=2 [75]=2 [1]=2 [76]=2 [42]=2 [43]=2 [3]=2 [44]=2 [45]=2 [78]=2 [79]=2 [49]=2 [81]=2 [51]=2 [82]=2 [84]=2 [85]=2 [117]=2 [86]=2 [118]=2 [14]=2 [120]=2 [54]=2 [121]=2 [17]=2 [92]=2 [20]=2 [93]=2 [22]=2 [126]=2 [23]=2 [59]=2 [127]=2 [27]=2 [28]=2 [29]=2 [97]=2 [128]=2 [130]=2 [63]=2 [31]=2 [64]=2 [65]=2 [66]=2 [100]=2 [68]=2 [34]=2 [69]=2 [36]=2 [101]=2 [131]=2 [108]=2 [133]=2 [136]=2)"
literal_transitions[13]="([77]=4 [5]=4 [98]=4 [55]=4 [70]=4 [50]=4 [56]=4)"
literal_transitions[14]="([38]=2 [40]=2)"
literal_transitions[15]="([6]=16)"
literal_transitions[16]="([52]=17 [99]=17)"
literal_transitions[19]="([83]=2 [15]=2 [104]=2 [19]=2)"
literal_transitions[20]="([30]=2 [132]=2)"

declare -A match_anything_transitions
match_anything_transitions=([1]=2 [0]=7 [6]=2 [20]=2 [10]=2 [2]=17 [7]=7 [12]=2 [14]=17 [16]=2 [4]=20 [11]=17)
match_anything_transitions=([6]=15 [7]=2 [0]=1 [5]=20 [4]=2 [20]=2 [2]=15 [18]=2 [8]=2 [9]=2 [10]=15 [1]=1)
declare -A subword_transitions

local state=0
Expand Down Expand Up @@ -108,7 +108,7 @@ _hyprctl () {
done
fi
declare -A commands
commands=([16]=2 [4]=3 [12]=1 [10]=0)
commands=([7]=0 [8]=3 [18]=2 [5]=1)
if [[ -v "commands[$state]" ]]; then
local command_id=${commands[$state]}
local completions=()
Expand Down
Loading
Loading