diff --git a/flake.nix b/flake.nix index d2ed006..8282dc3 100755 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,8 @@ nix-homebrew, apple-silicon, ... - } @ inputs: rec { + } @ inputs: let + in rec { formatter = with nixpkgs.legacyPackages; { x86_64-linux = x86_64-linux.alejandra; aarch64-linux = aarch64-linux.alejandra; diff --git a/hosts/callisto/0001-linux-dmabuf-allow-on-split-node-systems.patch b/hosts/callisto/0001-linux-dmabuf-allow-on-split-node-systems.patch index bb98b63..21e5af2 100644 --- a/hosts/callisto/0001-linux-dmabuf-allow-on-split-node-systems.patch +++ b/hosts/callisto/0001-linux-dmabuf-allow-on-split-node-systems.patch @@ -1,7 +1,7 @@ From 279ec1c291021479b050c83a0435ac7076c1aee0 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 18 Aug 2024 19:51:54 +0200 -Subject: [PATCH] linux-dmabuf: allow on split-node systems +Subject: [PATCH 01/20] linux-dmabuf: allow on split-node systems ref #7364 --- diff --git a/hosts/callisto/0002-renderer-pass-custom-modelines-to-aq.patch b/hosts/callisto/0002-renderer-pass-custom-modelines-to-aq.patch new file mode 100644 index 0000000..b501fc9 --- /dev/null +++ b/hosts/callisto/0002-renderer-pass-custom-modelines-to-aq.patch @@ -0,0 +1,38 @@ +From 50348a3ddbb6bc3367300c9bba2ff682e4a356e3 Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Sun, 18 Aug 2024 20:19:13 +0200 +Subject: [PATCH 02/20] renderer: pass custom modelines to aq + +ref #7390 +--- + src/render/Renderer.cpp | 14 +++----------- + 1 file changed, 3 insertions(+), 11 deletions(-) + +diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp +index b363c287..c2ecbbf3 100644 +--- a/src/render/Renderer.cpp ++++ b/src/render/Renderer.cpp +@@ -1994,17 +1994,9 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR + if (pMonitor->output->getBackend()->type() != Aquamarine::eBackendType::AQ_BACKEND_DRM) { + Debug::log(ERR, "Tried to set custom modeline on non-DRM output"); + fail = true; +- } else { +- // FIXME: +- // auto* mode = wlr_drm_connector_add_mode(pMonitor->output, &RULE->drmMode); +- // if (mode) { +- // wlr_output_state_set_mode(pMonitor->state.wlr(), mode); +- // pMonitor->customDrmMode = RULE->drmMode; +- // } else { +- // Debug::log(ERR, "wlr_drm_connector_add_mode failed"); +- // fail = true; +- // } +- } ++ } else ++ pMonitor->output->state->setCustomMode(makeShared( ++ Aquamarine::SOutputMode{.pixelSize = {RULE->drmMode.hdisplay, RULE->drmMode.vdisplay}, .refreshRate = RULE->drmMode.vrefresh, .modeInfo = RULE->drmMode})); + } else + pMonitor->output->state->setCustomMode(makeShared(Aquamarine::SOutputMode{.pixelSize = RULE->resolution, .refreshRate = WLRREFRESHRATE})); + +-- +2.45.2 + diff --git a/hosts/callisto/0003-compositor-update-suspendstate-on-window-move-7396.patch b/hosts/callisto/0003-compositor-update-suspendstate-on-window-move-7396.patch new file mode 100644 index 0000000..0138d99 --- /dev/null +++ b/hosts/callisto/0003-compositor-update-suspendstate-on-window-move-7396.patch @@ -0,0 +1,28 @@ +From 5afc4dc42e2409da62b7bcdf0ead90329e8d7a92 Mon Sep 17 00:00:00 2001 +From: Tom Englund +Date: Sun, 18 Aug 2024 21:02:46 +0200 +Subject: [PATCH 03/20] compositor: update suspendstate on window move (#7396) + +hyprctl dispatch -- movetoworkspacesilent x,"^kitty$" where X is the +current workspace makes kitty stops updating until current workspace is +changed while it is on the screen. update the suspend state after it has +been moved. +--- + src/Compositor.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/Compositor.cpp b/src/Compositor.cpp +index 9d247a56..1437a653 100644 +--- a/src/Compositor.cpp ++++ b/src/Compositor.cpp +@@ -2737,6 +2737,7 @@ void CCompositor::moveWindowToWorkspaceSafe(PHLWINDOW pWindow, PHLWORKSPACE pWor + + g_pCompositor->updateWorkspaceWindows(pWorkspace->m_iID); + g_pCompositor->updateWorkspaceWindows(pWindow->workspaceID()); ++ g_pCompositor->updateSuspendedStates(); + } + + PHLWINDOW CCompositor::getForceFocus() { +-- +2.45.2 + diff --git a/hosts/callisto/0004-screencopy-nuke-unused-stuff.patch b/hosts/callisto/0004-screencopy-nuke-unused-stuff.patch new file mode 100644 index 0000000..48c4f6f --- /dev/null +++ b/hosts/callisto/0004-screencopy-nuke-unused-stuff.patch @@ -0,0 +1,34 @@ +From bf611fbbf3183e6f96529d79189be56189a46e1b Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Sun, 18 Aug 2024 22:40:21 +0200 +Subject: [PATCH 04/20] screencopy: nuke unused stuff + +--- + src/protocols/Screencopy.cpp | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp +index f246f6dd..8a7fd567 100644 +--- a/src/protocols/Screencopy.cpp ++++ b/src/protocols/Screencopy.cpp +@@ -38,17 +38,6 @@ CScreencopyFrame::CScreencopyFrame(SP resource_, int32_t + + g_pHyprRenderer->makeEGLCurrent(); + +- if (g_pHyprOpenGL->m_mMonitorRenderResources.contains(pMonitor)) { +- const auto& RDATA = g_pHyprOpenGL->m_mMonitorRenderResources.at(pMonitor); +- // bind the fb for its format. Suppress gl errors. +-#ifndef GLES2 +- glBindFramebuffer(GL_READ_FRAMEBUFFER, RDATA.offloadFB.m_iFb); +-#else +- glBindFramebuffer(GL_FRAMEBUFFER, RDATA.offloadFB.m_iFb); +-#endif +- } else +- LOGM(ERR, "No RDATA in screencopy???"); +- + shmFormat = g_pHyprOpenGL->getPreferredReadFormat(pMonitor); + if (shmFormat == DRM_FORMAT_INVALID) { + LOGM(ERR, "No format supported by renderer in capture output"); +-- +2.45.2 + diff --git a/hosts/callisto/0005-protocol-fix-logm-template-checks.patch b/hosts/callisto/0005-protocol-fix-logm-template-checks.patch new file mode 100644 index 0000000..5f7ca00 --- /dev/null +++ b/hosts/callisto/0005-protocol-fix-logm-template-checks.patch @@ -0,0 +1,25 @@ +From fa12efdd2aae6851305245f16a801fb571fbe2c1 Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Sun, 18 Aug 2024 22:54:47 +0200 +Subject: [PATCH 05/20] protocol: fix logm template checks + +--- + src/protocols/WaylandProtocol.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/protocols/WaylandProtocol.hpp b/src/protocols/WaylandProtocol.hpp +index 0fa8daab..87c75ed8 100644 +--- a/src/protocols/WaylandProtocol.hpp ++++ b/src/protocols/WaylandProtocol.hpp +@@ -32,7 +32,7 @@ + } else if (level == LOG || level == INFO || level == TRACE) { \ + oss << "[" << EXTRACT_CLASS_NAME() << "] "; \ + } \ +- if constexpr (std::is_same_v) { \ ++ if constexpr (std::tuple_size::value == 1 && std::is_same_v) { \ + oss << __VA_ARGS__; \ + Debug::log(level, oss.str()); \ + } else { \ +-- +2.45.2 + diff --git a/hosts/callisto/0006-screencopy-fix-10b-format-r-b-flip.patch b/hosts/callisto/0006-screencopy-fix-10b-format-r-b-flip.patch new file mode 100644 index 0000000..4e81e66 --- /dev/null +++ b/hosts/callisto/0006-screencopy-fix-10b-format-r-b-flip.patch @@ -0,0 +1,27 @@ +From f4045ab8d032186b7c5409cd9f05eeaa813320ba Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Sun, 18 Aug 2024 22:57:21 +0200 +Subject: [PATCH 06/20] screencopy: fix 10b format r/b flip + +--- + src/protocols/Screencopy.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp +index 8a7fd567..b25d9456 100644 +--- a/src/protocols/Screencopy.cpp ++++ b/src/protocols/Screencopy.cpp +@@ -46,6 +46,10 @@ CScreencopyFrame::CScreencopyFrame(SP resource_, int32_t + return; + } + ++ // TODO: hack, we can't bit flip so we'll format flip heh, GL_BGRA_EXT wont work here ++ if (shmFormat == DRM_FORMAT_XRGB2101010 || shmFormat == DRM_FORMAT_ARGB2101010) ++ shmFormat = DRM_FORMAT_XBGR2101010; ++ + const auto PSHMINFO = FormatUtils::getPixelFormatFromDRM(shmFormat); + if (!PSHMINFO) { + LOGM(ERR, "No pixel format supported by renderer in capture output"); +-- +2.45.2 + diff --git a/hosts/callisto/0007-flake-update-aquamarine.patch b/hosts/callisto/0007-flake-update-aquamarine.patch new file mode 100644 index 0000000..dfd9aaf --- /dev/null +++ b/hosts/callisto/0007-flake-update-aquamarine.patch @@ -0,0 +1,31 @@ +From 11dfb8397becca85cad078dd31bf043d1c40ceac Mon Sep 17 00:00:00 2001 +From: diniamo +Date: Sun, 18 Aug 2024 20:43:04 +0200 +Subject: [PATCH 07/20] flake: update aquamarine + +--- + flake.lock | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/flake.lock b/flake.lock +index c70d31d1..97016819 100644 +--- a/flake.lock ++++ b/flake.lock +@@ -16,11 +16,11 @@ + ] + }, + "locked": { +- "lastModified": 1723920171, +- "narHash": "sha256-dVCMrAe+D/5S91erhwQj2DSzHOVzAanWqoy+vPWB9DY=", ++ "lastModified": 1724006173, ++ "narHash": "sha256-1ROh0buuxiMyc6eIb3CIbJsmYO7PhLqSYs55mOx1XTk=", + "owner": "hyprwm", + "repo": "aquamarine", +- "rev": "71d49670fe246cdaff4860b0effba0ab9f163b72", ++ "rev": "7f8df01d4297b9068a9592400f16044602844f86", + "type": "github" + }, + "original": { +-- +2.45.2 + diff --git a/hosts/callisto/0008-hyprpm-hyprctl-update-shell-completions.patch b/hosts/callisto/0008-hyprpm-hyprctl-update-shell-completions.patch new file mode 100644 index 0000000..320884a --- /dev/null +++ b/hosts/callisto/0008-hyprpm-hyprctl-update-shell-completions.patch @@ -0,0 +1,1254 @@ +From 83d88fa56467a2b749fb2320e1595281107bd326 Mon Sep 17 00:00:00 2001 +From: loseardes77 +Date: Sun, 18 Aug 2024 22:25:23 +0200 +Subject: [PATCH 08/20] hyprpm, hyprctl: update shell completions + +--- + hyprctl/hyprctl.bash | 87 ++++++------ + hyprctl/hyprctl.fish | 309 ++++++++++++++++++++++-------------------- + hyprctl/hyprctl.usage | 20 ++- + hyprctl/hyprctl.zsh | 269 +++++++++++++++++++----------------- + hyprpm/hyprpm.bash | 58 ++++---- + hyprpm/hyprpm.fish | 91 +++++++------ + hyprpm/hyprpm.usage | 4 +- + hyprpm/hyprpm.zsh | 46 ++++--- + 8 files changed, 474 insertions(+), 410 deletions(-) + +diff --git a/hyprctl/hyprctl.bash b/hyprctl/hyprctl.bash +index c69cca21..e26e623e 100644 +--- a/hyprctl/hyprctl.bash ++++ b/hyprctl/hyprctl.bash +@@ -1,17 +1,17 @@ +-_hyprctl_cmd_2 () { ++_hyprctl_cmd_1 () { + hyprctl monitors | awk '/Monitor/{ print $2 }' + } + + _hyprctl_cmd_3 () { +- hyprpm list | awk '/Plugin/{ print $4 }' ++ hyprctl clients | awk '/class/{print $2}' + } + +-_hyprctl_cmd_0 () { +- hyprctl clients | awk '/class/{ print $2 }' ++_hyprctl_cmd_2 () { ++ hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' + } + +-_hyprctl_cmd_1 () { +- hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' ++_hyprctl_cmd_0 () { ++ hyprpm list | awk '/Plugin/{print $4}' + } + + _hyprctl () { +@@ -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" "-q" "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" "--quiet" "pin" "output" "forcenoblur" "togglespecialworkspace" "fullscreen" "toggleopaque" "focusworkspaceoncurrentmonitor" "next" "changegroupactive" "-j" "instances" "execr" "exit" "clients" "all" "--batch" "dismissnotify" "inactivebordercolor" "switchxkblayout" "movetoworkspacesilent" "tagwindow" "movewindoworgroup" "-r" "movefocus" "focusurgentorlast" "remove" "activeworkspace" "dispatch" "create" "centerwindow" "2" "hyprpaper" "-1" "reload" "alphainactive" "systeminfo" "plugin" "dimaround" "activewindow" "swapactiveworkspaces" "splash" "sendshortcut" "maxsize" "lockactivegroup" "windowdancecompat" "forceopaqueoverriden" "lockgroups" "movecursortocorner" "x11" "prev" "1" "resizewindowpixel" "forcenoshadow") +- ++ declare -a literals=(resizeactive 2 changegroupactive -r moveintogroup forceallowsinput 4 ::= systeminfo all layouts setprop animationstyle switchxkblayout create denywindowfromgroup headless activebordercolor exec setcursor wayland focusurgentorlast workspacerules movecurrentworkspacetomonitor movetoworkspacesilent hyprpaper alpha inactivebordercolor movegroupwindow movecursortocorner movewindowpixel prev movewindow globalshortcuts clients dimaround setignoregrouplock splash execr monitors 0 forcenoborder -q animations 1 nomaxsize splitratio moveactive pass swapnext devices layers rounding lockactivegroup 5 moveworkspacetomonitor -f -i --quiet forcenodim pin 0 1 forceopaque forcenoshadow setfloating minsize alphaoverride sendshortcut workspaces cyclenext alterzorder togglegroup lockgroups bordersize dpms focuscurrentorlast -1 --batch notify remove instances 1 3 moveoutofgroup killactive 2 movetoworkspace movecursor configerrors closewindow swapwindow tagwindow forcerendererreload centerwindow auto focuswindow seterror nofocus alphafullscreen binds version -h togglespecialworkspace fullscreen windowdancecompat 0 keyword toggleopaque 3 --instance togglefloating renameworkspace alphafullscreenoverride activeworkspace x11 kill forceopaqueoverriden output global dispatch reload forcenoblur -j event --help disable -1 activewindow keepaspectratio dismissnotify focusmonitor movefocus plugin exit workspace fullscreenstate getoption alphainactiveoverride alphainactive decorations settiled config-only descriptions resizewindowpixel fakefullscreen rollinglog swapactiveworkspaces submap next movewindoworgroup cursorpos forcenoanims focusworkspaceoncurrentmonitor maxsize) + declare -A literal_transitions +- literal_transitions[0]="([105]=1 [75]=2 [33]=3 [35]=4 [1]=2 [2]=2 [78]=2 [107]=5 [37]=2 [111]=4 [41]=2 [46]=2 [115]=2 [85]=6 [116]=8 [52]=2 [88]=4 [54]=2 [90]=9 [120]=2 [122]=2 [124]=2 [15]=2 [59]=10 [60]=2 [17]=11 [125]=12 [19]=2 [127]=2 [129]=2 [25]=13 [68]=2 [98]=4 [99]=2 [27]=2 [28]=14 [102]=2 [104]=4)" +- literal_transitions[3]="([73]=17 [13]=2 [32]=17 [55]=17 [56]=17 [91]=17 [106]=2 [123]=2 [77]=1 [16]=2 [126]=17 [3]=1 [5]=2 [64]=17 [131]=2 [133]=17 [81]=17 [134]=17 [84]=17 [31]=17 [49]=2 [12]=2 [86]=17 [10]=17 [87]=17 [141]=17)" +- literal_transitions[7]="([105]=1 [75]=2 [33]=3 [1]=2 [2]=2 [78]=2 [107]=5 [37]=2 [41]=2 [46]=2 [115]=2 [85]=6 [116]=8 [52]=2 [54]=2 [90]=9 [120]=2 [122]=2 [124]=2 [15]=2 [59]=10 [60]=2 [17]=11 [125]=12 [19]=2 [127]=2 [129]=2 [25]=13 [68]=2 [99]=2 [27]=2 [28]=14 [102]=2)" +- literal_transitions[8]="([101]=2 [130]=2 [132]=2 [0]=2 [74]=2 [36]=2 [108]=2 [109]=2 [38]=2 [110]=2 [4]=2 [79]=2 [40]=2 [80]=2 [113]=2 [6]=2 [42]=2 [43]=2 [82]=2 [83]=2 [47]=2 [48]=2 [9]=2 [50]=2 [51]=2 [53]=2 [11]=2 [112]=2 [89]=2 [118]=2 [57]=2 [92]=2 [58]=2 [93]=2 [94]=2 [61]=2 [62]=2 [128]=2 [95]=2 [63]=2 [20]=2 [97]=2 [22]=2 [23]=2 [65]=2 [66]=2 [135]=2 [136]=2 [24]=2 [26]=2 [69]=2 [100]=2 [70]=2 [140]=2 [29]=2 [71]=2)" +- literal_transitions[9]="([117]=20 [114]=16)" +- literal_transitions[11]="([103]=2)" +- literal_transitions[13]="([21]=1 [119]=1 [30]=1 [139]=1 [121]=1 [44]=1 [72]=1)" +- literal_transitions[14]="([39]=2)" +- literal_transitions[15]="([138]=2 [96]=2)" +- literal_transitions[17]="([18]=2 [7]=2)" +- literal_transitions[18]="([76]=19)" +- literal_transitions[19]="([34]=4 [45]=4)" +- literal_transitions[20]="([8]=2 [67]=2 [14]=2 [137]=2)" +- +- declare -A match_anything_transitions +- match_anything_transitions=([1]=2 [0]=7 [6]=2 [15]=2 [10]=2 [5]=15 [14]=18 [7]=7 [2]=18 [16]=2 [12]=2 [11]=18) ++ literal_transitions[0]="([120]=14 [43]=2 [125]=21 [81]=2 [3]=21 [51]=2 [50]=2 [128]=2 [89]=2 [58]=21 [8]=2 [10]=2 [11]=3 [130]=4 [13]=5 [97]=6 [101]=2 [102]=21 [133]=7 [100]=2 [137]=2 [22]=2 [19]=2 [140]=8 [25]=2 [143]=2 [107]=9 [146]=10 [69]=2 [33]=2 [34]=2 [78]=21 [114]=2 [37]=2 [151]=2 [116]=2 [121]=13 [123]=21 [39]=11 [42]=21 [79]=15 [118]=12)" ++ literal_transitions[1]="([81]=2 [51]=2 [50]=2 [128]=2 [8]=2 [89]=2 [10]=2 [11]=3 [130]=4 [13]=5 [97]=6 [101]=2 [133]=7 [100]=2 [22]=2 [19]=2 [137]=2 [140]=8 [25]=2 [143]=2 [107]=9 [146]=10 [69]=2 [33]=2 [34]=2 [114]=2 [37]=2 [151]=2 [116]=2 [39]=11 [118]=12 [121]=13 [120]=14 [79]=15 [43]=2)" ++ literal_transitions[3]="([139]=2 [63]=16 [64]=16 [45]=16 [105]=16 [27]=2 [26]=2 [52]=4 [5]=16 [66]=2 [67]=16 [129]=16 [113]=16 [12]=2 [74]=4 [99]=2 [35]=16 [152]=16 [98]=16 [59]=16 [117]=16 [41]=16 [17]=2 [138]=16 [154]=2 [122]=16)" ++ literal_transitions[6]="([126]=2)" ++ literal_transitions[10]="([56]=2)" ++ literal_transitions[11]="([9]=2)" ++ literal_transitions[12]="([14]=19 [80]=22)" ++ literal_transitions[13]="([142]=2)" ++ literal_transitions[14]="([0]=2 [84]=2 [2]=2 [85]=2 [4]=2 [87]=2 [88]=2 [90]=2 [91]=2 [92]=2 [93]=2 [94]=2 [96]=2 [15]=2 [18]=2 [103]=2 [21]=2 [104]=2 [23]=2 [24]=2 [28]=2 [29]=2 [30]=2 [108]=2 [111]=2 [32]=2 [112]=2 [36]=2 [38]=2 [119]=2 [124]=2 [46]=2 [47]=2 [48]=2 [49]=2 [53]=2 [55]=2 [131]=2 [132]=2 [134]=2 [135]=2 [60]=2 [136]=20 [141]=2 [65]=2 [144]=2 [145]=2 [68]=2 [147]=2 [70]=2 [71]=2 [72]=2 [73]=2 [148]=2 [75]=2 [76]=2 [150]=2 [153]=2)" ++ literal_transitions[15]="([86]=4 [6]=4 [109]=4 [61]=4 [77]=4 [54]=4 [62]=4)" ++ literal_transitions[16]="([40]=2 [44]=2)" ++ literal_transitions[17]="([7]=23)" ++ literal_transitions[18]="([31]=2 [149]=2)" ++ literal_transitions[19]="([95]=2 [16]=2 [115]=2 [20]=2)" ++ literal_transitions[20]="([106]=2 [82]=2 [127]=2 [1]=2 [83]=2)" ++ literal_transitions[23]="([57]=21 [110]=21)" ++ declare -A match_anything_transitions=([6]=17 [7]=2 [0]=1 [22]=2 [5]=18 [4]=2 [2]=17 [18]=2 [11]=17 [8]=2 [9]=2 [13]=17 [10]=17 [1]=1) + declare -A subword_transitions + + local state=0 +@@ -79,21 +79,9 @@ _hyprctl () { + done + + +- local prefix="${words[$cword]}" +- +- local shortest_suffix="$word" +- for ((i=0; i < ${#COMP_WORDBREAKS}; i++)); do +- local char="${COMP_WORDBREAKS:$i:1}" +- local candidate="${word##*$char}" +- if [[ ${#candidate} -lt ${#shortest_suffix} ]]; then +- shortest_suffix=$candidate +- fi +- done +- local superfluous_prefix="" +- if [[ "$shortest_suffix" != "$word" ]]; then +- local superfluous_prefix=${word%$shortest_suffix} +- fi ++ local -a matches=() + ++ local prefix="${words[$cword]}" + if [[ -v "literal_transitions[$state]" ]]; then + local state_transitions_initializer=${literal_transitions[$state]} + declare -A state_transitions +@@ -102,25 +90,38 @@ _hyprctl () { + for literal_id in "${!state_transitions[@]}"; do + local literal="${literals[$literal_id]}" + if [[ $literal = "${prefix}"* ]]; then +- local completion=${literal#"$superfluous_prefix"} +- COMPREPLY+=("$completion ") ++ matches+=("$literal ") + fi + done + fi + declare -A commands +- commands=([5]=1 [16]=2 [12]=3 [10]=0) ++ commands=([7]=0 [22]=1 [8]=3 [5]=2) + if [[ -v "commands[$state]" ]]; then + local command_id=${commands[$state]} + local completions=() +- mapfile -t completions < <(_hyprctl_cmd_${command_id} "$prefix" | cut -f1) ++ readarray -t completions < <(_hyprctl_cmd_${command_id} "$prefix" | cut -f1) + for item in "${completions[@]}"; do + if [[ $item = "${prefix}"* ]]; then +- COMPREPLY+=("$item") ++ matches+=("$item") + fi + done + fi + + ++ local shortest_suffix="$prefix" ++ for ((i=0; i < ${#COMP_WORDBREAKS}; i++)); do ++ local char="${COMP_WORDBREAKS:$i:1}" ++ local candidate=${prefix##*$char} ++ if [[ ${#candidate} -lt ${#shortest_suffix} ]]; then ++ shortest_suffix=$candidate ++ fi ++ done ++ local superfluous_prefix="" ++ if [[ "$shortest_suffix" != "$prefix" ]]; then ++ local superfluous_prefix=${prefix%$shortest_suffix} ++ fi ++ COMPREPLY=("${matches[@]#$superfluous_prefix}") ++ + return 0 + } + +diff --git a/hyprctl/hyprctl.fish b/hyprctl/hyprctl.fish +index c5c03e49..11309416 100644 +--- a/hyprctl/hyprctl.fish ++++ b/hyprctl/hyprctl.fish +@@ -1,21 +1,21 @@ +-function _hyprctl_3 ++function _hyprctl_2 + set 1 $argv[1] + hyprctl monitors | awk '/Monitor/{ print $2 }' + end + + function _hyprctl_4 + set 1 $argv[1] +- hyprpm list | awk '/Plugin/{ print $4 }' ++ hyprctl clients | awk '/class/{print $2}' + end + +-function _hyprctl_1 ++function _hyprctl_3 + set 1 $argv[1] +- hyprctl clients | awk '/class/{ print $2 }' ++ hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' + end + +-function _hyprctl_2 ++function _hyprctl_1 + set 1 $argv[1] +- hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' ++ hyprpm list | awk '/Plugin/{print $4}' + end + + function _hyprctl +@@ -29,145 +29,160 @@ function _hyprctl + set COMP_CWORD (count $COMP_WORDS) + end + +- set --local 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" "-q" "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" "--quiet" "pin" "output" "forcenoblur" "togglespecialworkspace" "fullscreen" "toggleopaque" "focusworkspaceoncurrentmonitor" "next" "changegroupactive" "-j" "instances" "execr" "exit" "clients" "all" "--batch" "dismissnotify" "inactivebordercolor" "switchxkblayout" "movetoworkspacesilent" "tagwindow" "movewindoworgroup" "-r" "movefocus" "focusurgentorlast" "remove" "activeworkspace" "dispatch" "create" "centerwindow" "2" "hyprpaper" "-1" "reload" "alphainactive" "systeminfo" "plugin" "dimaround" "activewindow" "swapactiveworkspaces" "splash" "sendshortcut" "maxsize" "lockactivegroup" "windowdancecompat" "forceopaqueoverriden" "lockgroups" "movecursortocorner" "x11" "prev" "1" "resizewindowpixel" "forcenoshadow" +- +- set --local descriptions +- set descriptions[1] "Focus the next window on a workspace" +- set descriptions[3] "Get the current cursor pos in global layout coordinates" +- set descriptions[5] "Rename a workspace" +- set descriptions[7] "Focus the first window matching" +- set descriptions[10] "Swap the focused window with the next window" +- set descriptions[12] "Move the active window" +- set descriptions[16] "List the layers" +- set descriptions[18] "List active outputs with their properties" +- set descriptions[20] "Get into a kill mode, where you can kill an app by clicking on it" +- set descriptions[21] "Set the current window's floating state to false" +- set descriptions[22] "ERROR" +- set descriptions[23] "Focus a monitor" +- set descriptions[24] "Swap the active window with another window" +- set descriptions[25] "Move the active window out of a group" +- set descriptions[26] "Send a notification using the built-in Hyprland notification system" +- set descriptions[27] "Move the cursor to a specified position" +- set descriptions[28] "Set the cursor theme and reloads the cursor manager" +- set descriptions[29] "Set the hyprctl error string" +- set descriptions[30] "Move the active workspace to a monitor" +- set descriptions[31] "CONFUSED" +- set descriptions[34] "Set a property of a window" +- set descriptions[35] "Specify the Hyprland instance" +- set descriptions[36] "Disable output" +- set descriptions[37] "Toggle the current window's floating state" +- set descriptions[38] "Get the list of defined workspace rules" +- set descriptions[39] "Move the focused window to a workspace" +- set descriptions[41] "Temporarily enable or disable binds:ignore_group_lock" +- set descriptions[42] "List all workspaces with their properties" +- set descriptions[43] "Swap the active window with the next or previous in a group" +- set descriptions[44] "Close a specified window" +- set descriptions[45] "WARNING" +- set descriptions[46] "Specify the Hyprland instance" +- set descriptions[47] "List all registered binds" +- set descriptions[48] "Move the active window in a direction or to a monitor" +- set descriptions[49] "Change the split ratio" +- set descriptions[51] "Prohibit the active window from becoming or being inserted into group" +- set descriptions[52] "Change the workspace" +- set descriptions[53] "List all current config parsing errors" +- set descriptions[54] "Toggle the current active window into a group" +- set descriptions[55] "Get the config option status (values)" +- set descriptions[58] "Close the active window" +- set descriptions[59] "Pass the key to a specified window" +- set descriptions[60] "List all decorations and their info" +- set descriptions[61] "List all connected keyboards and mice" +- set descriptions[62] "Switch focus from current to previously focused window" +- set descriptions[63] "Change the current mapping group" +- set descriptions[64] "Execute a Global Shortcut using the GlobalShortcuts portal" +- set descriptions[66] "Force the renderer to reload all resources and outputs" +- set descriptions[67] "Move a selected window" +- set descriptions[69] "Print the Hyprland version: flags, commit and branch of build" +- set descriptions[70] "Set all monitors' DPMS status" +- set descriptions[71] "Resize the active window" +- set descriptions[72] "Move the active window into a group" +- set descriptions[73] "OK" +- set descriptions[75] "Set the current window's floating state to true" +- set descriptions[76] "Print tail of the log" +- set descriptions[79] "List all layouts available (including plugin ones)" +- set descriptions[80] "Move a workspace to a monitor" +- set descriptions[81] "Execute a shell command" +- set descriptions[83] "Modify the window stack order of the active or specified window" +- set descriptions[84] "Toggle the focused window's internal fullscreen state" +- set descriptions[86] "Issue a keyword to call a config keyword dynamically" +- set descriptions[89] "Disable output" +- set descriptions[90] "Pin a window" +- set descriptions[91] "Allows adding/removing fake outputs to a specific backend" +- set descriptions[93] "Toggle a special workspace on/off" +- set descriptions[94] "Toggle the focused window's fullscreen state" +- set descriptions[95] "Toggle the current window to always be opaque" +- set descriptions[96] "Focus the requested workspace" +- set descriptions[98] "Switch to the next window in a group" +- set descriptions[99] "Output in JSON format" +- set descriptions[100] "List all running Hyprland instances and their info" +- set descriptions[101] "Execute a raw shell command" +- set descriptions[102] "Exit the compositor with no questions asked" +- set descriptions[103] "List all windows with their properties" +- set descriptions[105] "Execute a batch of commands separated by ;" +- set descriptions[106] "Dismiss all or up to amount of notifications" +- set descriptions[108] "Set the xkb layout index for a keyboard" +- set descriptions[109] "Move window doesnt switch to the workspace" +- set descriptions[110] "Apply a tag to the window" +- set descriptions[111] "Behave as moveintogroup" +- set descriptions[112] "Refresh state after issuing the command" +- set descriptions[113] "Move the focus in a direction" +- set descriptions[114] "Focus the urgent window or the last window" +- set descriptions[116] "Get the active workspace name and its properties" +- set descriptions[117] "Issue a dispatch to call a keybind dispatcher with an arg" +- set descriptions[119] "Center the active window" +- set descriptions[120] "HINT" +- set descriptions[121] "Interact with hyprpaper if present" +- set descriptions[122] "No Icon" +- set descriptions[123] "Force reload the config" +- set descriptions[125] "Print system info" +- set descriptions[126] "Interact with a plugin" +- set descriptions[128] "Get the active window name and its properties" +- set descriptions[129] "Swap the active workspaces between two monitors" +- set descriptions[130] "Print the current random splash" +- set descriptions[131] "On shortcut X sends shortcut Y to a specified window" +- set descriptions[133] "Lock the focused group" +- set descriptions[136] "Lock the groups" +- set descriptions[137] "Move the cursor to the corner of the active window" +- set descriptions[140] "INFO" +- set descriptions[141] "Resize a selected window" +- +- set --local literal_transitions +- set literal_transitions[1] "set inputs 106 76 34 36 2 3 79 108 38 112 42 47 116 86 117 53 89 55 91 121 123 125 16 60 61 18 126 20 128 130 26 69 99 100 28 29 103 105; set tos 2 3 4 5 3 3 3 6 3 5 3 3 3 7 9 3 5 3 10 3 3 3 3 11 3 12 13 3 3 3 14 3 5 3 3 15 3 5" +- set literal_transitions[4] "set inputs 74 14 33 56 57 92 107 124 78 17 127 4 6 65 132 134 82 135 85 32 50 13 87 11 88 142; set tos 18 3 18 18 18 18 3 3 2 3 18 2 3 18 3 18 18 18 18 18 3 3 18 18 18 18" +- set literal_transitions[8] "set inputs 106 76 34 2 3 79 108 38 42 47 116 86 117 53 55 91 121 123 125 16 60 61 18 126 20 128 130 26 69 100 28 29 103; set tos 2 3 4 3 3 3 6 3 3 3 3 7 9 3 3 10 3 3 3 3 11 3 12 13 3 3 3 14 3 3 3 15 3" +- set literal_transitions[9] "set inputs 102 131 133 1 75 37 109 110 39 111 5 80 41 81 114 7 43 44 83 84 48 49 10 51 52 54 12 113 90 119 58 93 59 94 95 62 63 129 96 64 21 98 23 24 66 67 136 137 25 27 70 101 71 141 30 72; set tos 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3" +- set literal_transitions[10] "set inputs 118 115; set tos 21 17" +- set literal_transitions[12] "set inputs 104; set tos 3" +- set literal_transitions[14] "set inputs 22 120 31 140 122 45 73; set tos 2 2 2 2 2 2 2" +- set literal_transitions[15] "set inputs 40; set tos 3" +- set literal_transitions[16] "set inputs 139 97; set tos 3 3" +- set literal_transitions[18] "set inputs 19 8; set tos 3 3" +- set literal_transitions[19] "set inputs 77; set tos 20" +- set literal_transitions[20] "set inputs 35 46; set tos 5 5" +- set literal_transitions[21] "set inputs 9 68 15 138; set tos 3 3 3 3" +- +- set --local match_anything_transitions_from 2 1 7 16 11 6 15 8 3 17 13 12 +- set --local match_anything_transitions_to 3 8 3 3 3 16 19 8 19 3 3 19 +- +- set --local state 1 +- set --local word_index 2 ++ set literals "resizeactive" "2" "changegroupactive" "-r" "moveintogroup" "forceallowsinput" "4" "::=" "systeminfo" "all" "layouts" "setprop" "animationstyle" "switchxkblayout" "create" "denywindowfromgroup" "headless" "activebordercolor" "exec" "setcursor" "wayland" "focusurgentorlast" "workspacerules" "movecurrentworkspacetomonitor" "movetoworkspacesilent" "hyprpaper" "alpha" "inactivebordercolor" "movegroupwindow" "movecursortocorner" "movewindowpixel" "prev" "movewindow" "globalshortcuts" "clients" "dimaround" "setignoregrouplock" "splash" "execr" "monitors" "0" "forcenoborder" "-q" "animations" "1" "nomaxsize" "splitratio" "moveactive" "pass" "swapnext" "devices" "layers" "rounding" "lockactivegroup" "5" "moveworkspacetomonitor" "-f" "-i" "--quiet" "forcenodim" "pin" "0" "1" "forceopaque" "forcenoshadow" "setfloating" "minsize" "alphaoverride" "sendshortcut" "workspaces" "cyclenext" "alterzorder" "togglegroup" "lockgroups" "bordersize" "dpms" "focuscurrentorlast" "-1" "--batch" "notify" "remove" "instances" "1" "3" "moveoutofgroup" "killactive" "2" "movetoworkspace" "movecursor" "configerrors" "closewindow" "swapwindow" "tagwindow" "forcerendererreload" "centerwindow" "auto" "focuswindow" "seterror" "nofocus" "alphafullscreen" "binds" "version" "-h" "togglespecialworkspace" "fullscreen" "windowdancecompat" "0" "keyword" "toggleopaque" "3" "--instance" "togglefloating" "renameworkspace" "alphafullscreenoverride" "activeworkspace" "x11" "kill" "forceopaqueoverriden" "output" "global" "dispatch" "reload" "forcenoblur" "-j" "event" "--help" "disable" "-1" "activewindow" "keepaspectratio" "dismissnotify" "focusmonitor" "movefocus" "plugin" "exit" "workspace" "fullscreenstate" "getoption" "alphainactiveoverride" "alphainactive" "decorations" "settiled" "config-only" "descriptions" "resizewindowpixel" "fakefullscreen" "rollinglog" "swapactiveworkspaces" "submap" "next" "movewindoworgroup" "cursorpos" "forcenoanims" "focusworkspaceoncurrentmonitor" "maxsize" ++ ++ set descriptions ++ set descriptions[1] "Resize the active window" ++ set descriptions[2] "Fullscreen" ++ set descriptions[3] "Switch to the next window in a group" ++ set descriptions[4] "Refresh state after issuing the command" ++ set descriptions[5] "Move the active window into a group" ++ set descriptions[7] "CONFUSED" ++ set descriptions[9] "Print system info" ++ set descriptions[11] "List all layouts available (including plugin ones)" ++ set descriptions[12] "Set a property of a window" ++ set descriptions[14] "Set the xkb layout index for a keyboard" ++ set descriptions[16] "Prohibit the active window from becoming or being inserted into group" ++ set descriptions[19] "Execute a shell command" ++ set descriptions[20] "Set the cursor theme and reloads the cursor manager" ++ set descriptions[22] "Focus the urgent window or the last window" ++ set descriptions[23] "Get the list of defined workspace rules" ++ set descriptions[24] "Move the active workspace to a monitor" ++ set descriptions[25] "Move window doesnt switch to the workspace" ++ set descriptions[26] "Interact with hyprpaper if present" ++ set descriptions[29] "Swap the active window with the next or previous in a group" ++ set descriptions[30] "Move the cursor to the corner of the active window" ++ set descriptions[31] "Move a selected window" ++ set descriptions[33] "Move the active window in a direction or to a monitor" ++ set descriptions[34] "Lists all global shortcuts" ++ set descriptions[35] "List all windows with their properties" ++ set descriptions[37] "Temporarily enable or disable binds:ignore_group_lock" ++ set descriptions[38] "Print the current random splash" ++ set descriptions[39] "Execute a raw shell command" ++ set descriptions[40] "List active outputs with their properties" ++ set descriptions[43] "Disable output" ++ set descriptions[44] "Gets the current config info about animations and beziers" ++ set descriptions[47] "Change the split ratio" ++ set descriptions[48] "Move the active window" ++ set descriptions[49] "Pass the key to a specified window" ++ set descriptions[50] "Swap the focused window with the next window" ++ set descriptions[51] "List all connected keyboards and mice" ++ set descriptions[52] "List the layers" ++ set descriptions[54] "Lock the focused group" ++ set descriptions[55] "OK" ++ set descriptions[56] "Move a workspace to a monitor" ++ set descriptions[58] "Specify the Hyprland instance" ++ set descriptions[59] "Disable output" ++ set descriptions[61] "Pin a window" ++ set descriptions[62] "WARNING" ++ set descriptions[63] "INFO" ++ set descriptions[66] "Set the current window's floating state to true" ++ set descriptions[69] "On shortcut X sends shortcut Y to a specified window" ++ set descriptions[70] "List all workspaces with their properties" ++ set descriptions[71] "Focus the next window on a workspace" ++ set descriptions[72] "Modify the window stack order of the active or specified window" ++ set descriptions[73] "Toggle the current active window into a group" ++ set descriptions[74] "Lock the groups" ++ set descriptions[76] "Set all monitors' DPMS status" ++ set descriptions[77] "Switch focus from current to previously focused window" ++ set descriptions[78] "No Icon" ++ set descriptions[79] "Execute a batch of commands separated by ;" ++ set descriptions[80] "Send a notification using the built-in Hyprland notification system" ++ set descriptions[82] "List all running Hyprland instances and their info" ++ set descriptions[83] "Maximize no fullscreen" ++ set descriptions[84] "Maximize and fullscreen" ++ set descriptions[85] "Move the active window out of a group" ++ set descriptions[86] "Close the active window" ++ set descriptions[87] "HINT" ++ set descriptions[88] "Move the focused window to a workspace" ++ set descriptions[89] "Move the cursor to a specified position" ++ set descriptions[90] "List all current config parsing errors" ++ set descriptions[91] "Close a specified window" ++ set descriptions[92] "Swap the active window with another window" ++ set descriptions[93] "Apply a tag to the window" ++ set descriptions[94] "Force the renderer to reload all resources and outputs" ++ set descriptions[95] "Center the active window" ++ set descriptions[97] "Focus the first window matching" ++ set descriptions[98] "Set the hyprctl error string" ++ set descriptions[101] "List all registered binds" ++ set descriptions[102] "Print the Hyprland version: flags, commit and branch of build" ++ set descriptions[103] "Prints the help message" ++ set descriptions[104] "Toggle a special workspace on/off" ++ set descriptions[105] "Toggle the focused window's fullscreen state" ++ set descriptions[107] "None" ++ set descriptions[108] "Issue a keyword to call a config keyword dynamically" ++ set descriptions[109] "Toggle the current window to always be opaque" ++ set descriptions[110] "ERROR" ++ set descriptions[111] "Specify the Hyprland instance" ++ set descriptions[112] "Toggle the current window's floating state" ++ set descriptions[113] "Rename a workspace" ++ set descriptions[115] "Get the active workspace name and its properties" ++ set descriptions[117] "Get into a kill mode, where you can kill an app by clicking on it" ++ set descriptions[119] "Allows adding/removing fake outputs to a specific backend" ++ set descriptions[120] "Execute a Global Shortcut using the GlobalShortcuts portal" ++ set descriptions[121] "Issue a dispatch to call a keybind dispatcher with an arg" ++ set descriptions[122] "Force reload the config" ++ set descriptions[124] "Output in JSON format" ++ set descriptions[125] "Emits a custom event to socket2" ++ set descriptions[126] "Prints the help message" ++ set descriptions[128] "Current" ++ set descriptions[129] "Get the active window name and its properties" ++ set descriptions[131] "Dismiss all or up to amount of notifications" ++ set descriptions[132] "Focus a monitor" ++ set descriptions[133] "Move the focus in a direction" ++ set descriptions[134] "Interact with a plugin" ++ set descriptions[135] "Exit the compositor with no questions asked" ++ set descriptions[136] "Change the workspace" ++ set descriptions[137] "Sets the focused window’s fullscreen mode and the one sent to the client" ++ set descriptions[138] "Get the config option status (values)" ++ set descriptions[141] "List all decorations and their info" ++ set descriptions[142] "Set the current window's floating state to false" ++ set descriptions[144] "Return a parsable JSON with all the config options, descriptions, value types and ranges" ++ set descriptions[145] "Resize a selected window" ++ set descriptions[146] "Toggle the focused window's internal fullscreen state" ++ set descriptions[147] "Print tail of the log" ++ set descriptions[148] "Swap the active workspaces between two monitors" ++ set descriptions[149] "Change the current mapping group" ++ set descriptions[151] "Behave as moveintogroup" ++ set descriptions[152] "Get the current cursor pos in global layout coordinates" ++ set descriptions[154] "Focus the requested workspace" ++ ++ set literal_transitions ++ set literal_transitions[1] "set inputs 121 44 126 82 4 52 51 129 90 59 9 11 12 131 14 98 102 103 134 101 138 23 20 141 26 144 108 147 70 34 35 79 115 38 152 117 122 124 40 43 80 119; set tos 15 3 22 3 22 3 3 3 3 22 3 3 4 5 6 7 3 22 8 3 3 3 3 9 3 3 10 11 3 3 3 22 3 3 3 3 14 22 12 22 16 13" ++ set literal_transitions[2] "set inputs 82 52 51 129 9 90 11 12 131 14 98 102 134 101 23 20 138 141 26 144 108 147 70 34 35 115 38 152 117 40 119 122 121 80 44; set tos 3 3 3 3 3 3 3 4 5 6 7 3 8 3 3 3 3 9 3 3 10 11 3 3 3 3 3 3 3 12 13 14 15 16 3" ++ set literal_transitions[4] "set inputs 140 64 65 46 106 28 27 53 6 67 68 130 114 13 75 100 36 153 99 60 118 42 18 139 155 123; set tos 3 17 17 17 17 3 3 5 17 3 17 17 17 3 5 3 17 17 17 17 17 17 3 17 3 17" ++ set literal_transitions[7] "set inputs 127; set tos 3" ++ set literal_transitions[11] "set inputs 57; set tos 3" ++ set literal_transitions[12] "set inputs 10; set tos 3" ++ set literal_transitions[13] "set inputs 15 81; set tos 20 23" ++ set literal_transitions[14] "set inputs 143; set tos 3" ++ set literal_transitions[15] "set inputs 1 85 3 86 5 88 89 91 92 93 94 95 97 16 19 104 22 105 24 25 29 30 31 109 112 33 113 37 39 120 125 47 48 49 50 54 56 132 133 135 136 61 137 142 66 145 146 69 148 71 72 73 74 149 76 77 151 154; set tos 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 21 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3" ++ set literal_transitions[16] "set inputs 87 7 110 62 78 55 63; set tos 5 5 5 5 5 5 5" ++ set literal_transitions[17] "set inputs 41 45; set tos 3 3" ++ set literal_transitions[18] "set inputs 8; set tos 24" ++ set literal_transitions[19] "set inputs 32 150; set tos 3 3" ++ set literal_transitions[20] "set inputs 96 17 116 21; set tos 3 3 3 3" ++ set literal_transitions[21] "set inputs 107 83 128 2 84; set tos 3 3 3 3 3" ++ set literal_transitions[24] "set inputs 58 111; set tos 22 22" ++ ++ set match_anything_transitions_from 7 8 1 23 6 5 3 19 12 9 10 14 11 2 ++ set match_anything_transitions_to 18 3 2 3 19 3 18 3 18 3 3 18 18 2 ++ ++ set state 1 ++ set word_index 2 + while test $word_index -lt $COMP_CWORD +- set --local -- word $COMP_WORDS[$word_index] ++ set -- word $COMP_WORDS[$word_index] + + if set --query literal_transitions[$state] && test -n $literal_transitions[$state] +- set --local --erase inputs +- set --local --erase tos ++ set --erase inputs ++ set --erase tos + eval $literal_transitions[$state] + + if contains -- $word $literals +- set --local literal_matched 0 ++ set literal_matched 0 + for literal_id in (seq 1 (count $literals)) + if test $literals[$literal_id] = $word +- set --local index (contains --index -- $literal_id $inputs) ++ set index (contains --index -- $literal_id $inputs) + set state $tos[$index] + set word_index (math $word_index + 1) + set literal_matched 1 +@@ -181,7 +196,7 @@ function _hyprctl + end + + if set --query match_anything_transitions_from[$state] && test -n $match_anything_transitions_from[$state] +- set --local index (contains --index -- $state $match_anything_transitions_from) ++ set index (contains --index -- $state $match_anything_transitions_from) + set state $match_anything_transitions_to[$index] + set word_index (math $word_index + 1) + continue +@@ -191,8 +206,8 @@ function _hyprctl + end + + if set --query literal_transitions[$state] && test -n $literal_transitions[$state] +- set --local --erase inputs +- set --local --erase tos ++ set --erase inputs ++ set --erase tos + eval $literal_transitions[$state] + for literal_id in $inputs + if test -n $descriptions[$literal_id] +@@ -203,14 +218,14 @@ function _hyprctl + end + end + +- set command_states 6 17 13 11 +- set command_ids 2 3 4 1 ++ set command_states 8 23 9 6 ++ set command_ids 1 2 4 3 + if contains $state $command_states +- set --local index (contains --index $state $command_states) +- set --local function_id $command_ids[$index] +- set --local function_name _hyprctl_$function_id +- set --local --erase inputs +- set --local --erase tos ++ set index (contains --index $state $command_states) ++ set function_id $command_ids[$index] ++ set function_name _hyprctl_$function_id ++ set --erase inputs ++ set --erase tos + $function_name "$COMP_WORDS[$COMP_CWORD]" + end + +diff --git a/hyprctl/hyprctl.usage b/hyprctl/hyprctl.usage +index 298d253e..b2c55682 100644 +--- a/hyprctl/hyprctl.usage ++++ b/hyprctl/hyprctl.usage +@@ -2,13 +2,14 @@ + # Repo: https://github.com/adaszko/complgen + # Generate completion scripts: "complgen aot --bash-script hyprctl.bash --fish-script hyprctl.fish --zsh-script hyprctl.zsh ./hyprctl.usage" + +-hyprctl []... ++hyprctl []... + + ::= (-i | --instance) "Specify the Hyprland instance" + | (-j) "Output in JSON format" + | (-r) "Refresh state after issuing the command" + | (--batch) "Execute a batch of commands separated by ;" + | (-q | --quiet) "Disable output" ++ | (-h | --help) "Prints the help message" + ; + + ::= {{{ hyprctl clients | awk '/class/{print $2}' }}}; +@@ -59,16 +60,18 @@ hyprctl []... + + ::= (activewindow) "Get the active window name and its properties" + | (activeworkspace) "Get the active workspace name and its properties" ++ | (animations) "Gets the current config info about animations and beziers" + | (binds) "List all registered binds" + | (clients) "List all windows with their properties" + | (configerrors) "List all current config parsing errors" + | (cursorpos) "Get the current cursor pos in global layout coordinates" + | (decorations ) "List all decorations and their info" ++ | (descriptions) "Return a parsable JSON with all the config options, descriptions, value types and ranges" + | (devices) "List all connected keyboards and mice" + | (dismissnotify ) "Dismiss all or up to amount of notifications" + | (dispatch ) "Issue a dispatch to call a keybind dispatcher with an arg" + | (getoption) "Get the config option status (values)" +- | (globalshortcuts) "" ++ | (globalshortcuts) "Lists all global shortcuts" + | (hyprpaper) "Interact with hyprpaper if present" + | (instances) "List all running Hyprland instances and their info" + | (keyword ) "Issue a keyword to call a config keyword dynamically" +@@ -79,8 +82,8 @@ hyprctl []... + | (notify ) "Send a notification using the built-in Hyprland notification system" + | (output (create (wayland | x11 | headless | auto) | remove )) "Allows adding/removing fake outputs to a specific backend" + | (plugin ) "Interact with a plugin" +- | (reload) "Force reload the config" +- | (rollinglog) "Print tail of the log" ++ | (reload [config-only]) "Force reload the config" ++ | (rollinglog [-f]) "Print tail of the log" + | (setcursor) "Set the cursor theme and reloads the cursor manager" + | (seterror [disable]) "Set the hyprctl error string" + | (setprop ) "Set a property of a window" +@@ -92,6 +95,13 @@ hyprctl []... + | (workspaces) "List all workspaces with their properties" + ; + ++ ::= (-1) "Current" ++ | (0) "None" ++ | (1) "Maximize no fullscreen" ++ | (2) "Fullscreen" ++ | (3) "Maximize and fullscreen" ++ ; ++ + ::= (exec) "Execute a shell command" + | (execr) "Execute a raw shell command" + | (pass) "Pass the key to a specified window" +@@ -106,6 +116,7 @@ hyprctl []... + | (settiled) "Set the current window's floating state to false" + | (fullscreen) "Toggle the focused window's fullscreen state" + | (fakefullscreen) "Toggle the focused window's internal fullscreen state" ++ | (fullscreenstate ) "Sets the focused window’s fullscreen mode and the one sent to the client" + | (dpms) "Set all monitors' DPMS status" + | (pin) "Pin a window" + | (movefocus) "Move the focus in a direction" +@@ -148,4 +159,5 @@ hyprctl []... + | (setignoregrouplock) "Temporarily enable or disable binds:ignore_group_lock" + | (global) "Execute a Global Shortcut using the GlobalShortcuts portal" + | (submap) "Change the current mapping group" ++ | (event) "Emits a custom event to socket2" + ; +diff --git a/hyprctl/hyprctl.zsh b/hyprctl/hyprctl.zsh +index aeac9663..9a858100 100644 +--- a/hyprctl/hyprctl.zsh ++++ b/hyprctl/hyprctl.zsh +@@ -1,145 +1,160 @@ + #compdef hyprctl + +-_hyprctl_cmd_2 () { ++_hyprctl_cmd_1 () { + hyprctl monitors | awk '/Monitor/{ print $2 }' + } + + _hyprctl_cmd_3 () { +- hyprpm list | awk '/Plugin/{ print $4 }' ++ hyprctl clients | awk '/class/{print $2}' + } + +-_hyprctl_cmd_0 () { +- hyprctl clients | awk '/class/{ print $2 }' ++_hyprctl_cmd_2 () { ++ hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' + } + +-_hyprctl_cmd_1 () { +- hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' ++_hyprctl_cmd_0 () { ++ hyprpm list | awk '/Plugin/{print $4}' + } + + _hyprctl () { +- 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" "-q" "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" "--quiet" "pin" "output" "forcenoblur" "togglespecialworkspace" "fullscreen" "toggleopaque" "focusworkspaceoncurrentmonitor" "next" "changegroupactive" "-j" "instances" "execr" "exit" "clients" "all" "--batch" "dismissnotify" "inactivebordercolor" "switchxkblayout" "movetoworkspacesilent" "tagwindow" "movewindoworgroup" "-r" "movefocus" "focusurgentorlast" "remove" "activeworkspace" "dispatch" "create" "centerwindow" "2" "hyprpaper" "-1" "reload" "alphainactive" "systeminfo" "plugin" "dimaround" "activewindow" "swapactiveworkspaces" "splash" "sendshortcut" "maxsize" "lockactivegroup" "windowdancecompat" "forceopaqueoverriden" "lockgroups" "movecursortocorner" "x11" "prev" "1" "resizewindowpixel" "forcenoshadow") ++ local -a literals=("resizeactive" "2" "changegroupactive" "-r" "moveintogroup" "forceallowsinput" "4" "::=" "systeminfo" "all" "layouts" "setprop" "animationstyle" "switchxkblayout" "create" "denywindowfromgroup" "headless" "activebordercolor" "exec" "setcursor" "wayland" "focusurgentorlast" "workspacerules" "movecurrentworkspacetomonitor" "movetoworkspacesilent" "hyprpaper" "alpha" "inactivebordercolor" "movegroupwindow" "movecursortocorner" "movewindowpixel" "prev" "movewindow" "globalshortcuts" "clients" "dimaround" "setignoregrouplock" "splash" "execr" "monitors" "0" "forcenoborder" "-q" "animations" "1" "nomaxsize" "splitratio" "moveactive" "pass" "swapnext" "devices" "layers" "rounding" "lockactivegroup" "5" "moveworkspacetomonitor" "-f" "-i" "--quiet" "forcenodim" "pin" "0" "1" "forceopaque" "forcenoshadow" "setfloating" "minsize" "alphaoverride" "sendshortcut" "workspaces" "cyclenext" "alterzorder" "togglegroup" "lockgroups" "bordersize" "dpms" "focuscurrentorlast" "-1" "--batch" "notify" "remove" "instances" "1" "3" "moveoutofgroup" "killactive" "2" "movetoworkspace" "movecursor" "configerrors" "closewindow" "swapwindow" "tagwindow" "forcerendererreload" "centerwindow" "auto" "focuswindow" "seterror" "nofocus" "alphafullscreen" "binds" "version" "-h" "togglespecialworkspace" "fullscreen" "windowdancecompat" "0" "keyword" "toggleopaque" "3" "--instance" "togglefloating" "renameworkspace" "alphafullscreenoverride" "activeworkspace" "x11" "kill" "forceopaqueoverriden" "output" "global" "dispatch" "reload" "forcenoblur" "-j" "event" "--help" "disable" "-1" "activewindow" "keepaspectratio" "dismissnotify" "focusmonitor" "movefocus" "plugin" "exit" "workspace" "fullscreenstate" "getoption" "alphainactiveoverride" "alphainactive" "decorations" "settiled" "config-only" "descriptions" "resizewindowpixel" "fakefullscreen" "rollinglog" "swapactiveworkspaces" "submap" "next" "movewindoworgroup" "cursorpos" "forcenoanims" "focusworkspaceoncurrentmonitor" "maxsize") + + local -A descriptions +- descriptions[1]="Focus the next window on a workspace" +- descriptions[3]="Get the current cursor pos in global layout coordinates" +- descriptions[5]="Rename a workspace" +- descriptions[7]="Focus the first window matching" +- descriptions[10]="Swap the focused window with the next window" +- descriptions[12]="Move the active window" +- descriptions[16]="List the layers" +- descriptions[18]="List active outputs with their properties" +- descriptions[20]="Get into a kill mode, where you can kill an app by clicking on it" +- descriptions[21]="Set the current window's floating state to false" +- descriptions[22]="ERROR" +- descriptions[23]="Focus a monitor" +- descriptions[24]="Swap the active window with another window" +- descriptions[25]="Move the active window out of a group" +- descriptions[26]="Send a notification using the built-in Hyprland notification system" +- descriptions[27]="Move the cursor to a specified position" +- descriptions[28]="Set the cursor theme and reloads the cursor manager" +- descriptions[29]="Set the hyprctl error string" +- descriptions[30]="Move the active workspace to a monitor" +- descriptions[31]="CONFUSED" +- descriptions[34]="Set a property of a window" +- descriptions[35]="Specify the Hyprland instance" +- descriptions[36]="Disable output" +- descriptions[37]="Toggle the current window's floating state" +- descriptions[38]="Get the list of defined workspace rules" +- descriptions[39]="Move the focused window to a workspace" +- descriptions[41]="Temporarily enable or disable binds:ignore_group_lock" +- descriptions[42]="List all workspaces with their properties" +- descriptions[43]="Swap the active window with the next or previous in a group" +- descriptions[44]="Close a specified window" +- descriptions[45]="WARNING" +- descriptions[46]="Specify the Hyprland instance" +- descriptions[47]="List all registered binds" +- descriptions[48]="Move the active window in a direction or to a monitor" +- descriptions[49]="Change the split ratio" +- descriptions[51]="Prohibit the active window from becoming or being inserted into group" +- descriptions[52]="Change the workspace" +- descriptions[53]="List all current config parsing errors" +- descriptions[54]="Toggle the current active window into a group" +- descriptions[55]="Get the config option status (values)" +- descriptions[58]="Close the active window" +- descriptions[59]="Pass the key to a specified window" +- descriptions[60]="List all decorations and their info" +- descriptions[61]="List all connected keyboards and mice" +- descriptions[62]="Switch focus from current to previously focused window" +- descriptions[63]="Change the current mapping group" +- descriptions[64]="Execute a Global Shortcut using the GlobalShortcuts portal" +- descriptions[66]="Force the renderer to reload all resources and outputs" +- descriptions[67]="Move a selected window" +- descriptions[69]="Print the Hyprland version: flags, commit and branch of build" +- descriptions[70]="Set all monitors' DPMS status" +- descriptions[71]="Resize the active window" +- descriptions[72]="Move the active window into a group" +- descriptions[73]="OK" +- descriptions[75]="Set the current window's floating state to true" +- descriptions[76]="Print tail of the log" +- descriptions[79]="List all layouts available (including plugin ones)" +- descriptions[80]="Move a workspace to a monitor" +- descriptions[81]="Execute a shell command" +- descriptions[83]="Modify the window stack order of the active or specified window" +- descriptions[84]="Toggle the focused window's internal fullscreen state" +- descriptions[86]="Issue a keyword to call a config keyword dynamically" +- descriptions[89]="Disable output" +- descriptions[90]="Pin a window" +- descriptions[91]="Allows adding/removing fake outputs to a specific backend" +- descriptions[93]="Toggle a special workspace on/off" +- descriptions[94]="Toggle the focused window's fullscreen state" +- descriptions[95]="Toggle the current window to always be opaque" +- descriptions[96]="Focus the requested workspace" +- descriptions[98]="Switch to the next window in a group" +- descriptions[99]="Output in JSON format" +- descriptions[100]="List all running Hyprland instances and their info" +- descriptions[101]="Execute a raw shell command" +- descriptions[102]="Exit the compositor with no questions asked" +- descriptions[103]="List all windows with their properties" +- descriptions[105]="Execute a batch of commands separated by ;" +- descriptions[106]="Dismiss all or up to amount of notifications" +- descriptions[108]="Set the xkb layout index for a keyboard" +- descriptions[109]="Move window doesnt switch to the workspace" +- descriptions[110]="Apply a tag to the window" +- descriptions[111]="Behave as moveintogroup" +- descriptions[112]="Refresh state after issuing the command" +- descriptions[113]="Move the focus in a direction" +- descriptions[114]="Focus the urgent window or the last window" +- descriptions[116]="Get the active workspace name and its properties" +- descriptions[117]="Issue a dispatch to call a keybind dispatcher with an arg" +- descriptions[119]="Center the active window" +- descriptions[120]="HINT" +- descriptions[121]="Interact with hyprpaper if present" +- descriptions[122]="No Icon" +- descriptions[123]="Force reload the config" +- descriptions[125]="Print system info" +- descriptions[126]="Interact with a plugin" +- descriptions[128]="Get the active window name and its properties" +- descriptions[129]="Swap the active workspaces between two monitors" +- descriptions[130]="Print the current random splash" +- descriptions[131]="On shortcut X sends shortcut Y to a specified window" +- descriptions[133]="Lock the focused group" +- descriptions[136]="Lock the groups" +- descriptions[137]="Move the cursor to the corner of the active window" +- descriptions[140]="INFO" +- descriptions[141]="Resize a selected window" ++ descriptions[1]="Resize the active window" ++ descriptions[2]="Fullscreen" ++ descriptions[3]="Switch to the next window in a group" ++ descriptions[4]="Refresh state after issuing the command" ++ descriptions[5]="Move the active window into a group" ++ descriptions[7]="CONFUSED" ++ descriptions[9]="Print system info" ++ descriptions[11]="List all layouts available (including plugin ones)" ++ descriptions[12]="Set a property of a window" ++ descriptions[14]="Set the xkb layout index for a keyboard" ++ descriptions[16]="Prohibit the active window from becoming or being inserted into group" ++ descriptions[19]="Execute a shell command" ++ descriptions[20]="Set the cursor theme and reloads the cursor manager" ++ descriptions[22]="Focus the urgent window or the last window" ++ descriptions[23]="Get the list of defined workspace rules" ++ descriptions[24]="Move the active workspace to a monitor" ++ descriptions[25]="Move window doesnt switch to the workspace" ++ descriptions[26]="Interact with hyprpaper if present" ++ descriptions[29]="Swap the active window with the next or previous in a group" ++ descriptions[30]="Move the cursor to the corner of the active window" ++ descriptions[31]="Move a selected window" ++ descriptions[33]="Move the active window in a direction or to a monitor" ++ descriptions[34]="Lists all global shortcuts" ++ descriptions[35]="List all windows with their properties" ++ descriptions[37]="Temporarily enable or disable binds:ignore_group_lock" ++ descriptions[38]="Print the current random splash" ++ descriptions[39]="Execute a raw shell command" ++ descriptions[40]="List active outputs with their properties" ++ descriptions[43]="Disable output" ++ descriptions[44]="Gets the current config info about animations and beziers" ++ descriptions[47]="Change the split ratio" ++ descriptions[48]="Move the active window" ++ descriptions[49]="Pass the key to a specified window" ++ descriptions[50]="Swap the focused window with the next window" ++ descriptions[51]="List all connected keyboards and mice" ++ descriptions[52]="List the layers" ++ descriptions[54]="Lock the focused group" ++ descriptions[55]="OK" ++ descriptions[56]="Move a workspace to a monitor" ++ descriptions[58]="Specify the Hyprland instance" ++ descriptions[59]="Disable output" ++ descriptions[61]="Pin a window" ++ descriptions[62]="WARNING" ++ descriptions[63]="INFO" ++ descriptions[66]="Set the current window's floating state to true" ++ descriptions[69]="On shortcut X sends shortcut Y to a specified window" ++ descriptions[70]="List all workspaces with their properties" ++ descriptions[71]="Focus the next window on a workspace" ++ descriptions[72]="Modify the window stack order of the active or specified window" ++ descriptions[73]="Toggle the current active window into a group" ++ descriptions[74]="Lock the groups" ++ descriptions[76]="Set all monitors' DPMS status" ++ descriptions[77]="Switch focus from current to previously focused window" ++ descriptions[78]="No Icon" ++ descriptions[79]="Execute a batch of commands separated by ;" ++ descriptions[80]="Send a notification using the built-in Hyprland notification system" ++ descriptions[82]="List all running Hyprland instances and their info" ++ descriptions[83]="Maximize no fullscreen" ++ descriptions[84]="Maximize and fullscreen" ++ descriptions[85]="Move the active window out of a group" ++ descriptions[86]="Close the active window" ++ descriptions[87]="HINT" ++ descriptions[88]="Move the focused window to a workspace" ++ descriptions[89]="Move the cursor to a specified position" ++ descriptions[90]="List all current config parsing errors" ++ descriptions[91]="Close a specified window" ++ descriptions[92]="Swap the active window with another window" ++ descriptions[93]="Apply a tag to the window" ++ descriptions[94]="Force the renderer to reload all resources and outputs" ++ descriptions[95]="Center the active window" ++ descriptions[97]="Focus the first window matching" ++ descriptions[98]="Set the hyprctl error string" ++ descriptions[101]="List all registered binds" ++ descriptions[102]="Print the Hyprland version: flags, commit and branch of build" ++ descriptions[103]="Prints the help message" ++ descriptions[104]="Toggle a special workspace on/off" ++ descriptions[105]="Toggle the focused window's fullscreen state" ++ descriptions[107]="None" ++ descriptions[108]="Issue a keyword to call a config keyword dynamically" ++ descriptions[109]="Toggle the current window to always be opaque" ++ descriptions[110]="ERROR" ++ descriptions[111]="Specify the Hyprland instance" ++ descriptions[112]="Toggle the current window's floating state" ++ descriptions[113]="Rename a workspace" ++ descriptions[115]="Get the active workspace name and its properties" ++ descriptions[117]="Get into a kill mode, where you can kill an app by clicking on it" ++ descriptions[119]="Allows adding/removing fake outputs to a specific backend" ++ descriptions[120]="Execute a Global Shortcut using the GlobalShortcuts portal" ++ descriptions[121]="Issue a dispatch to call a keybind dispatcher with an arg" ++ descriptions[122]="Force reload the config" ++ descriptions[124]="Output in JSON format" ++ descriptions[125]="Emits a custom event to socket2" ++ descriptions[126]="Prints the help message" ++ descriptions[128]="Current" ++ descriptions[129]="Get the active window name and its properties" ++ descriptions[131]="Dismiss all or up to amount of notifications" ++ descriptions[132]="Focus a monitor" ++ descriptions[133]="Move the focus in a direction" ++ descriptions[134]="Interact with a plugin" ++ descriptions[135]="Exit the compositor with no questions asked" ++ descriptions[136]="Change the workspace" ++ descriptions[137]="Sets the focused window’s fullscreen mode and the one sent to the client" ++ descriptions[138]="Get the config option status (values)" ++ descriptions[141]="List all decorations and their info" ++ descriptions[142]="Set the current window's floating state to false" ++ descriptions[144]="Return a parsable JSON with all the config options, descriptions, value types and ranges" ++ descriptions[145]="Resize a selected window" ++ descriptions[146]="Toggle the focused window's internal fullscreen state" ++ descriptions[147]="Print tail of the log" ++ descriptions[148]="Swap the active workspaces between two monitors" ++ descriptions[149]="Change the current mapping group" ++ descriptions[151]="Behave as moveintogroup" ++ descriptions[152]="Get the current cursor pos in global layout coordinates" ++ descriptions[154]="Focus the requested workspace" + + local -A literal_transitions +- literal_transitions[1]="([106]=2 [76]=3 [34]=4 [36]=5 [2]=3 [3]=3 [79]=3 [108]=6 [38]=3 [112]=5 [42]=3 [47]=3 [116]=3 [86]=7 [117]=9 [53]=3 [89]=5 [55]=3 [91]=10 [121]=3 [123]=3 [125]=3 [16]=3 [60]=11 [61]=3 [18]=12 [126]=13 [20]=3 [128]=3 [130]=3 [26]=14 [69]=3 [99]=5 [100]=3 [28]=3 [29]=15 [103]=3 [105]=5)" +- literal_transitions[4]="([74]=18 [14]=3 [33]=18 [56]=18 [57]=18 [92]=18 [107]=3 [124]=3 [78]=2 [17]=3 [127]=18 [4]=2 [6]=3 [65]=18 [132]=3 [134]=18 [82]=18 [135]=18 [85]=18 [32]=18 [50]=3 [13]=3 [87]=18 [11]=18 [88]=18 [142]=18)" +- literal_transitions[8]="([106]=2 [76]=3 [34]=4 [2]=3 [3]=3 [79]=3 [108]=6 [38]=3 [42]=3 [47]=3 [116]=3 [86]=7 [117]=9 [53]=3 [55]=3 [91]=10 [121]=3 [123]=3 [125]=3 [16]=3 [60]=11 [61]=3 [18]=12 [126]=13 [20]=3 [128]=3 [130]=3 [26]=14 [69]=3 [100]=3 [28]=3 [29]=15 [103]=3)" +- literal_transitions[9]="([102]=3 [131]=3 [133]=3 [1]=3 [75]=3 [37]=3 [109]=3 [110]=3 [39]=3 [111]=3 [5]=3 [80]=3 [41]=3 [81]=3 [114]=3 [7]=3 [43]=3 [44]=3 [83]=3 [84]=3 [48]=3 [49]=3 [10]=3 [51]=3 [52]=3 [54]=3 [12]=3 [113]=3 [90]=3 [119]=3 [58]=3 [93]=3 [59]=3 [94]=3 [95]=3 [62]=3 [63]=3 [129]=3 [96]=3 [64]=3 [21]=3 [98]=3 [23]=3 [24]=3 [66]=3 [67]=3 [136]=3 [137]=3 [25]=3 [27]=3 [70]=3 [101]=3 [71]=3 [141]=3 [30]=3 [72]=3)" +- literal_transitions[10]="([118]=21 [115]=17)" +- literal_transitions[12]="([104]=3)" +- literal_transitions[14]="([22]=2 [120]=2 [31]=2 [140]=2 [122]=2 [45]=2 [73]=2)" +- literal_transitions[15]="([40]=3)" +- literal_transitions[16]="([139]=3 [97]=3)" +- literal_transitions[18]="([19]=3 [8]=3)" +- literal_transitions[19]="([77]=20)" +- literal_transitions[20]="([35]=5 [46]=5)" +- literal_transitions[21]="([9]=3 [68]=3 [15]=3 [138]=3)" ++ literal_transitions[1]="([121]=15 [44]=3 [126]=22 [82]=3 [4]=22 [52]=3 [51]=3 [129]=3 [90]=3 [59]=22 [9]=3 [11]=3 [12]=4 [131]=5 [14]=6 [98]=7 [102]=3 [103]=22 [134]=8 [101]=3 [138]=3 [23]=3 [20]=3 [141]=9 [26]=3 [144]=3 [108]=10 [147]=11 [70]=3 [34]=3 [35]=3 [79]=22 [115]=3 [38]=3 [152]=3 [117]=3 [122]=14 [124]=22 [40]=12 [43]=22 [80]=16 [119]=13)" ++ literal_transitions[2]="([82]=3 [52]=3 [51]=3 [129]=3 [9]=3 [90]=3 [11]=3 [12]=4 [131]=5 [14]=6 [98]=7 [102]=3 [134]=8 [101]=3 [23]=3 [20]=3 [138]=3 [141]=9 [26]=3 [144]=3 [108]=10 [147]=11 [70]=3 [34]=3 [35]=3 [115]=3 [38]=3 [152]=3 [117]=3 [40]=12 [119]=13 [122]=14 [121]=15 [80]=16 [44]=3)" ++ literal_transitions[4]="([140]=3 [64]=17 [65]=17 [46]=17 [106]=17 [28]=3 [27]=3 [53]=5 [6]=17 [67]=3 [68]=17 [130]=17 [114]=17 [13]=3 [75]=5 [100]=3 [36]=17 [153]=17 [99]=17 [60]=17 [118]=17 [42]=17 [18]=3 [139]=17 [155]=3 [123]=17)" ++ literal_transitions[7]="([127]=3)" ++ literal_transitions[11]="([57]=3)" ++ literal_transitions[12]="([10]=3)" ++ literal_transitions[13]="([15]=20 [81]=23)" ++ literal_transitions[14]="([143]=3)" ++ literal_transitions[15]="([1]=3 [85]=3 [3]=3 [86]=3 [5]=3 [88]=3 [89]=3 [91]=3 [92]=3 [93]=3 [94]=3 [95]=3 [97]=3 [16]=3 [19]=3 [104]=3 [22]=3 [105]=3 [24]=3 [25]=3 [29]=3 [30]=3 [31]=3 [109]=3 [112]=3 [33]=3 [113]=3 [37]=3 [39]=3 [120]=3 [125]=3 [47]=3 [48]=3 [49]=3 [50]=3 [54]=3 [56]=3 [132]=3 [133]=3 [135]=3 [136]=3 [61]=3 [137]=21 [142]=3 [66]=3 [145]=3 [146]=3 [69]=3 [148]=3 [71]=3 [72]=3 [73]=3 [74]=3 [149]=3 [76]=3 [77]=3 [151]=3 [154]=3)" ++ literal_transitions[16]="([87]=5 [7]=5 [110]=5 [62]=5 [78]=5 [55]=5 [63]=5)" ++ literal_transitions[17]="([41]=3 [45]=3)" ++ literal_transitions[18]="([8]=24)" ++ literal_transitions[19]="([32]=3 [150]=3)" ++ literal_transitions[20]="([96]=3 [17]=3 [116]=3 [21]=3)" ++ literal_transitions[21]="([107]=3 [83]=3 [128]=3 [2]=3 [84]=3)" ++ literal_transitions[24]="([58]=22 [111]=22)" + + local -A match_anything_transitions +- match_anything_transitions=([2]=3 [1]=8 [7]=3 [16]=3 [11]=3 [6]=16 [15]=19 [8]=8 [3]=19 [17]=3 [13]=3 [12]=19) ++ match_anything_transitions=([7]=18 [8]=3 [1]=2 [23]=3 [6]=19 [5]=3 [3]=18 [19]=3 [12]=18 [9]=3 [10]=3 [14]=18 [11]=18 [2]=2) + + declare -A subword_transitions + +@@ -199,7 +214,7 @@ _hyprctl () { + fi + done + fi +- local -A commands=([6]=1 [17]=2 [13]=3 [11]=0) ++ local -A commands=([8]=0 [23]=1 [9]=3 [6]=2) + + if [[ -v "commands[$state]" ]]; then + local command_id=${commands[$state]} +@@ -252,4 +267,8 @@ _hyprctl () { + return 0 + } + +-compdef _hyprctl hyprctl ++if [[ $ZSH_EVAL_CONTEXT =~ :file$ ]]; then ++ compdef _hyprctl hyprctl ++else ++ _hyprctl ++fi +diff --git a/hyprpm/hyprpm.bash b/hyprpm/hyprpm.bash +index ffc33e19..3c2bc90b 100644 +--- a/hyprpm/hyprpm.bash ++++ b/hyprpm/hyprpm.bash +@@ -2,6 +2,10 @@ _hyprpm_cmd_0 () { + hyprpm list | awk '/Plugin/{print $4}' + } + ++_hyprpm_cmd_1 () { ++ hyprpm list | awk '/Repository/{print $4}' | sed 's/:$//' ++} ++ + _hyprpm () { + if [[ $(type -t _get_comp_words_by_ref) != function ]]; then + echo _get_comp_words_by_ref: function not defined. Make sure the bash-completions system package is installed +@@ -11,16 +15,13 @@ _hyprpm () { + local words cword + _get_comp_words_by_ref -n "$COMP_WORDBREAKS" words cword + +- local -a literals=("-n" "::=" "list" "disable" "--help" "update" "add" "--verbose" "-v" "--force" "remove" "enable" "--notify" "-h" "reload" "-f") +- ++ declare -a literals=(--no-shallow -n ::= disable list --help update add --verbose -v --force -s remove enable --notify -h reload -f) + declare -A literal_transitions +- literal_transitions[0]="([9]=6 [2]=2 [7]=6 [8]=6 [4]=6 [10]=2 [11]=3 [5]=2 [13]=6 [3]=3 [14]=2 [15]=6 [6]=2)" +- literal_transitions[1]="([10]=2 [11]=3 [3]=3 [2]=2 [14]=2 [5]=2 [6]=2)" +- literal_transitions[4]="([1]=5)" +- literal_transitions[5]="([0]=6 [12]=6)" +- +- declare -A match_anything_transitions +- match_anything_transitions=([3]=2 [2]=4 [0]=1 [1]=1) ++ literal_transitions[0]="([0]=7 [3]=3 [4]=4 [8]=7 [9]=7 [6]=4 [7]=4 [11]=7 [5]=7 [10]=7 [12]=2 [13]=3 [15]=7 [16]=4 [17]=7)" ++ literal_transitions[1]="([12]=2 [13]=3 [3]=3 [4]=4 [16]=4 [6]=4 [7]=4)" ++ literal_transitions[5]="([2]=6)" ++ literal_transitions[6]="([1]=7 [14]=7)" ++ declare -A match_anything_transitions=([1]=1 [4]=5 [3]=4 [2]=4 [0]=1) + declare -A subword_transitions + + local state=0 +@@ -58,21 +59,9 @@ _hyprpm () { + done + + +- local prefix="${words[$cword]}" +- +- local shortest_suffix="$word" +- for ((i=0; i < ${#COMP_WORDBREAKS}; i++)); do +- local char="${COMP_WORDBREAKS:$i:1}" +- local candidate="${word##*$char}" +- if [[ ${#candidate} -lt ${#shortest_suffix} ]]; then +- shortest_suffix=$candidate +- fi +- done +- local superfluous_prefix="" +- if [[ "$shortest_suffix" != "$word" ]]; then +- local superfluous_prefix=${word%$shortest_suffix} +- fi ++ local -a matches=() + ++ local prefix="${words[$cword]}" + if [[ -v "literal_transitions[$state]" ]]; then + local state_transitions_initializer=${literal_transitions[$state]} + declare -A state_transitions +@@ -81,25 +70,38 @@ _hyprpm () { + for literal_id in "${!state_transitions[@]}"; do + local literal="${literals[$literal_id]}" + if [[ $literal = "${prefix}"* ]]; then +- local completion=${literal#"$superfluous_prefix"} +- COMPREPLY+=("$completion ") ++ matches+=("$literal ") + fi + done + fi + declare -A commands +- commands=([3]=0) ++ commands=([3]=0 [2]=1) + if [[ -v "commands[$state]" ]]; then + local command_id=${commands[$state]} + local completions=() +- mapfile -t completions < <(_hyprpm_cmd_${command_id} "$prefix" | cut -f1) ++ readarray -t completions < <(_hyprpm_cmd_${command_id} "$prefix" | cut -f1) + for item in "${completions[@]}"; do + if [[ $item = "${prefix}"* ]]; then +- COMPREPLY+=("$item") ++ matches+=("$item") + fi + done + fi + + ++ local shortest_suffix="$prefix" ++ for ((i=0; i < ${#COMP_WORDBREAKS}; i++)); do ++ local char="${COMP_WORDBREAKS:$i:1}" ++ local candidate=${prefix##*$char} ++ if [[ ${#candidate} -lt ${#shortest_suffix} ]]; then ++ shortest_suffix=$candidate ++ fi ++ done ++ local superfluous_prefix="" ++ if [[ "$shortest_suffix" != "$prefix" ]]; then ++ local superfluous_prefix=${prefix%$shortest_suffix} ++ fi ++ COMPREPLY=("${matches[@]#$superfluous_prefix}") ++ + return 0 + } + +diff --git a/hyprpm/hyprpm.fish b/hyprpm/hyprpm.fish +index 7be4f224..82561bd8 100644 +--- a/hyprpm/hyprpm.fish ++++ b/hyprpm/hyprpm.fish +@@ -3,6 +3,11 @@ function _hyprpm_1 + hyprpm list | awk '/Plugin/{print $4}' + end + ++function _hyprpm_2 ++ set 1 $argv[1] ++ hyprpm list | awk '/Repository/{print $4}' | sed 's/:$//' ++end ++ + function _hyprpm + set COMP_LINE (commandline --cut-at-cursor) + +@@ -14,49 +19,51 @@ function _hyprpm + set COMP_CWORD (count $COMP_WORDS) + end + +- set --local literals "-n" "::=" "list" "disable" "--help" "update" "add" "--verbose" "-v" "--force" "remove" "enable" "--notify" "-h" "reload" "-f" ++ set literals "--no-shallow" "-n" "::=" "disable" "list" "--help" "update" "add" "--verbose" "-v" "--force" "-s" "remove" "enable" "--notify" "-h" "reload" "-f" + +- set --local descriptions +- set descriptions[1] "Send a hyprland notification for important events (e.g. load fail)" +- set descriptions[3] "List all installed plugins" ++ set descriptions ++ set descriptions[1] "Disable shallow cloning of Hyprland sources" ++ set descriptions[2] "Send a hyprland notification for important events (e.g. load fail)" + set descriptions[4] "Unload a plugin" +- set descriptions[5] "Show help menu" +- set descriptions[6] "Check and update all plugins if needed" +- set descriptions[7] "Install a new plugin repository from git" +- set descriptions[8] "Enable too much loggin" ++ set descriptions[5] "List all installed plugins" ++ set descriptions[6] "Show help menu" ++ set descriptions[7] "Check and update all plugins if needed" ++ set descriptions[8] "Install a new plugin repository from git" + set descriptions[9] "Enable too much loggin" +- set descriptions[10] "Force an operation ignoring checks (e.g. update -f)" +- set descriptions[11] "Remove a plugin repository" +- set descriptions[12] "Load a plugin" +- set descriptions[13] "Send a hyprland notification for important events (e.g. load fail)" +- set descriptions[14] "Show help menu" +- set descriptions[15] "Reload all plugins" +- set descriptions[16] "Force an operation ignoring checks (e.g. update -f)" +- +- set --local literal_transitions +- set literal_transitions[1] "set inputs 10 3 8 9 5 11 12 6 14 4 15 16 7; set tos 7 3 7 7 7 3 4 3 7 4 3 7 3" +- set literal_transitions[2] "set inputs 11 12 4 3 15 6 7; set tos 3 4 4 3 3 3 3" +- set literal_transitions[5] "set inputs 2; set tos 6" +- set literal_transitions[6] "set inputs 1 13; set tos 7 7" +- +- set --local match_anything_transitions_from 4 3 1 2 +- set --local match_anything_transitions_to 3 5 2 2 +- +- set --local state 1 +- set --local word_index 2 ++ set descriptions[10] "Enable too much loggin" ++ set descriptions[11] "Force an operation ignoring checks (e.g. update -f)" ++ set descriptions[12] "Disable shallow cloning of Hyprland sources" ++ set descriptions[13] "Remove a plugin repository" ++ set descriptions[14] "Load a plugin" ++ set descriptions[15] "Send a hyprland notification for important events (e.g. load fail)" ++ set descriptions[16] "Show help menu" ++ set descriptions[17] "Reload all plugins" ++ set descriptions[18] "Force an operation ignoring checks (e.g. update -f)" ++ ++ set literal_transitions ++ set literal_transitions[1] "set inputs 1 4 5 9 10 7 8 12 6 11 13 14 16 17 18; set tos 8 4 5 8 8 5 5 8 8 8 3 4 8 5 8" ++ set literal_transitions[2] "set inputs 13 14 4 5 17 7 8; set tos 3 4 4 5 5 5 5" ++ set literal_transitions[6] "set inputs 3; set tos 7" ++ set literal_transitions[7] "set inputs 2 15; set tos 8 8" ++ ++ set match_anything_transitions_from 2 5 4 3 1 ++ set match_anything_transitions_to 2 6 5 5 2 ++ ++ set state 1 ++ set word_index 2 + while test $word_index -lt $COMP_CWORD +- set --local -- word $COMP_WORDS[$word_index] ++ set -- word $COMP_WORDS[$word_index] + + if set --query literal_transitions[$state] && test -n $literal_transitions[$state] +- set --local --erase inputs +- set --local --erase tos ++ set --erase inputs ++ set --erase tos + eval $literal_transitions[$state] + + if contains -- $word $literals +- set --local literal_matched 0 ++ set literal_matched 0 + for literal_id in (seq 1 (count $literals)) + if test $literals[$literal_id] = $word +- set --local index (contains --index -- $literal_id $inputs) ++ set index (contains --index -- $literal_id $inputs) + set state $tos[$index] + set word_index (math $word_index + 1) + set literal_matched 1 +@@ -70,7 +77,7 @@ function _hyprpm + end + + if set --query match_anything_transitions_from[$state] && test -n $match_anything_transitions_from[$state] +- set --local index (contains --index -- $state $match_anything_transitions_from) ++ set index (contains --index -- $state $match_anything_transitions_from) + set state $match_anything_transitions_to[$index] + set word_index (math $word_index + 1) + continue +@@ -80,8 +87,8 @@ function _hyprpm + end + + if set --query literal_transitions[$state] && test -n $literal_transitions[$state] +- set --local --erase inputs +- set --local --erase tos ++ set --erase inputs ++ set --erase tos + eval $literal_transitions[$state] + for literal_id in $inputs + if test -n $descriptions[$literal_id] +@@ -92,14 +99,14 @@ function _hyprpm + end + end + +- set command_states 4 +- set command_ids 1 ++ set command_states 4 3 ++ set command_ids 1 2 + if contains $state $command_states +- set --local index (contains --index $state $command_states) +- set --local function_id $command_ids[$index] +- set --local function_name _hyprpm_$function_id +- set --local --erase inputs +- set --local --erase tos ++ set index (contains --index $state $command_states) ++ set function_id $command_ids[$index] ++ set function_name _hyprpm_$function_id ++ set --erase inputs ++ set --erase tos + $function_name "$COMP_WORDS[$COMP_CWORD]" + end + +diff --git a/hyprpm/hyprpm.usage b/hyprpm/hyprpm.usage +index 369c9d2b..24e631c5 100644 +--- a/hyprpm/hyprpm.usage ++++ b/hyprpm/hyprpm.usage +@@ -5,10 +5,11 @@ hyprpm []... + | (--help | -h) "Show help menu" + | (--verbose | -v) "Enable too much loggin" + | (--force | -f) "Force an operation ignoring checks (e.g. update -f)" ++ | (--no-shallow | -s) "Disable shallow cloning of Hyprland sources" + ; + + ::= (add) "Install a new plugin repository from git" +- | (remove) "Remove a plugin repository" ++ | (remove ) "Remove a plugin repository" + | (update) "Check and update all plugins if needed" + | (list) "List all installed plugins" + | (enable ) "Load a plugin" +@@ -17,3 +18,4 @@ hyprpm []... + ; + + ::= {{{ hyprpm list | awk '/Plugin/{print $4}' }}}; ++ ::= {{{ hyprpm list | awk '/Repository/{print $4}' | sed 's/:$//' }}}; +diff --git a/hyprpm/hyprpm.zsh b/hyprpm/hyprpm.zsh +index 854e8426..859c5313 100644 +--- a/hyprpm/hyprpm.zsh ++++ b/hyprpm/hyprpm.zsh +@@ -4,34 +4,40 @@ _hyprpm_cmd_0 () { + hyprpm list | awk '/Plugin/{print $4}' + } + ++_hyprpm_cmd_1 () { ++ hyprpm list | awk '/Repository/{print $4}' | sed 's/:$//' ++} ++ + _hyprpm () { +- local -a literals=("-n" "::=" "list" "disable" "--help" "update" "add" "--verbose" "-v" "--force" "remove" "enable" "--notify" "-h" "reload" "-f") ++ local -a literals=("--no-shallow" "-n" "::=" "disable" "list" "--help" "update" "add" "--verbose" "-v" "--force" "-s" "remove" "enable" "--notify" "-h" "reload" "-f") + + local -A descriptions +- descriptions[1]="Send a hyprland notification for important events (e.g. load fail)" +- descriptions[3]="List all installed plugins" ++ descriptions[1]="Disable shallow cloning of Hyprland sources" ++ descriptions[2]="Send a hyprland notification for important events (e.g. load fail)" + descriptions[4]="Unload a plugin" +- descriptions[5]="Show help menu" +- descriptions[6]="Check and update all plugins if needed" +- descriptions[7]="Install a new plugin repository from git" +- descriptions[8]="Enable too much loggin" ++ descriptions[5]="List all installed plugins" ++ descriptions[6]="Show help menu" ++ descriptions[7]="Check and update all plugins if needed" ++ descriptions[8]="Install a new plugin repository from git" + descriptions[9]="Enable too much loggin" +- descriptions[10]="Force an operation ignoring checks (e.g. update -f)" +- descriptions[11]="Remove a plugin repository" +- descriptions[12]="Load a plugin" +- descriptions[13]="Send a hyprland notification for important events (e.g. load fail)" +- descriptions[14]="Show help menu" +- descriptions[15]="Reload all plugins" +- descriptions[16]="Force an operation ignoring checks (e.g. update -f)" ++ descriptions[10]="Enable too much loggin" ++ descriptions[11]="Force an operation ignoring checks (e.g. update -f)" ++ descriptions[12]="Disable shallow cloning of Hyprland sources" ++ descriptions[13]="Remove a plugin repository" ++ descriptions[14]="Load a plugin" ++ descriptions[15]="Send a hyprland notification for important events (e.g. load fail)" ++ descriptions[16]="Show help menu" ++ descriptions[17]="Reload all plugins" ++ descriptions[18]="Force an operation ignoring checks (e.g. update -f)" + + local -A literal_transitions +- literal_transitions[1]="([10]=7 [3]=3 [8]=7 [9]=7 [5]=7 [11]=3 [12]=4 [6]=3 [14]=7 [4]=4 [15]=3 [16]=7 [7]=3)" +- literal_transitions[2]="([11]=3 [12]=4 [4]=4 [3]=3 [15]=3 [6]=3 [7]=3)" +- literal_transitions[5]="([2]=6)" +- literal_transitions[6]="([1]=7 [13]=7)" ++ literal_transitions[1]="([1]=8 [4]=4 [5]=5 [9]=8 [10]=8 [7]=5 [8]=5 [12]=8 [6]=8 [11]=8 [13]=3 [14]=4 [16]=8 [17]=5 [18]=8)" ++ literal_transitions[2]="([13]=3 [14]=4 [4]=4 [5]=5 [17]=5 [7]=5 [8]=5)" ++ literal_transitions[6]="([3]=7)" ++ literal_transitions[7]="([2]=8 [15]=8)" + + local -A match_anything_transitions +- match_anything_transitions=([4]=3 [3]=5 [1]=2 [2]=2) ++ match_anything_transitions=([2]=2 [5]=6 [4]=5 [3]=5 [1]=2) + + declare -A subword_transitions + +@@ -91,7 +97,7 @@ _hyprpm () { + fi + done + fi +- local -A commands=([4]=0) ++ local -A commands=([4]=0 [3]=1) + + if [[ -v "commands[$state]" ]]; then + local command_id=${commands[$state]} +-- +2.45.2 + diff --git a/hosts/callisto/0009-config-add-missing-header-for-libc-after-92744b5b9aa.patch b/hosts/callisto/0009-config-add-missing-header-for-libc-after-92744b5b9aa.patch new file mode 100644 index 0000000..7398c37 --- /dev/null +++ b/hosts/callisto/0009-config-add-missing-header-for-libc-after-92744b5b9aa.patch @@ -0,0 +1,30 @@ +From 33015546c62a7b73793d62983a84b097362cec1a Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Mon, 19 Aug 2024 12:46:36 +0000 +Subject: [PATCH 09/20] config: add missing header for libc++ after + 92744b5b9aa3 (#7403) + +In file included from src/pch/pch.hpp:1: +In file included from src/Compositor.hpp:11: +src/config/ConfigManager.hpp:147:10: error: no template named 'variant' in namespace 'std' + 147 | std::variant data; + | ~~~~~^ +--- + src/config/ConfigManager.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp +index 4241031b..4d087753 100644 +--- a/src/config/ConfigManager.hpp ++++ b/src/config/ConfigManager.hpp +@@ -6,6 +6,7 @@ + #include "../debug/Log.hpp" + #include + #include "../defines.hpp" ++#include + #include + #include + #include +-- +2.45.2 + diff --git a/hosts/callisto/0010-examples-more-systemd-examples-7409.patch b/hosts/callisto/0010-examples-more-systemd-examples-7409.patch new file mode 100644 index 0000000..66bc866 --- /dev/null +++ b/hosts/callisto/0010-examples-more-systemd-examples-7409.patch @@ -0,0 +1,49 @@ +From 01e3da4d51927427860368c88a523f47c479b710 Mon Sep 17 00:00:00 2001 +From: JL2210 +Date: Mon, 19 Aug 2024 09:02:09 -0400 +Subject: [PATCH 10/20] examples: more systemd examples (#7409) + +These allow launching hyprland with a systemd service. They provide +graphical-session.target which allows enabling services such as the +ones for Waybar and Mako. +--- + example/hyprland-session.service | 14 ++++++++++++++ + example/hyprland-systemd.desktop | 5 +++++ + 2 files changed, 19 insertions(+) + create mode 100644 example/hyprland-session.service + create mode 100644 example/hyprland-systemd.desktop + +diff --git a/example/hyprland-session.service b/example/hyprland-session.service +new file mode 100644 +index 00000000..7d33f5b3 +--- /dev/null ++++ b/example/hyprland-session.service +@@ -0,0 +1,14 @@ ++[Unit] ++Description=Hyprland - Tiling compositor with the looks ++Documentation=man:Hyprland(1) ++BindsTo=graphical-session.target ++Before=graphical-session.target ++Wants=graphical-session-pre.target ++After=graphical-session-pre.target ++ ++[Service] ++Type=notify ++ExecStart=/usr/bin/Hyprland ++ExecStop=/usr/bin/hyprctl dispatch exit ++Restart=on-failure ++Slice=session.slice +diff --git a/example/hyprland-systemd.desktop b/example/hyprland-systemd.desktop +new file mode 100644 +index 00000000..b36a87b2 +--- /dev/null ++++ b/example/hyprland-systemd.desktop +@@ -0,0 +1,5 @@ ++[Desktop Entry] ++Name=Hyprland ++Comment=An intelligent dynamic tiling Wayland compositor ++Exec=systemctl --user start --wait hyprland-session ++Type=Application +-- +2.45.2 + diff --git a/hosts/callisto/0011-monitors-avoid-crash-on-wayland-output-removal.patch b/hosts/callisto/0011-monitors-avoid-crash-on-wayland-output-removal.patch new file mode 100644 index 0000000..0a4350a --- /dev/null +++ b/hosts/callisto/0011-monitors-avoid-crash-on-wayland-output-removal.patch @@ -0,0 +1,25 @@ +From 272d9048706379201b761c3159c24a20cd62fad1 Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Mon, 19 Aug 2024 18:36:06 +0200 +Subject: [PATCH 11/20] monitors: avoid crash on wayland output removal + +--- + src/events/Monitors.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp +index b2778062..60fb5bef 100644 +--- a/src/events/Monitors.cpp ++++ b/src/events/Monitors.cpp +@@ -98,7 +98,7 @@ void Events::listener_monitorDestroy(void* owner, void* data) { + if (!pMonitor) + return; + +- Debug::log(LOG, "Destroy called for monitor {}", pMonitor->output->name); ++ Debug::log(LOG, "Destroy called for monitor {}", pMonitor->szName); + + pMonitor->onDisconnect(true); + +-- +2.45.2 + diff --git a/hosts/callisto/0012-monitor-avoid-dangling-references-to-old-monitors-be.patch b/hosts/callisto/0012-monitor-avoid-dangling-references-to-old-monitors-be.patch new file mode 100644 index 0000000..71d818e --- /dev/null +++ b/hosts/callisto/0012-monitor-avoid-dangling-references-to-old-monitors-be.patch @@ -0,0 +1,146 @@ +From c86db7bbb0cf14d4955ee3a4d13c0ed9f8a0e0ae Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Mon, 19 Aug 2024 18:44:22 +0200 +Subject: [PATCH 12/20] monitor: avoid dangling references to old monitors + being undestroyed + +ref #7414 +--- + src/Compositor.cpp | 3 +-- + src/events/Events.hpp | 1 - + src/events/Monitors.cpp | 25 ------------------------- + src/helpers/Monitor.cpp | 21 +++++++++++++++++---- + src/helpers/Monitor.hpp | 2 +- + 5 files changed, 19 insertions(+), 33 deletions(-) + +diff --git a/src/Compositor.cpp b/src/Compositor.cpp +index 1437a653..75c22743 100644 +--- a/src/Compositor.cpp ++++ b/src/Compositor.cpp +@@ -2935,7 +2935,7 @@ PHLWINDOW CCompositor::windowForCPointer(CWindow* pWindow) { + + void CCompositor::onNewMonitor(SP output) { + // add it to real +- auto PNEWMONITOR = g_pCompositor->m_vRealMonitors.emplace_back(makeShared()); ++ auto PNEWMONITOR = g_pCompositor->m_vRealMonitors.emplace_back(makeShared(output)); + if (std::string("HEADLESS-1") == output->name) { + g_pCompositor->m_pUnsafeOutput = PNEWMONITOR.get(); + output->name = "FALLBACK"; // we are allowed to do this :) +@@ -2944,7 +2944,6 @@ void CCompositor::onNewMonitor(SP output) { + Debug::log(LOG, "New output with name {}", output->name); + + PNEWMONITOR->szName = output->name; +- PNEWMONITOR->output = output; + PNEWMONITOR->self = PNEWMONITOR; + const bool FALLBACK = g_pCompositor->m_pUnsafeOutput ? output == g_pCompositor->m_pUnsafeOutput->output : false; + PNEWMONITOR->ID = FALLBACK ? MONITOR_INVALID : g_pCompositor->getNextAvailableMonitorID(output->name); +diff --git a/src/events/Events.hpp b/src/events/Events.hpp +index 8e73f54a..0af16f64 100644 +--- a/src/events/Events.hpp ++++ b/src/events/Events.hpp +@@ -27,7 +27,6 @@ namespace Events { + + // Monitor part 2 the sequel + DYNLISTENFUNC(monitorFrame); +- DYNLISTENFUNC(monitorDestroy); + DYNLISTENFUNC(monitorStateRequest); + DYNLISTENFUNC(monitorDamage); + DYNLISTENFUNC(monitorNeedsFrame); +diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp +index 60fb5bef..9d2210f6 100644 +--- a/src/events/Monitors.cpp ++++ b/src/events/Monitors.cpp +@@ -85,31 +85,6 @@ void Events::listener_monitorFrame(void* owner, void* data) { + } + } + +-void Events::listener_monitorDestroy(void* owner, void* data) { +- CMonitor* pMonitor = (CMonitor*)owner; +- +- for (auto& m : g_pCompositor->m_vRealMonitors) { +- if (m->output == pMonitor->output) { +- pMonitor = m.get(); +- break; +- } +- } +- +- if (!pMonitor) +- return; +- +- Debug::log(LOG, "Destroy called for monitor {}", pMonitor->szName); +- +- pMonitor->onDisconnect(true); +- +- pMonitor->output = nullptr; +- pMonitor->m_bRenderingInitPassed = false; +- +- Debug::log(LOG, "Removing monitor {} from realMonitors", pMonitor->szName); +- +- std::erase_if(g_pCompositor->m_vRealMonitors, [&](SP& el) { return el.get() == pMonitor; }); +-} +- + void Events::listener_monitorNeedsFrame(void* owner, void* data) { + const auto PMONITOR = (CMonitor*)owner; + +diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp +index 9542d2c4..2c6282e1 100644 +--- a/src/helpers/Monitor.cpp ++++ b/src/helpers/Monitor.cpp +@@ -25,7 +25,7 @@ int ratHandler(void* data) { + return 1; + } + +-CMonitor::CMonitor() : state(this) { ++CMonitor::CMonitor(SP output_) : state(this), output(output_) { + ; + } + +@@ -40,16 +40,29 @@ void CMonitor::onConnect(bool noRule) { + outTimeline = CSyncTimeline::create(output->getBackend()->drmFD()); + } + +- listeners.frame = output->events.frame.registerListener([this](std::any d) { Events::listener_monitorFrame(this, nullptr); }); +- listeners.destroy = output->events.destroy.registerListener([this](std::any d) { Events::listener_monitorDestroy(this, nullptr); }); +- listeners.commit = output->events.commit.registerListener([this](std::any d) { Events::listener_monitorCommit(this, nullptr); }); ++ listeners.frame = output->events.frame.registerListener([this](std::any d) { Events::listener_monitorFrame(this, nullptr); }); ++ listeners.commit = output->events.commit.registerListener([this](std::any d) { Events::listener_monitorCommit(this, nullptr); }); + listeners.needsFrame = + output->events.needsFrame.registerListener([this](std::any d) { g_pCompositor->scheduleFrameForMonitor(this, Aquamarine::IOutput::AQ_SCHEDULE_NEEDS_FRAME); }); ++ + listeners.presented = output->events.present.registerListener([this](std::any d) { + auto E = std::any_cast(d); + PROTO::presentation->onPresented(this, E.when, E.refresh, E.seq, E.flags); + }); + ++ listeners.destroy = output->events.destroy.registerListener([this](std::any d) { ++ Debug::log(LOG, "Destroy called for monitor {}", szName); ++ ++ onDisconnect(true); ++ ++ output = nullptr; ++ m_bRenderingInitPassed = false; ++ ++ Debug::log(LOG, "Removing monitor {} from realMonitors", szName); ++ ++ std::erase_if(g_pCompositor->m_vRealMonitors, [&](SP& el) { return el.get() == this; }); ++ }); ++ + listeners.state = output->events.state.registerListener([this](std::any d) { + auto E = std::any_cast(d); + +diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp +index dcfcb63b..01a5d28d 100644 +--- a/src/helpers/Monitor.hpp ++++ b/src/helpers/Monitor.hpp +@@ -59,7 +59,7 @@ class CMonitorState { + + class CMonitor { + public: +- CMonitor(); ++ CMonitor(SP output); + ~CMonitor(); + + Vector2D vecPosition = Vector2D(-1, -1); // means unset +-- +2.45.2 + diff --git a/hosts/callisto/0013-example-config-fix-typo-in-default-config-7446.patch b/hosts/callisto/0013-example-config-fix-typo-in-default-config-7446.patch new file mode 100644 index 0000000..d4f8796 --- /dev/null +++ b/hosts/callisto/0013-example-config-fix-typo-in-default-config-7446.patch @@ -0,0 +1,50 @@ +From 4eff224a7f6f4baa5600f687d6f2ef4ad8340ad3 Mon Sep 17 00:00:00 2001 +From: Ali Atashrooz +Date: Wed, 21 Aug 2024 13:54:02 +0330 +Subject: [PATCH 13/20] example/config: fix typo in default config (#7446) + +* Update hyprland.conf + +* Update defaultConfig.hpp +--- + example/hyprland.conf | 6 +++--- + src/config/defaultConfig.hpp | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/example/hyprland.conf b/example/hyprland.conf +index f69309c2..d55d25fd 100644 +--- a/example/hyprland.conf ++++ b/example/hyprland.conf +@@ -169,9 +169,9 @@ device { + } + + +-#################### +-### KEYBINDINGSS ### +-#################### ++################### ++### KEYBINDINGS ### ++################### + + # See https://wiki.hyprland.org/Configuring/Keywords/ + $mainMod = SUPER # Sets "Windows" key as main modifier +diff --git a/src/config/defaultConfig.hpp b/src/config/defaultConfig.hpp +index 98b617d0..59265fee 100644 +--- a/src/config/defaultConfig.hpp ++++ b/src/config/defaultConfig.hpp +@@ -182,9 +182,9 @@ device { + } + + +-#################### +-### KEYBINDINGSS ### +-#################### ++################### ++### KEYBINDINGS ### ++################### + + # See https://wiki.hyprland.org/Configuring/Keywords/ + $mainMod = SUPER # Sets "Windows" key as main modifier +-- +2.45.2 + diff --git a/hosts/callisto/0014-core-add-option-to-control-which-window-to-focus-on-.patch b/hosts/callisto/0014-core-add-option-to-control-which-window-to-focus-on-.patch new file mode 100644 index 0000000..87f66a7 --- /dev/null +++ b/hosts/callisto/0014-core-add-option-to-control-which-window-to-focus-on-.patch @@ -0,0 +1,70 @@ +From 946ed1f32ae8e3840d1b3bb04c6e048ca7501fba Mon Sep 17 00:00:00 2001 +From: ParaN3xus <136563585+ParaN3xus@users.noreply.github.com> +Date: Wed, 21 Aug 2024 18:24:42 +0800 +Subject: [PATCH 14/20] core: add option to control which window to focus on + close (#7368) + +--- + src/config/ConfigDescriptions.hpp | 9 ++++++++- + src/config/ConfigManager.cpp | 1 + + src/events/Windows.cpp | 7 ++++++- + 3 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp +index 3c830132..73b995ae 100644 +--- a/src/config/ConfigDescriptions.hpp ++++ b/src/config/ConfigDescriptions.hpp +@@ -453,6 +453,13 @@ inline static const std::vector CONFIG_OPTIONS = { + .type = CONFIG_OPTION_INT, + .data = SConfigOptionDescription::SRangeData{1, 0, 3}, + }, ++ SConfigOptionDescription{ ++ .value = "input:focus_on_close", ++ .description = "Controls the window focus behavior when a window is closed. When set to 0, focus will shift to the next window candidate. When set to 1, focus will shift " ++ "to the window under the cursor.", ++ .type = CONFIG_OPTION_CHOICE, ++ .data = SConfigOptionDescription::SChoiceData{0, "next,cursor"}, ++ }, + SConfigOptionDescription{ + .value = "input:mouse_refocus", + .description = "if disabled, mouse focus won't switch to the hovered window unless the mouse crosses a window boundary when follow_mouse=1.", +@@ -1341,4 +1348,4 @@ inline static const std::vector CONFIG_OPTIONS = { + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{true}, + }, +-}; +\ No newline at end of file ++}; +diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp +index 1856bd49..155b75d3 100644 +--- a/src/config/ConfigManager.cpp ++++ b/src/config/ConfigManager.cpp +@@ -449,6 +449,7 @@ CConfigManager::CConfigManager() { + m_pConfig->addConfigValue("animations:first_launch_animation", Hyprlang::INT{1}); + + m_pConfig->addConfigValue("input:follow_mouse", Hyprlang::INT{1}); ++ m_pConfig->addConfigValue("input:focus_on_close", Hyprlang::INT{0}); + m_pConfig->addConfigValue("input:mouse_refocus", Hyprlang::INT{1}); + m_pConfig->addConfigValue("input:special_fallthrough", Hyprlang::INT{0}); + m_pConfig->addConfigValue("input:off_window_axis_events", Hyprlang::INT{1}); +diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp +index 2eb7038f..e4e3900b 100644 +--- a/src/events/Windows.cpp ++++ b/src/events/Windows.cpp +@@ -648,7 +648,12 @@ void Events::listener_unmapWindow(void* owner, void* data) { + + // refocus on a new window if needed + if (wasLastWindow) { +- const auto PWINDOWCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(PWINDOW); ++ static auto FOCUSONCLOSE = CConfigValue("input:focus_on_close"); ++ PHLWINDOW PWINDOWCANDIDATE = nullptr; ++ if (*FOCUSONCLOSE) ++ PWINDOWCANDIDATE = (g_pCompositor->vectorToWindowUnified(g_pInputManager->getMouseCoordsInternal(), RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING)); ++ else ++ PWINDOWCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(PWINDOW); + + Debug::log(LOG, "On closed window, new focused candidate is {}", PWINDOWCANDIDATE); + +-- +2.45.2 + diff --git a/hosts/callisto/0015-output-dont-cast-enum-out-of-range-7448.patch b/hosts/callisto/0015-output-dont-cast-enum-out-of-range-7448.patch new file mode 100644 index 0000000..3a5a041 --- /dev/null +++ b/hosts/callisto/0015-output-dont-cast-enum-out-of-range-7448.patch @@ -0,0 +1,27 @@ +From 3e7325af57c4670ebea65d2669f49526819c2260 Mon Sep 17 00:00:00 2001 +From: Tom Englund +Date: Wed, 21 Aug 2024 12:52:40 +0200 +Subject: [PATCH 15/20] output: dont cast enum out of range (#7448) + +avoid casting non typed enum out of range, looks like +WL_OUTPUT_MODE_CURRENT was the intention here. +--- + src/protocols/core/Output.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/protocols/core/Output.cpp b/src/protocols/core/Output.cpp +index 878d1484..8d0b0121 100644 +--- a/src/protocols/core/Output.cpp ++++ b/src/protocols/core/Output.cpp +@@ -55,7 +55,7 @@ void CWLOutputResource::updateState() { + if (resource->version() >= 2) + resource->sendScale(std::ceil(monitor->scale)); + +- resource->sendMode((wl_output_mode)(WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED), monitor->vecPixelSize.x, monitor->vecPixelSize.y, monitor->refreshRate * 1000.0); ++ resource->sendMode((wl_output_mode)(WL_OUTPUT_MODE_CURRENT), monitor->vecPixelSize.x, monitor->vecPixelSize.y, monitor->refreshRate * 1000.0); + + if (resource->version() >= 2) + resource->sendDone(); +-- +2.45.2 + diff --git a/hosts/callisto/0016-animations-add-workspace-in-out-configs.patch b/hosts/callisto/0016-animations-add-workspace-in-out-configs.patch new file mode 100644 index 0000000..154fe07 --- /dev/null +++ b/hosts/callisto/0016-animations-add-workspace-in-out-configs.patch @@ -0,0 +1,96 @@ +From 883463f9dd7f1cdc68c3e32017c0a71ccbe39b26 Mon Sep 17 00:00:00 2001 +From: vaxerski +Date: Wed, 21 Aug 2024 14:37:50 +0200 +Subject: [PATCH 16/20] animations: add workspace in/out configs + +--- + src/config/ConfigManager.cpp | 10 +++++++++- + src/desktop/Workspace.cpp | 12 ++++++++++-- + src/managers/AnimationManager.cpp | 2 +- + 3 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp +index 155b75d3..e2ae2c47 100644 +--- a/src/config/ConfigManager.cpp ++++ b/src/config/ConfigManager.cpp +@@ -724,7 +724,6 @@ void CConfigManager::setDefaultAnimationVars() { + INITANIMCFG("fade"); + INITANIMCFG("border"); + INITANIMCFG("borderangle"); +- INITANIMCFG("workspaces"); + + // windows + INITANIMCFG("windowsIn"); +@@ -745,7 +744,12 @@ void CConfigManager::setDefaultAnimationVars() { + // border + + // workspaces ++ INITANIMCFG("workspaces"); ++ INITANIMCFG("workspacesIn"); ++ INITANIMCFG("workspacesOut"); + INITANIMCFG("specialWorkspace"); ++ INITANIMCFG("specialWorkspaceIn"); ++ INITANIMCFG("specialWorkspaceOut"); + } + + // init the values +@@ -774,7 +778,11 @@ void CConfigManager::setDefaultAnimationVars() { + CREATEANIMCFG("fadeLayersIn", "fadeLayers"); + CREATEANIMCFG("fadeLayersOut", "fadeLayers"); + ++ CREATEANIMCFG("workspacesIn", "workspaces"); ++ CREATEANIMCFG("workspacesOut", "workspaces"); + CREATEANIMCFG("specialWorkspace", "workspaces"); ++ CREATEANIMCFG("specialWorkspaceIn", "specialWorkspace"); ++ CREATEANIMCFG("specialWorkspaceOut", "specialWorkspace"); + } + + std::optional CConfigManager::resetHLConfig() { +diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp +index d9ac7927..a9412e6d 100644 +--- a/src/desktop/Workspace.cpp ++++ b/src/desktop/Workspace.cpp +@@ -22,10 +22,11 @@ CWorkspace::CWorkspace(WORKSPACEID id, MONITORID monitorID, std::string name, bo + void CWorkspace::init(PHLWORKSPACE self) { + m_pSelf = self; + +- m_vRenderOffset.create(m_bIsSpecialWorkspace ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspace") : g_pConfigManager->getAnimationPropertyConfig("workspaces"), ++ m_vRenderOffset.create(m_bIsSpecialWorkspace ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspaceIn") : ++ g_pConfigManager->getAnimationPropertyConfig("workspacesIn"), + self, AVARDAMAGE_ENTIRE); + m_fAlpha.create(AVARTYPE_FLOAT, +- m_bIsSpecialWorkspace ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspace") : g_pConfigManager->getAnimationPropertyConfig("workspaces"), self, ++ m_bIsSpecialWorkspace ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspaceIn") : g_pConfigManager->getAnimationPropertyConfig("workspacesIn"), self, + AVARDAMAGE_ENTIRE); + m_fAlpha.setValueAndWarp(1.f); + +@@ -81,6 +82,13 @@ CWorkspace::~CWorkspace() { + } + + void CWorkspace::startAnim(bool in, bool left, bool instant) { ++ if (!instant) { ++ const std::string ANIMNAME = std::format("{}{}", m_bIsSpecialWorkspace ? "specialWorkspace" : "workspaces", in ? "In" : "Out"); ++ ++ m_fAlpha.m_pConfig = g_pConfigManager->getAnimationPropertyConfig(ANIMNAME); ++ m_vRenderOffset.m_pConfig = g_pConfigManager->getAnimationPropertyConfig(ANIMNAME); ++ } ++ + const auto ANIMSTYLE = m_fAlpha.m_pConfig->pValues->internalStyle; + static auto PWORKSPACEGAP = CConfigValue("general:gaps_workspaces"); + +diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp +index dcc7a45f..beb880be 100644 +--- a/src/managers/AnimationManager.cpp ++++ b/src/managers/AnimationManager.cpp +@@ -471,7 +471,7 @@ std::string CAnimationManager::styleValidInConfigVar(const std::string& config, + } + + return "unknown style"; +- } else if (config == "workspaces" || config == "specialWorkspace") { ++ } else if (config.starts_with("workspaces") || config.starts_with("specialWorkspace")) { + if (style == "slide" || style == "slidevert" || style == "fade") + return ""; + else if (style.starts_with("slidefade")) { +-- +2.45.2 + diff --git a/hosts/callisto/0017-Nix-include-xcursor-regardless-of-xwayland.patch b/hosts/callisto/0017-Nix-include-xcursor-regardless-of-xwayland.patch new file mode 100644 index 0000000..46f91d4 --- /dev/null +++ b/hosts/callisto/0017-Nix-include-xcursor-regardless-of-xwayland.patch @@ -0,0 +1,29 @@ +From 1b1ecf77e0c195460eb5335652d65de6fd83cf7b Mon Sep 17 00:00:00 2001 +From: Mihai Fufezan +Date: Wed, 21 Aug 2024 22:37:28 +0300 +Subject: [PATCH 17/20] Nix: include xcursor regardless of xwayland + +--- + nix/default.nix | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nix/default.nix b/nix/default.nix +index 9bae9d83..c8eaf731 100644 +--- a/nix/default.nix ++++ b/nix/default.nix +@@ -136,11 +136,11 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov + tomlplusplus + wayland + wayland-protocols ++ xorg.libXcursor + ] + (lib.optionals stdenv.hostPlatform.isMusl [libexecinfo]) + (lib.optionals enableXWayland [ + xorg.libxcb +- xorg.libXcursor + xorg.libXdmcp + xorg.xcbutil + xorg.xcbutilerrors +-- +2.45.2 + diff --git a/hosts/callisto/0018-Fix-static-asan-patch.patch b/hosts/callisto/0018-Fix-static-asan-patch.patch new file mode 100644 index 0000000..25c8c3e --- /dev/null +++ b/hosts/callisto/0018-Fix-static-asan-patch.patch @@ -0,0 +1,38 @@ +From c5786be695224c2d2771854436844b88a6b48fc5 Mon Sep 17 00:00:00 2001 +From: James R Larrowe +Date: Tue, 20 Aug 2024 13:36:41 -0400 +Subject: [PATCH 18/20] Fix static asan patch + +--- + scripts/hyprlandStaticAsan.diff | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/scripts/hyprlandStaticAsan.diff b/scripts/hyprlandStaticAsan.diff +index e74eb6ab..b352d65d 100644 +--- a/scripts/hyprlandStaticAsan.diff ++++ b/scripts/hyprlandStaticAsan.diff +@@ -1,13 +1,13 @@ + diff --git a/CMakeLists.txt b/CMakeLists.txt +-index f54cdf5d..ad7c3e73 100755 ++index f26a5c3c..3dfef333 100644 + --- a/CMakeLists.txt + +++ b/CMakeLists.txt +-@@ -130,6 +130,8 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) +- message(STATUS "Enabling ASan") ++@@ -143,6 +143,8 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) ++ message(STATUS "Enabling ASan") + +- target_link_libraries(Hyprland asan) +-+ pkg_check_modules(ffidep REQUIRED IMPORTED_TARGET libffi) +-+ target_link_libraries(Hyprland ${CMAKE_SOURCE_DIR}/libwayland-server.a PkgConfig::ffidep) +- target_compile_options(Hyprland PUBLIC -fsanitize=address) +- endif() ++ target_link_libraries(Hyprland asan) +++ pkg_check_modules(ffidep REQUIRED IMPORTED_TARGET libffi) +++ target_link_libraries(Hyprland ${CMAKE_SOURCE_DIR}/libwayland-server.a PkgConfig::ffidep) ++ target_compile_options(Hyprland PUBLIC -fsanitize=address) ++ endif() + +-- +2.45.2 + diff --git a/hosts/callisto/0019-Fix-Makefile-too.patch b/hosts/callisto/0019-Fix-Makefile-too.patch new file mode 100644 index 0000000..9f00c16 --- /dev/null +++ b/hosts/callisto/0019-Fix-Makefile-too.patch @@ -0,0 +1,28 @@ +From 8162fae37728b3ae2b1a82a32663e76c59c4ce61 Mon Sep 17 00:00:00 2001 +From: James R Larrowe +Date: Tue, 20 Aug 2024 13:54:51 -0400 +Subject: [PATCH 19/20] Fix Makefile too + +... did this ever work? +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index adf6fbe8..bc7b750b 100644 +--- a/Makefile ++++ b/Makefile +@@ -87,8 +87,8 @@ asan: + #git reset --hard + + @echo -en "If you want to apply a patch, input its path (leave empty for none):\n" +- @read patchvar +- @if [-n "$patchvar"]; then patch -p1 < $patchvar || echo ""; else echo "No patch specified"; fi ++ @read patchvar; \ ++ if [ -n "$$patchvar" ]; then patch -p1 < "$$patchvar" || echo ""; else echo "No patch specified"; fi + + git clone --recursive https://gitlab.freedesktop.org/wayland/wayland + cd wayland && patch -p1 < ../scripts/waylandStatic.diff && meson setup build --buildtype=debug -Db_sanitize=address -Ddocumentation=false && ninja -C build && cd .. +-- +2.45.2 + diff --git a/hosts/callisto/0020-layersurface-dont-rollover-on-size_t-7451.patch b/hosts/callisto/0020-layersurface-dont-rollover-on-size_t-7451.patch new file mode 100644 index 0000000..a9d552d --- /dev/null +++ b/hosts/callisto/0020-layersurface-dont-rollover-on-size_t-7451.patch @@ -0,0 +1,28 @@ +From cae937c51bd220d6676c6027d05ea51fc3c821bb Mon Sep 17 00:00:00 2001 +From: Tom Englund +Date: Wed, 21 Aug 2024 23:05:03 +0200 +Subject: [PATCH 20/20] layersurface: dont rollover on size_t (#7451) + +unneded rollover on size_t if force equals -1 +--- + src/desktop/LayerSurface.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp +index c352fa74..8fd448ef 100644 +--- a/src/desktop/LayerSurface.cpp ++++ b/src/desktop/LayerSurface.cpp +@@ -432,8 +432,8 @@ void CLayerSurface::startAnimation(bool in, bool instant) { + PMONITOR->vecPosition + Vector2D{PMONITOR->vecSize.x, PMONITOR->vecSize.y / 2}, + }; + +- float closest = std::numeric_limits::max(); +- size_t leader = force; ++ float closest = std::numeric_limits::max(); ++ int leader = force; + if (leader == -1) { + for (size_t i = 0; i < 4; ++i) { + float dist = MIDDLE.distance(edgePoints[i]); +-- +2.45.2 + diff --git a/hosts/callisto/configuration.nix b/hosts/callisto/configuration.nix index 14da7ab..7968a47 100755 --- a/hosts/callisto/configuration.nix +++ b/hosts/callisto/configuration.nix @@ -46,6 +46,25 @@ or [] ++ [ ./0001-linux-dmabuf-allow-on-split-node-systems.patch + ./0002-renderer-pass-custom-modelines-to-aq.patch + ./0003-compositor-update-suspendstate-on-window-move-7396.patch + ./0004-screencopy-nuke-unused-stuff.patch + ./0005-protocol-fix-logm-template-checks.patch + ./0006-screencopy-fix-10b-format-r-b-flip.patch + ./0007-flake-update-aquamarine.patch + ./0008-hyprpm-hyprctl-update-shell-completions.patch + ./0009-config-add-missing-header-for-libc-after-92744b5b9aa.patch + ./0010-examples-more-systemd-examples-7409.patch + ./0011-monitors-avoid-crash-on-wayland-output-removal.patch + ./0012-monitor-avoid-dangling-references-to-old-monitors-be.patch + ./0013-example-config-fix-typo-in-default-config-7446.patch + ./0014-core-add-option-to-control-which-window-to-focus-on-.patch + ./0015-output-dont-cast-enum-out-of-range-7448.patch + ./0016-animations-add-workspace-in-out-configs.patch + ./0017-Nix-include-xcursor-regardless-of-xwayland.patch + ./0018-Fix-static-asan-patch.patch + ./0019-Fix-Makefile-too.patch + ./0020-layersurface-dont-rollover-on-size_t-7451.patch ]; }); })