Skip to content

Commit

Permalink
Allow setting per-window fullscreen opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
SoSeDiK committed Apr 7, 2024
1 parent f2a848c commit 4d43ed7
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 269 deletions.
48 changes: 24 additions & 24 deletions hyprctl/hyprctl.bash
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
_hyprctl_cmd_2 () {
_hyprctl_cmd_3 () {
hyprctl monitors | grep Monitor | awk '{ print $2 }'
}

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

_hyprctl_cmd_0 () {
hyprctl clients | grep class | awk '{print $2}'
}

_hyprctl_cmd_3 () {
_hyprctl_cmd_1 () {
hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}'
}

Expand All @@ -23,30 +23,30 @@ _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" "wayland" "layers" "minsize" "monitors" "1" "3" "settiled" "kill" "focusmonitor" "swapwindow" "moveoutofgroup" "notify" "movecursor" "setcursor" "seterror" "4" "movecurrentworkspacetomonitor" "nomaxsize" "forcenoanims" "setprop" "-i" "togglefloating" "workspacerules" "movetoworkspace" "disable" "setignoregrouplock" "workspaces" "0" "closewindow" "movegroupwindow" "binds" "movewindow" "splitratio" "alpha" "denywindowfromgroup" "workspace" "configerrors" "togglegroup" "getoption" "forceopaque" "keepaspectratio" "--instance" "killactive" "pass" "decorations" "devices" "focuscurrentorlast" "submap" "global" "headless" "forcerendererreload" "movewindowpixel" "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=("cyclenext" "globalshortcuts" "cursorpos" "bordersize" "renameworkspace" "animationstyle" "focuswindow" "0" "auto" "swapnext" "forceallowsinput" "moveactive" "activebordercolor" "alphafullscreen" "wayland" "layers" "minsize" "monitors" "1" "3" "settiled" "kill" "focusmonitor" "swapwindow" "moveoutofgroup" "notify" "movecursor" "setcursor" "seterror" "4" "movecurrentworkspacetomonitor" "nomaxsize" "forcenoanims" "setprop" "-i" "togglefloating" "workspacerules" "movetoworkspace" "disable" "setignoregrouplock" "workspaces" "0" "closewindow" "movegroupwindow" "binds" "movewindow" "splitratio" "alpha" "denywindowfromgroup" "workspace" "configerrors" "togglegroup" "getoption" "forceopaque" "keepaspectratio" "--instance" "killactive" "pass" "decorations" "devices" "focuscurrentorlast" "submap" "global" "alphafullscreenoverride" "headless" "forcerendererreload" "movewindowpixel" "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]="([101]=1 [72]=2 [32]=3 [1]=2 [2]=2 [75]=2 [103]=4 [35]=2 [106]=5 [39]=2 [43]=2 [110]=2 [82]=6 [111]=8 [49]=2 [51]=2 [86]=9 [115]=2 [117]=2 [119]=2 [14]=2 [57]=10 [58]=2 [16]=11 [120]=12 [20]=2 [122]=2 [124]=2 [24]=13 [65]=2 [94]=5 [95]=2 [26]=2 [27]=14 [98]=2 [100]=5)"
literal_transitions[3]="([70]=26 [31]=26 [52]=26 [53]=26 [87]=26 [102]=2 [118]=2 [74]=1 [15]=2 [121]=26 [3]=1 [5]=2 [125]=2 [127]=26 [78]=26 [128]=26 [81]=26 [30]=26 [46]=2 [12]=2 [83]=26 [10]=26 [84]=26 [135]=26)"
literal_transitions[7]="([101]=1 [72]=2 [32]=3 [1]=2 [2]=2 [75]=2 [103]=4 [35]=2 [39]=2 [43]=2 [110]=2 [82]=6 [111]=8 [49]=2 [51]=2 [86]=9 [115]=2 [117]=2 [119]=2 [14]=2 [57]=10 [58]=2 [16]=11 [120]=12 [20]=2 [122]=2 [124]=2 [24]=13 [65]=2 [95]=2 [26]=2 [27]=14 [98]=2)"
literal_transitions[8]="([126]=2 [129]=2 [0]=2 [71]=2 [34]=2 [104]=2 [36]=2 [105]=2 [4]=2 [76]=2 [38]=2 [77]=2 [108]=2 [6]=2 [42]=2 [41]=2 [79]=2 [80]=2 [44]=2 [45]=2 [9]=2 [107]=2 [48]=2 [50]=2 [11]=2 [113]=2 [85]=2 [47]=2 [55]=2 [88]=2 [56]=2 [89]=2 [90]=2 [59]=2 [60]=2 [123]=2 [91]=2 [61]=2 [19]=2 [93]=2 [21]=2 [22]=2 [63]=2 [64]=2 [23]=2 [130]=2 [25]=2 [66]=2 [96]=2 [67]=2 [29]=2 [134]=2 [68]=2 [97]=2)"
literal_transitions[9]="([112]=17 [109]=20)"
literal_transitions[10]="([18]=2 [114]=2 [28]=2 [133]=2 [69]=2 [116]=2)"
literal_transitions[11]="([99]=2)"
literal_transitions[14]="([37]=2)"
literal_transitions[15]="([73]=16)"
literal_transitions[17]="([8]=2 [62]=2 [13]=2 [131]=2)"
literal_transitions[18]="([73]=19)"
literal_transitions[22]="([73]=23)"
literal_transitions[23]="([40]=2)"
literal_transitions[24]="([33]=5 [54]=5)"
literal_transitions[25]="([73]=24)"
literal_transitions[26]="([17]=2 [7]=2)"
literal_transitions[27]="([132]=2 [92]=2)"
literal_transitions[29]="([73]=32)"
literal_transitions[0]="([103]=1 [74]=2 [33]=3 [1]=2 [2]=2 [77]=2 [105]=4 [36]=2 [108]=5 [40]=2 [44]=2 [112]=2 [84]=6 [113]=8 [50]=2 [52]=2 [88]=9 [117]=2 [119]=2 [121]=2 [15]=2 [58]=10 [59]=2 [17]=11 [122]=12 [21]=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]=27 [13]=2 [32]=27 [53]=27 [54]=27 [89]=27 [104]=2 [120]=2 [76]=1 [16]=2 [123]=27 [3]=1 [5]=2 [63]=27 [127]=2 [129]=27 [80]=27 [130]=27 [83]=27 [31]=27 [47]=2 [12]=2 [85]=27 [10]=27 [86]=27 [137]=27)"
literal_transitions[7]="([103]=1 [74]=2 [33]=3 [1]=2 [2]=2 [77]=2 [105]=4 [36]=2 [40]=2 [44]=2 [112]=2 [84]=6 [113]=8 [50]=2 [52]=2 [88]=9 [117]=2 [119]=2 [121]=2 [15]=2 [58]=10 [59]=2 [17]=11 [122]=12 [21]=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 [43]=2 [42]=2 [81]=2 [82]=2 [45]=2 [46]=2 [9]=2 [109]=2 [49]=2 [51]=2 [11]=2 [115]=2 [87]=2 [48]=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 [65]=2 [66]=2 [24]=2 [132]=2 [26]=2 [68]=2 [98]=2 [69]=2 [30]=2 [136]=2 [70]=2 [99]=2)"
literal_transitions[9]="([114]=18 [111]=21)"
literal_transitions[10]="([19]=2 [116]=2 [29]=2 [135]=2 [71]=2 [118]=2)"
literal_transitions[11]="([101]=2)"
literal_transitions[14]="([38]=2)"
literal_transitions[15]="([75]=16)"
literal_transitions[17]="([34]=5 [55]=5)"
literal_transitions[18]="([8]=2 [64]=2 [14]=2 [133]=2)"
literal_transitions[19]="([75]=20)"
literal_transitions[24]="([75]=31)"
literal_transitions[26]="([75]=30)"
literal_transitions[27]="([18]=2 [7]=2)"
literal_transitions[28]="([75]=17)"
literal_transitions[29]="([134]=2 [94]=2)"
literal_transitions[31]="([41]=2)"

declare -A match_anything_transitions
match_anything_transitions=([1]=2 [27]=2 [10]=31 [30]=22 [14]=25 [7]=7 [2]=25 [28]=29 [16]=21 [12]=2 [31]=15 [0]=7 [19]=28 [20]=2 [6]=2 [32]=30 [13]=1 [11]=25 [21]=18 [4]=27)
match_anything_transitions=([1]=2 [25]=26 [23]=24 [10]=32 [30]=23 [2]=28 [7]=7 [14]=28 [16]=22 [12]=2 [0]=7 [6]=2 [20]=25 [32]=15 [13]=1 [11]=28 [21]=2 [4]=29 [22]=19 [29]=2)
declare -A subword_transitions

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

0 comments on commit 4d43ed7

Please sign in to comment.