Skip to content

Commit

Permalink
props: Allow setting per-window fullscreen opacity (#5470)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoSeDiK committed Apr 7, 2024
1 parent df1a3a9 commit 43b96f0
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 274 deletions.
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_0 () {
_hyprctl_cmd_1 () {
hyprpm list | grep "Plugin" | awk '{print $4}'
}

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

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

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

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" "version" "binds" "togglespecialworkspace" "fullscreen" "windowdancecompat" "globalshortcuts" "keyword" "toggleopaque" "3" "--instance" "togglefloating" "renameworkspace" "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")
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")

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

declare -A match_anything_transitions
match_anything_transitions=([15]=2 [6]=17 [7]=2 [0]=1 [5]=15 [4]=2 [2]=17 [20]=2 [8]=2 [9]=2 [10]=17 [1]=1)
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)
declare -A subword_transitions

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

0 comments on commit 43b96f0

Please sign in to comment.