Git Product home page Git Product logo

hyprnstack's Introduction

hyprNStack

This plugin is a modified version of Hyprland's Master layout.

The primary change is that it allows an arbitrary number of non-master 'stacks'. This can be changed dynamically per-workspace.

The layout is sort of a combination of XMonad's 'MultiColumns' and Hyprland's Master layout.

Configuration

Default values are meant to produce a similar experience to the existing Master layout.

plugin {
  nstack {
    layout {
      orientation=left
      new_on_top=0
      new_is_master=1
      no_gaps_when_only=0
      special_scale_factor=0.8
      inherit_fullscreen=1
      stacks=2
      center_single_master=0
      mfact=0.5
      single_mfact=0.5
    }
  }
}

Configuration variable differences in comparison to Master Layout

  • stacks The number of total stacks, including the master.
  • mfact If this is set to 0 the master is the same size as the stacks. So if there is one master and 2 stacks they are all 1/3rd of the screen width(or height). Master and 3 stacks they are all 1/4th etc.
  • single_mfact The size of a single centered master window, when center_single_master is set.
  • center_single_master When there is a single window on the screen it is centered instead of taking up the entire monitor. This replaces the existing always_center_master and has slightly different behavior.

Workspace layout options

All configuration variables are also usable as workspace rule layout options. Just prefix the setting name with 'nstack-' workspace=2,layoutopt:nstack-stacks:2,layoutopt:nstack-single_mfact:0.85

Dispatchers

Two new dispatchers

  • resetsplits Reset all the window splits to default sizes.
  • setstackcount Change the number of stacks for the current workspace. Windows will be re-tiled to fit the new stack count.

Two new-ish orientations

  • orientationhcenter Master is horizontally centered with stacks to the left and right.
  • orientationvcenter Master is vertically centered with stacks on the top and bottom.
  • orientationcenter An alias for orientationhcenter

Installing

Hyprpm, Hyprland's official plugin manager (recommended)

  1. Run hyprpm add https://github.com/zakk4223/hyprNStack and wait for hyprpm to build the plugin.
  2. Run hyprpm enable hyprNStack
  3. Set your hyprland layout to nstack.

Manual

Hyprland plugins basically have to be user-compiled and loaded. You probably need to compile and install hyprland yourself (if not using a package that exports the headers, e.g. the one on Arch's official repos).

If your package does not export headers, see the this part of the hyprland wiki

Then:

  1. Build hyprNStack
    • make
  2. Copy the resulting nstackLayoutPlugin.so to some place
    • cp nstackLayoutPlugin.so ~/.config/hypr/plugins
  3. Modify your hyprland.conf to load the plugin
    • exec-once=hyprctl plugin load $HOME/.config/hypr/plugins/nstackLayoutPlugin.so
  4. Set your hyprland layout to nstack.

Plugin-Manager Hyprload

Installing via hyprload is supported.

  1. Add the following to your hyprload.toml once hyprload is running:
plugins = [
    "zakk4223/hyprNStack",
    { local = "https://github.com/zakk4223/hyprNStack", branch = "main", name = "hyprNStack" },
]
  1. Reload/Update your plugins and set your hyprland layout to nstack.

TODO

  • Improve mouse resizing of stacks
  • Improve drag and drop rearranging of windows in and between stacks
  • Allow resizing of single master window

hyprnstack's People

Contributors

das-s avatar iynaix avatar mthlily avatar siriusstarr avatar vaxerski avatar zakk4223 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hyprnstack's Issues

Possibility to split master window

IEverything is working as expected. But I'm missing the feature that master stack cannot be split as the other stacks do. Is it possible to achieve a complete grid layout like whole evenly split windows?

My config:

plugin {
  nstack {
    layout {
      orientation=left
      new_on_top=0
      new_is_master=0
      no_gaps_when_only=-1
      special_scale_factor=0
      inherit_fullscreen=1
      stacks=4
      center_single_master=0
      mfact=0
      single_mfact=0
      orientationvcenter = bottom
    }
  }
}

[FEATURE] extra margin when only 2 windows

Hi there,

I use the layout with 3 nstack, like a centered master. It is very nice to be able to set the dimension of a window when is the only one in the workspace.

I was thinking about the fact that for large monitor like 21:9 or 32:9 would be cool to have a function like nstack-double_mfact for when there are 2 window so that the left and right space would be larger and the windows would be easier to see.

It is possibile to implement it?

Thanks for the awesome layout

Stefano

EDIT: add sketch for clarity

image

[BUG] hyprNStack failed to build

Plugin hyprNStack failed to build using hyperpm.

I am on vanilla arch. I have:

hyprcursor 0.1.8-1
hyprland 0.39.1-5
hyprlang 0.5.1-1
xdg-desktop-portal-hyprland 1.3.1-6

Error message is:

$ hyprpm add -v https://github.com/zakk4223/hyprNStack 
[v] version returned: Hyprland, built from branch  at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759  (props: bump version to 0.39.1).
Date: Tue Apr 16 16:01:03 2024
Tag: v0.39.1, commits: 4460

flags: (if any)


[v] parsed commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759 at branch  on Tue Apr 16 16:01:03 2024, commits 4460
✔ adding a new plugin repository from https://github.com/zakk4223/hyprNStack
  MAKE SURE that you trust the authors. DO NOT install random plugins without verifying the code and author.
  Are you sure? [Y/n] 

 → Cloning https://github.com/zakk4223/hyprNStack                                                                                                            
✔ cloned                                                                                                                                                     
✔ found hyprpm manifest                                                                                                                                      
✔ parsed manifest, found 1 plugins:                                                                                                                          
 → hyprNStack by Zakk version                                                                                                                                
 → Manifest has 7 pins, checking                                                                                                                             
✔ Hyprland headers OK                                                                                                                                        
 → Building hyprNStack                                                                                                                                       
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━  3 / 5  Building plugin(s)[v] shell returned:  -> cd /tmp/hyprpm/new && PKG_CONFIG_PATH="/home/user/.local/share/hyprpm/headersRoot/share/pkgconfig" make all
g++ -DWLR_USE_UNSTABLE -shared -fPIC --no-gnu-unique main.cpp nstackLayout.cpp -o nstackLayoutPlugin.so -g `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++2b
In file included from main.cpp:5:
nstackLayout.hpp:30:5: error: ‘PHLWINDOWREF’ does not name a type
   30 |     PHLWINDOWREF pWindow;
      |     ^~~~~~~~~~~~
nstackLayout.hpp: In member function ‘bool SNstackNodeData::operator==(const SNstackNodeData&) const’:
nstackLayout.hpp:41:16: error: ‘pWindow’ was not declared in this scope; did you mean ‘CWindow’?
   41 |         return pWindow.lock() == rhs.pWindow.lock();
      |                ^~~~~~~
      |                CWindow
nstackLayout.hpp:41:38: error: ‘const struct SNstackNodeData’ has no member named ‘pWindow’
   41 |         return pWindow.lock() == rhs.pWindow.lock();
      |                                      ^~~~~~~
nstackLayout.hpp: At global scope:
nstackLayout.hpp:67:60: error: ‘PHLWINDOW’ has not been declared
   67 |     virtual void                     onWindowCreatedTiling(PHLWINDOW, eDirection direction = DIRECTION_DEFAULT);
      |                                                            ^~~~~~~~~
nstackLayout.hpp:68:60: error: ‘PHLWINDOW’ has not been declared
   68 |     virtual void                     onWindowRemovedTiling(PHLWINDOW);
      |                                                            ^~~~~~~~~
nstackLayout.hpp:69:52: error: ‘PHLWINDOW’ has not been declared
   69 |     virtual bool                     isWindowTiled(PHLWINDOW);
      |                                                    ^~~~~~~~~
nstackLayout.hpp:71:56: error: ‘PHLWINDOW’ has not been declared
   71 |     virtual void                     recalculateWindow(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.hpp:72:94: error: ‘PHLWINDOW’ has not been declared
   72 |     virtual void                     resizeActiveWindow(const Vector2D&, eRectCorner corner, PHLWINDOW pWindow = nullptr);
      |                                                                                              ^~~~~~~~~
nstackLayout.hpp:73:65: error: ‘PHLWINDOW’ has not been declared
   73 |     virtual void                     fullscreenRequestForWindow(PHLWINDOW, eFullscreenMode, bool);
      |                                                                 ^~~~~~~~~
nstackLayout.hpp:75:57: error: ‘PHLWINDOW’ has not been declared
   75 |     virtual SWindowRenderLayoutHints requestRenderHints(PHLWINDOW);
      |                                                         ^~~~~~~~~
nstackLayout.hpp:76:52: error: ‘PHLWINDOW’ has not been declared
   76 |     virtual void                     switchWindows(PHLWINDOW, PHLWINDOW);
      |                                                    ^~~~~~~~~
nstackLayout.hpp:76:63: error: ‘PHLWINDOW’ has not been declared
   76 |     virtual void                     switchWindows(PHLWINDOW, PHLWINDOW);
      |                                                               ^~~~~~~~~
nstackLayout.hpp:77:119: error: ‘PHLWINDOW’ has not been declared
   77 |                 virtual void                                                                             moveWindowTo(PHLWINDOW, const std::string& dir, bool silent);
      |                                                                                                                       ^~~~~~~~~
nstackLayout.hpp:78:54: error: ‘PHLWINDOW’ has not been declared
   78 |     virtual void                     alterSplitRatio(PHLWINDOW, float, bool);
      |                                                      ^~~~~~~~~
nstackLayout.hpp:80:60: error: ‘PHLWINDOW’ has not been declared
   80 |     virtual void                     replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to);
      |                                                            ^~~~~~~~~
nstackLayout.hpp:80:76: error: ‘PHLWINDOW’ has not been declared
   80 |     virtual void                     replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to);
      |                                                                            ^~~~~~~~~
nstackLayout.hpp:99:57: error: ‘PHLWINDOW’ has not been declared
   99 |     SNstackNodeData*                  getNodeFromWindow(PHLWINDOW);
      |                                                         ^~~~~~~~~
nstackLayout.hpp:103:5: error: ‘PHLWINDOW’ does not name a type
  103 |     PHLWINDOW                          getNextWindow(PHLWINDOW, bool);
      |     ^~~~~~~~~
nstackLayout.hpp:105:56: error: ‘PHLWINDOW’ has not been declared
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.hpp:106:55: error: ‘PHLWINDOW’ has not been declared
  106 |     void                              prepareNewFocus(PHLWINDOW, bool inherit_fullscreen);
      |                                                       ^~~~~~~~~
nstackLayout.hpp:72:114: error: could not convert ‘nullptr’ from ‘std::nullptr_t’ to ‘int’
   72 |     virtual void                     resizeActiveWindow(const Vector2D&, eRectCorner corner, PHLWINDOW pWindow = nullptr);
      |                                                                                                                  ^~~~~~~
      |                                                                                                                  |
      |                                                                                                                  std::nullptr_t
nstackLayout.hpp: In member function ‘auto std::formatter<SNstackNodeData*, CharT>::format(const SNstackNodeData* const&, FormatContext&) const’:
nstackLayout.hpp:123:20: error: ‘const struct SNstackNodeData’ has no member named ‘pWindow’
  123 |         if (!node->pWindow.expired())
      |                    ^~~~~~~
nstackLayout.hpp:124:57: error: ‘const struct SNstackNodeData’ has no member named ‘pWindow’
  124 |             std::format_to(out, ", window: {:x}", node->pWindow.lock());
      |                                                         ^~~~~~~
In file included from /usr/include/c++/13.2.1/memory:78,
                 from /home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/HookSystem.hpp:5,
                 from /home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:24,
                 from globals.hpp:3,
                 from main.cpp:1:
/usr/include/c++/13.2.1/bits/unique_ptr.h: In instantiation of ‘constexpr std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = CHyprNstackLayout; _Args = {}; __detail::__unique_ptr_t<_Tp> = __detail::__unique_ptr_t<CHyprNstackLayout>]’:
main.cpp:41:58:   required from here
/usr/include/c++/13.2.1/bits/unique_ptr.h:1070:30: error: invalid new-expression of abstract class type ‘CHyprNstackLayout’
 1070 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nstackLayout.hpp:65:7: note:   because the following virtual functions are pure within ‘CHyprNstackLayout’:
   65 | class CHyprNstackLayout : public IHyprLayout {
      |       ^~~~~~~~~~~~~~~~~
In file included from nstackLayout.hpp:5:
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:48:18: note:     ‘virtual void IHyprLayout::onWindowCreatedTiling(CWindow*, eDirection)’
   48 |     virtual void onWindowCreatedTiling(CWindow*, eDirection direction = DIRECTION_DEFAULT) = 0;
      |                  ^~~~~~~~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:54:18: note:     ‘virtual bool IHyprLayout::isWindowTiled(CWindow*)’
   54 |     virtual bool isWindowTiled(CWindow*) = 0;
      |                  ^~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:60:18: note:     ‘virtual void IHyprLayout::onWindowRemovedTiling(CWindow*)’
   60 |     virtual void onWindowRemovedTiling(CWindow*) = 0;
      |                  ^~~~~~~~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:72:18: note:     ‘virtual void IHyprLayout::recalculateWindow(CWindow*)’
   72 |     virtual void recalculateWindow(CWindow*) = 0;
      |                  ^~~~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:89:18: note:     ‘virtual void IHyprLayout::resizeActiveWindow(const Vector2D&, eRectCorner, CWindow*)’
   89 |     virtual void resizeActiveWindow(const Vector2D&, eRectCorner corner = CORNER_NONE, CWindow* pWindow = nullptr) = 0;
      |                  ^~~~~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:113:18: note:     ‘virtual void IHyprLayout::fullscreenRequestForWindow(CWindow*, eFullscreenMode, bool)’
  113 |     virtual void fullscreenRequestForWindow(CWindow*, eFullscreenMode, bool) = 0;
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:127:38: note:     ‘virtual SWindowRenderLayoutHints IHyprLayout::requestRenderHints(CWindow*)’
  127 |     virtual SWindowRenderLayoutHints requestRenderHints(CWindow*) = 0;
      |                                      ^~~~~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:133:18: note:     ‘virtual void IHyprLayout::switchWindows(CWindow*, CWindow*)’
  133 |     virtual void switchWindows(CWindow*, CWindow*) = 0;
      |                  ^~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:139:18: note:     ‘virtual void IHyprLayout::moveWindowTo(CWindow*, const std::string&)’
  139 |     virtual void moveWindowTo(CWindow*, const std::string& direction) = 0;
      |                  ^~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:145:18: note:     ‘virtual void IHyprLayout::alterSplitRatio(CWindow*, float, bool)’
  145 |     virtual void alterSplitRatio(CWindow*, float, bool exact = false) = 0;
      |                  ^~~~~~~~~~~~~~~
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/layout/IHyprLayout.hpp:165:18: note:     ‘virtual void IHyprLayout::replaceWindowDataWith(CWindow*, CWindow*)’
  165 |     virtual void replaceWindowDataWith(CWindow* from, CWindow* to) = 0;
      |                  ^~~~~~~~~~~~~~~~~~~~~
In file included from nstackLayout.cpp:1:
nstackLayout.hpp:30:5: error: ‘PHLWINDOWREF’ does not name a type
   30 |     PHLWINDOWREF pWindow;
      |     ^~~~~~~~~~~~
nstackLayout.hpp: In member function ‘bool SNstackNodeData::operator==(const SNstackNodeData&) const’:
nstackLayout.hpp:41:16: error: ‘pWindow’ was not declared in this scope; did you mean ‘CWindow’?
   41 |         return pWindow.lock() == rhs.pWindow.lock();
      |                ^~~~~~~
      |                CWindow
nstackLayout.hpp:41:38: error: ‘const struct SNstackNodeData’ has no member named ‘pWindow’
   41 |         return pWindow.lock() == rhs.pWindow.lock();
      |                                      ^~~~~~~
nstackLayout.hpp: At global scope:
nstackLayout.hpp:67:60: error: ‘PHLWINDOW’ has not been declared
   67 |     virtual void                     onWindowCreatedTiling(PHLWINDOW, eDirection direction = DIRECTION_DEFAULT);
      |                                                            ^~~~~~~~~
nstackLayout.hpp:68:60: error: ‘PHLWINDOW’ has not been declared
   68 |     virtual void                     onWindowRemovedTiling(PHLWINDOW);
      |                                                            ^~~~~~~~~
nstackLayout.hpp:69:52: error: ‘PHLWINDOW’ has not been declared
   69 |     virtual bool                     isWindowTiled(PHLWINDOW);
      |                                                    ^~~~~~~~~
nstackLayout.hpp:71:56: error: ‘PHLWINDOW’ has not been declared
   71 |     virtual void                     recalculateWindow(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.hpp:72:94: error: ‘PHLWINDOW’ has not been declared
   72 |     virtual void                     resizeActiveWindow(const Vector2D&, eRectCorner corner, PHLWINDOW pWindow = nullptr);
      |                                                                                              ^~~~~~~~~
nstackLayout.hpp:73:65: error: ‘PHLWINDOW’ has not been declared
   73 |     virtual void                     fullscreenRequestForWindow(PHLWINDOW, eFullscreenMode, bool);
      |                                                                 ^~~~~~~~~
nstackLayout.hpp:75:57: error: ‘PHLWINDOW’ has not been declared
   75 |     virtual SWindowRenderLayoutHints requestRenderHints(PHLWINDOW);
      |                                                         ^~~~~~~~~
nstackLayout.hpp:76:52: error: ‘PHLWINDOW’ has not been declared
   76 |     virtual void                     switchWindows(PHLWINDOW, PHLWINDOW);
      |                                                    ^~~~~~~~~
nstackLayout.hpp:76:63: error: ‘PHLWINDOW’ has not been declared
   76 |     virtual void                     switchWindows(PHLWINDOW, PHLWINDOW);
      |                                                               ^~~~~~~~~
nstackLayout.hpp:77:119: error: ‘PHLWINDOW’ has not been declared
   77 |                 virtual void                                                                             moveWindowTo(PHLWINDOW, const std::string& dir, bool silent);
      |                                                                                                                       ^~~~~~~~~
nstackLayout.hpp:78:54: error: ‘PHLWINDOW’ has not been declared
   78 |     virtual void                     alterSplitRatio(PHLWINDOW, float, bool);
      |                                                      ^~~~~~~~~
nstackLayout.hpp:80:60: error: ‘PHLWINDOW’ has not been declared
   80 |     virtual void                     replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to);
      |                                                            ^~~~~~~~~
nstackLayout.hpp:80:76: error: ‘PHLWINDOW’ has not been declared
   80 |     virtual void                     replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to);
      |                                                                            ^~~~~~~~~
nstackLayout.hpp:99:57: error: ‘PHLWINDOW’ has not been declared
   99 |     SNstackNodeData*                  getNodeFromWindow(PHLWINDOW);
      |                                                         ^~~~~~~~~
nstackLayout.hpp:103:5: error: ‘PHLWINDOW’ does not name a type
  103 |     PHLWINDOW                          getNextWindow(PHLWINDOW, bool);
      |     ^~~~~~~~~
nstackLayout.hpp:105:56: error: ‘PHLWINDOW’ has not been declared
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.hpp:106:55: error: ‘PHLWINDOW’ has not been declared
  106 |     void                              prepareNewFocus(PHLWINDOW, bool inherit_fullscreen);
      |                                                       ^~~~~~~~~
nstackLayout.hpp:72:114: error: could not convert ‘nullptr’ from ‘std::nullptr_t’ to ‘int’
   72 |     virtual void                     resizeActiveWindow(const Vector2D&, eRectCorner corner, PHLWINDOW pWindow = nullptr);
      |                                                                                                                  ^~~~~~~
      |                                                                                                                  |
      |                                                                                                                  std::nullptr_t
nstackLayout.hpp: In member function ‘auto std::formatter<SNstackNodeData*, CharT>::format(const SNstackNodeData* const&, FormatContext&) const’:
nstackLayout.hpp:123:20: error: ‘const struct SNstackNodeData’ has no member named ‘pWindow’
  123 |         if (!node->pWindow.expired())
      |                    ^~~~~~~
nstackLayout.hpp:124:57: error: ‘const struct SNstackNodeData’ has no member named ‘pWindow’
  124 |             std::format_to(out, ", window: {:x}", node->pWindow.lock());
      |                                                         ^~~~~~~
nstackLayout.cpp: At global scope:
nstackLayout.cpp:10:18: error: ‘SNstackNodeData* CHyprNstackLayout::getNodeFromWindow’ is not a static data member of ‘class CHyprNstackLayout’
   10 | SNstackNodeData* CHyprNstackLayout::getNodeFromWindow(PHLWINDOW pWindow) {
      |                  ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:10:55: error: ‘PHLWINDOW’ was not declared in this scope
   10 | SNstackNodeData* CHyprNstackLayout::getNodeFromWindow(PHLWINDOW pWindow) {
      |                                                       ^~~~~~~~~
nstackLayout.cpp:195:6: error: variable or field ‘onWindowCreatedTiling’ declared void
  195 | void CHyprNstackLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection direction) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:195:47: error: ‘PHLWINDOW’ was not declared in this scope
  195 | void CHyprNstackLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection direction) {
      |                                               ^~~~~~~~~
nstackLayout.cpp:195:77: error: expected primary-expression before ‘direction’
  195 | void CHyprNstackLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection direction) {
      |                                                                             ^~~~~~~~~
nstackLayout.cpp:292:6: error: variable or field ‘onWindowRemovedTiling’ declared void
  292 | void CHyprNstackLayout::onWindowRemovedTiling(PHLWINDOW pWindow) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:292:47: error: ‘PHLWINDOW’ was not declared in this scope
  292 | void CHyprNstackLayout::onWindowRemovedTiling(PHLWINDOW pWindow) {
      |                                               ^~~~~~~~~
nstackLayout.cpp: In member function ‘virtual void CHyprNstackLayout::recalculateMonitor(const int&)’:
nstackLayout.cpp:356:18: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
  356 |         fakeNode.pWindow         = PFULLWINDOW;
      |                  ^~~~~~~
nstackLayout.cpp: In member function ‘void CHyprNstackLayout::applyNodeDataToWindow(SNstackNodeData*)’:
nstackLayout.cpp:642:33: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
  642 |     const auto PWINDOW = pNode->pWindow.lock();
      |                                 ^~~~~~~
nstackLayout.cpp:667:10: error: ‘validMapped’ was not declared in this scope
  667 |     if (!validMapped(PWINDOW)) {
      |          ^~~~~~~~~~~
nstackLayout.cpp:715:159: error: could not convert ‘{<expression error>, <expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘CBox’
  715 |         CBox               wb = {calcPos + (calcSize - calcSize * PWORKSPACEDATA->special_scale_factor) / 2.f, calcSize * PWORKSPACEDATA->special_scale_factor};
      |                                                                                                                                                               ^
      |                                                                                                                                                               |
      |                                                                                                                                                               <brace-enclosed initializer list>
nstackLayout.cpp:723:61: error: could not convert ‘{calcPos, calcSize}’ from ‘<brace-enclosed initializer list>’ to ‘CBox’
  723 |                                 CBox wb = {calcPos, calcSize};
      |                                                             ^
      |                                                             |
      |                                                             <brace-enclosed initializer list>
nstackLayout.cpp: At global scope:
nstackLayout.cpp:744:6: error: ‘bool CHyprNstackLayout::isWindowTiled’ is not a static data member of ‘class CHyprNstackLayout’
  744 | bool CHyprNstackLayout::isWindowTiled(PHLWINDOW pWindow) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:744:39: error: ‘PHLWINDOW’ was not declared in this scope
  744 | bool CHyprNstackLayout::isWindowTiled(PHLWINDOW pWindow) {
      |                                       ^~~~~~~~~
nstackLayout.cpp:748:91: error: ‘PHLWINDOW’ has not been declared
  748 | void CHyprNstackLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorner corner, PHLWINDOW pWindow) {
      |                                                                                           ^~~~~~~~~
nstackLayout.cpp: In member function ‘virtual void CHyprNstackLayout::resizeActiveWindow(const Vector2D&, eRectCorner, int)’:
nstackLayout.cpp:749:75: error: request for member ‘lock’ in ‘g_pCompositor.std::unique_ptr<CCompositor>::operator->()->CCompositor::m_pLastWindow’, which is of pointer type ‘CWindow*’ (maybe you meant to use ‘->?)
  749 |     const auto PWINDOW = pWindow ? pWindow : g_pCompositor->m_pLastWindow.lock();
      |                                                                           ^~~~
nstackLayout.cpp:751:10: error: ‘validMapped’ was not declared in this scope
  751 |     if (!validMapped(PWINDOW))
      |          ^~~~~~~~~~~
nstackLayout.cpp: At global scope:
nstackLayout.cpp:865:6: error: variable or field ‘fullscreenRequestForWindow’ declared void
  865 | void CHyprNstackLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, eFullscreenMode fullscreenMode, bool on) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:865:52: error: ‘PHLWINDOW’ was not declared in this scope
  865 | void CHyprNstackLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, eFullscreenMode fullscreenMode, bool on) {
      |                                                    ^~~~~~~~~
nstackLayout.cpp:865:87: error: expected primary-expression before ‘fullscreenMode’
  865 | void CHyprNstackLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, eFullscreenMode fullscreenMode, bool on) {
      |                                                                                       ^~~~~~~~~~~~~~
nstackLayout.cpp:865:103: error: expected primary-expression before ‘bool’
  865 | void CHyprNstackLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, eFullscreenMode fullscreenMode, bool on) {
      |                                                                                                       ^~~~
nstackLayout.cpp:948:6: error: variable or field ‘recalculateWindow’ declared void
  948 | void CHyprNstackLayout::recalculateWindow(PHLWINDOW pWindow) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:948:43: error: ‘PHLWINDOW’ was not declared in this scope
  948 | void CHyprNstackLayout::recalculateWindow(PHLWINDOW pWindow) {
      |                                           ^~~~~~~~~
nstackLayout.cpp:957:26: error: ‘SWindowRenderLayoutHints CHyprNstackLayout::requestRenderHints’ is not a static data member of ‘class CHyprNstackLayout’
  957 | SWindowRenderLayoutHints CHyprNstackLayout::requestRenderHints(PHLWINDOW pWindow) {
      |                          ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:957:64: error: ‘PHLWINDOW’ was not declared in this scope
  957 | SWindowRenderLayoutHints CHyprNstackLayout::requestRenderHints(PHLWINDOW pWindow) {
      |                                                                ^~~~~~~~~
nstackLayout.cpp:957:83: error: expected ‘,’ or ‘;’ before ‘{’ token
  957 | SWindowRenderLayoutHints CHyprNstackLayout::requestRenderHints(PHLWINDOW pWindow) {
      |                                                                                   ^
nstackLayout.cpp:965:6: error: variable or field ‘switchWindows’ declared void
  965 | void CHyprNstackLayout::switchWindows(PHLWINDOW pWindow, PHLWINDOW pWindow2) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:965:39: error: ‘PHLWINDOW’ was not declared in this scope
  965 | void CHyprNstackLayout::switchWindows(PHLWINDOW pWindow, PHLWINDOW pWindow2) {
      |                                       ^~~~~~~~~
nstackLayout.cpp:965:58: error: ‘PHLWINDOW’ was not declared in this scope
  965 | void CHyprNstackLayout::switchWindows(PHLWINDOW pWindow, PHLWINDOW pWindow2) {
      |                                                          ^~~~~~~~~
nstackLayout.cpp:995:6: error: variable or field ‘alterSplitRatio’ declared void
  995 | void CHyprNstackLayout::alterSplitRatio(PHLWINDOW pWindow, float ratio, bool exact) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:995:41: error: ‘PHLWINDOW’ was not declared in this scope
  995 | void CHyprNstackLayout::alterSplitRatio(PHLWINDOW pWindow, float ratio, bool exact) {
      |                                         ^~~~~~~~~
nstackLayout.cpp:995:60: error: expected primary-expression before ‘float’
  995 | void CHyprNstackLayout::alterSplitRatio(PHLWINDOW pWindow, float ratio, bool exact) {
      |                                                            ^~~~~
nstackLayout.cpp:995:73: error: expected primary-expression before ‘bool’
  995 | void CHyprNstackLayout::alterSplitRatio(PHLWINDOW pWindow, float ratio, bool exact) {
      |                                                                         ^~~~
nstackLayout.cpp:1012:1: error: ‘PHLWINDOW’ does not name a type
 1012 | PHLWINDOW CHyprNstackLayout::getNextWindow(PHLWINDOW pWindow, bool next) {
      | ^~~~~~~~~
nstackLayout.cpp:1037:6: error: ‘bool CHyprNstackLayout::prepareLoseFocus’ is not a static data member of ‘class CHyprNstackLayout’
 1037 | bool CHyprNstackLayout::prepareLoseFocus(PHLWINDOW pWindow) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:1037:42: error: ‘PHLWINDOW’ was not declared in this scope
 1037 | bool CHyprNstackLayout::prepareLoseFocus(PHLWINDOW pWindow) {
      |                                          ^~~~~~~~~
nstackLayout.cpp:1051:6: error: variable or field ‘prepareNewFocus’ declared void
 1051 | void CHyprNstackLayout::prepareNewFocus(PHLWINDOW pWindow, bool inheritFullscreen) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:1051:41: error: ‘PHLWINDOW’ was not declared in this scope
 1051 | void CHyprNstackLayout::prepareNewFocus(PHLWINDOW pWindow, bool inheritFullscreen) {
      |                                         ^~~~~~~~~
nstackLayout.cpp:1051:60: error: expected primary-expression before ‘bool’
 1051 | void CHyprNstackLayout::prepareNewFocus(PHLWINDOW pWindow, bool inheritFullscreen) {
      |                                                            ^~~~
nstackLayout.cpp: In member function ‘virtual std::any CHyprNstackLayout::layoutMessage(SLayoutMessageHeader, std::string)’:
nstackLayout.cpp:1060:31: error: ‘PHLWINDOW’ has not been declared
 1060 |     auto switchToWindow = [&](PHLWINDOW PWINDOWTOCHANGETO) {
      |                               ^~~~~~~~~
nstackLayout.cpp: In lambda function:
nstackLayout.cpp:1061:14: error: ‘validMapped’ was not declared in this scope
 1061 |         if (!validMapped(PWINDOWTOCHANGETO))
      |              ^~~~~~~~~~~
nstackLayout.cpp:1064:36: error: invalid conversion from ‘int’ to ‘CWindow*’ [-fpermissive]
 1064 |         g_pCompositor->focusWindow(PWINDOWTOCHANGETO);
      |                                    ^~~~~~~~~~~~~~~~~
      |                                    |
      |                                    int
In file included from nstackLayout.cpp:2:
/home/user/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:132:32: note:   initializing argument 1 of ‘void CCompositor::focusWindow(CWindow*, wlr_surface*)’
  132 |     void           focusWindow(CWindow*, wlr_surface* pSurface = nullptr);
      |                                ^~~~~~~~
nstackLayout.cpp:1065:54: error: base operand of ‘->’ is not a pointer
 1065 |         g_pCompositor->warpCursorTo(PWINDOWTOCHANGETO->middle());
      |                                                      ^~
nstackLayout.cpp: In member function ‘virtual std::any CHyprNstackLayout::layoutMessage(SLayoutMessageHeader, std::string)’:
nstackLayout.cpp:1088:28: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1088 |         if (!isWindowTiled(PWINDOW))
      |                            ^~~~~~~
      |                            |
      |                            CWindow*
nstackLayout.hpp:69:52: note:   initializing argument 1 of ‘virtual bool CHyprNstackLayout::isWindowTiled(int)’
   69 |     virtual bool                     isWindowTiled(PHLWINDOW);
      |                                                    ^~~~~~~~~
nstackLayout.cpp:1096:40: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1096 |         const auto NEWCHILD = PMASTER->pWindow.lock();
      |                                        ^~~~~~~
nstackLayout.cpp:1098:22: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1098 |         if (PMASTER->pWindow.lock() != PWINDOW) {
      |                      ^~~~~~~
nstackLayout.cpp:1101:61: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1101 |             const bool inheritFullscreen = prepareLoseFocus(NEWMASTER);
      |                                                             ^~~~~~~~~
      |                                                             |
      |                                                             CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1109:54: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1109 |                     const auto NEWMASTER         = n.pWindow.lock();
      |                                                      ^~~~~~~
nstackLayout.cpp:1133:57: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1133 |         const bool inheritFullscreen = prepareLoseFocus(PWINDOW);
      |                                                         ^~~~~~~
      |                                                         |
      |                                                         CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1140:22: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1140 |         if (PMASTER->pWindow.lock() != PWINDOW) {
      |                      ^~~~~~~
nstackLayout.cpp:1141:37: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1141 |             switchToWindow(PMASTER->pWindow.lock());
      |                                     ^~~~~~~
nstackLayout.cpp:1142:38: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1142 |             prepareNewFocus(PMASTER->pWindow.lock(), inheritFullscreen);
      |                                      ^~~~~~~
nstackLayout.cpp:1149:38: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1149 |                     switchToWindow(n.pWindow.lock());
      |                                      ^~~~~~~
nstackLayout.cpp:1150:39: error: ‘struct SNstackNodeData’ has no member named ‘pWindow’
 1150 |                     prepareNewFocus(n.pWindow.lock(), inheritFullscreen);
      |                                       ^~~~~~~
nstackLayout.cpp:1163:57: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1163 |         const bool inheritFullscreen = prepareLoseFocus(PWINDOW);
      |                                                         ^~~~~~~
      |                                                         |
      |                                                         CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1165:34: error: ‘getNextWindow’ was not declared in this scope; did you mean ‘getNodeFromWindow’?
 1165 |         const auto PNEXTWINDOW = getNextWindow(PWINDOW, true);
      |                                  ^~~~~~~~~~~~~
      |                                  getNodeFromWindow
nstackLayout.cpp:1174:57: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1174 |         const bool inheritFullscreen = prepareLoseFocus(PWINDOW);
      |                                                         ^~~~~~~
      |                                                         |
      |                                                         CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1176:34: error: ‘getNextWindow’ was not declared in this scope; did you mean ‘getNodeFromWindow’?
 1176 |         const auto PPREVWINDOW = getNextWindow(PWINDOW, false);
      |                                  ^~~~~~~~~~~~~
      |                                  getNodeFromWindow
nstackLayout.cpp:1180:14: error: ‘validMapped’ was not declared in this scope
 1180 |         if (!validMapped(header.pWindow))
      |              ^~~~~~~~~~~
nstackLayout.cpp:1188:40: error: ‘getNextWindow’ was not declared in this scope; did you mean ‘getNodeFromWindow’?
 1188 |         const auto PWINDOWTOSWAPWITH = getNextWindow(header.pWindow, true);
      |                                        ^~~~~~~~~~~~~
      |                                        getNodeFromWindow
nstackLayout.cpp:1191:37: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1191 |             prepareLoseFocus(header.pWindow);
      |                              ~~~~~~~^~~~~~~
      |                                     |
      |                                     CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1196:14: error: ‘validMapped’ was not declared in this scope
 1196 |         if (!validMapped(header.pWindow))
      |              ^~~~~~~~~~~
nstackLayout.cpp:1204:40: error: ‘getNextWindow’ was not declared in this scope; did you mean ‘getNodeFromWindow’?
 1204 |         const auto PWINDOWTOSWAPWITH = getNextWindow(header.pWindow, false);
      |                                        ^~~~~~~~~~~~~
      |                                        getNodeFromWindow
nstackLayout.cpp:1207:37: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1207 |             prepareLoseFocus(header.pWindow);
      |                              ~~~~~~~^~~~~~~
      |                                     |
      |                                     CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1212:14: error: ‘validMapped’ was not declared in this scope
 1212 |         if (!validMapped(header.pWindow))
      |              ^~~~~~~~~~~
nstackLayout.cpp:1218:53: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1218 |         const auto PNODE = getNodeFromWindow(header.pWindow);
      |                                              ~~~~~~~^~~~~~~
      |                                                     |
      |                                                     CWindow*
nstackLayout.hpp:99:57: note:   initializing argument 1 of ‘SNstackNodeData* CHyprNstackLayout::getNodeFromWindow(int)’
   99 |     SNstackNodeData*                  getNodeFromWindow(PHLWINDOW);
      |                                                         ^~~~~~~~~
nstackLayout.cpp:1221:33: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1221 |         prepareLoseFocus(header.pWindow);
      |                          ~~~~~~~^~~~~~~
      |                                 |
      |                                 CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1239:14: error: ‘validMapped’ was not declared in this scope
 1239 |         if (!validMapped(header.pWindow))
      |              ^~~~~~~~~~~
nstackLayout.cpp:1245:53: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1245 |         const auto PNODE = getNodeFromWindow(header.pWindow);
      |                                              ~~~~~~~^~~~~~~
      |                                                     |
      |                                                     CWindow*
nstackLayout.hpp:99:57: note:   initializing argument 1 of ‘SNstackNodeData* CHyprNstackLayout::getNodeFromWindow(int)’
   99 |     SNstackNodeData*                  getNodeFromWindow(PHLWINDOW);
      |                                                         ^~~~~~~~~
nstackLayout.cpp:1253:33: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1253 |         prepareLoseFocus(header.pWindow);
      |                          ~~~~~~~^~~~~~~
      |                                 |
      |                                 CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp:1275:26: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1275 |         prepareLoseFocus(PWINDOW);
      |                          ^~~~~~~
      |                          |
      |                          CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp: In member function ‘void CHyprNstackLayout::runOrientationCycle(SLayoutMessageHeader&, CVarList*, int)’:
nstackLayout.cpp:1350:22: error: invalid conversion from ‘CWindow*’ to ‘int’ [-fpermissive]
 1350 |     prepareLoseFocus(PWINDOW);
      |                      ^~~~~~~
      |                      |
      |                      CWindow*
nstackLayout.hpp:105:56: note:   initializing argument 1 of ‘bool CHyprNstackLayout::prepareLoseFocus(int)’
  105 |     bool                              prepareLoseFocus(PHLWINDOW);
      |                                                        ^~~~~~~~~
nstackLayout.cpp: At global scope:
nstackLayout.cpp:1395:6: error: variable or field ‘moveWindowTo’ declared void
 1395 | void CHyprNstackLayout::moveWindowTo(PHLWINDOW pWindow, const std::string& dir, bool silent) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:1395:38: error: ‘PHLWINDOW’ was not declared in this scope
 1395 | void CHyprNstackLayout::moveWindowTo(PHLWINDOW pWindow, const std::string& dir, bool silent) {
      |                                      ^~~~~~~~~
nstackLayout.cpp:1395:57: error: expected primary-expression before ‘const’
 1395 | void CHyprNstackLayout::moveWindowTo(PHLWINDOW pWindow, const std::string& dir, bool silent) {
      |                                                         ^~~~~
nstackLayout.cpp:1395:81: error: expected primary-expression before ‘bool’
 1395 | void CHyprNstackLayout::moveWindowTo(PHLWINDOW pWindow, const std::string& dir, bool silent) {
      |                                                                                 ^~~~
nstackLayout.cpp:1426:6: error: variable or field ‘replaceWindowDataWith’ declared void
 1426 | void CHyprNstackLayout::replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to) {
      |      ^~~~~~~~~~~~~~~~~
nstackLayout.cpp:1426:47: error: ‘PHLWINDOW’ was not declared in this scope
 1426 | void CHyprNstackLayout::replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to) {
      |                                               ^~~~~~~~~
nstackLayout.cpp:1426:63: error: ‘PHLWINDOW’ was not declared in this scope
 1426 | void CHyprNstackLayout::replaceWindowDataWith(PHLWINDOW from, PHLWINDOW to) {
      |                                                               ^~~~~~~~~
nstackLayout.cpp: In member function ‘virtual void CHyprNstackLayout::onEnable()’:
nstackLayout.cpp:1442:31: error: cannot convert ‘std::unique_ptr<CWindow>’ to ‘int’
 1442 |         onWindowCreatedTiling(w);
      |                               ^
      |                               |
      |                               std::unique_ptr<CWindow>
nstackLayout.hpp:67:60: note:   initializing argument 1 of ‘virtual void CHyprNstackLayout::onWindowCreatedTiling(int, eDirection)’
   67 |     virtual void                     onWindowCreatedTiling(PHLWINDOW, eDirection direction = DIRECTION_DEFAULT);
      |                                                            ^~~~~~~~~
make: *** [Makefile:2: all] Error 1


✖ Plugin hyprNStack failed to build.                                                                                                                         
  This likely means that the plugin is either outdated, not yet available for your version, or broken.
  If you are on -git, update first.
  Try re-running with -v to see more verbose output.

✔ all plugins built                                                                                                                                          
✔ installed repository                                                                                                                                       
✔ you can now enable the plugin(s) with hyprpm enable                                                                                                        
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  5 / 5  Done!    

Resizing stacks crash Hyprland

My nstack config :

nstack {
	layout {
	    orientation=left
	    new_on_top=0
	    new_is_master=0
	    no_gaps_when_only=0
	    special_scale_factor=0.8
	    inherit_fullscreen=1
	    stacks=3
	    center_single_master=0
	    mfact=0
	    single_mfact=0.5
    }

Even if I comment out mfact=0, Hyprland crashes when I try to resize the stacks. I'd like my stacks to have different width.

This problem happens with the dispatcher resizewindow

I've attached the crash report.
crash_report.txt

Monitor/workspace Size doesnt respect reserved layout

Trying to use addreserved command to hyprland monitor config has Nstack layout not respecting the change. happens in eww dock when it tries to use wlr-roots compositor to reserve space

monitor=DP-1,5120x1440@120,0x0,1
monitor=DP-1,addreserved,0,0,48,0

Second line is not respected when it is in other layouts.

Does not compile against 0.27.1

I would guess that this is related to hyprwm/Hyprland@d3a644d

[1/3] Compiling C++ object libhyprNStack.so.p/main.cpp.o
FAILED: libhyprNStack.so.p/main.cpp.o
g++ -IlibhyprNStack.so.p -I. -I.. -I/nix/store/7hadpif8ip7f0sr4pif89v1k3m1b8i0d-hyprland-0.27.1+date=2023-07-18_81f4a4f-dev/include -I/nix/store/7hadpif8ip7f0sr4pif89v1k3m1b8i0d-hyprland-0.27.1+date=2023-07-18_81f4a4f-dev/include/hyprland/protocols -I/nix/store/7hadpif8ip7f0sr4pif>
In file included from /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/std_thread.h:43,
                 from /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/stop_token:35,
                 from /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/thread:40,
                 from /nix/store/7hadpif8ip7f0sr4pif89v1k3m1b8i0d-hyprland-0.27.1+date=2023-07-18_81f4a4f-dev/include/hyprland/src/includes.hpp:20,
                 from /nix/store/7hadpif8ip7f0sr4pif89v1k3m1b8i0d-hyprland-0.27.1+date=2023-07-18_81f4a4f-dev/include/hyprland/src/defines.hpp:1,
                 from /nix/store/7hadpif8ip7f0sr4pif89v1k3m1b8i0d-hyprland-0.27.1+date=2023-07-18_81f4a4f-dev/include/hyprland/src/config/ConfigManager.hpp:8,
                 from ../main.cpp:3:
/nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/unique_ptr.h: In instantiation of 'constexpr std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = CHyprNstackLayout; _Args = {}; __detail::__unique_ptr_t<_Tp> = __detail::__uniqu>
../main.cpp:39:1:   required from here
/nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/unique_ptr.h:1065:30: error: invalid new-expression of abstract class type 'CHyprNstackLayout'
 1065 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../main.cpp:6:
../nstackLayout.hpp:57:7: note:   because the following virtual functions are pure within 'CHyprNstackLayout':
   57 | class CHyprNstackLayout : public IHyprLayout {
      |       ^~~~~~~~~~~~~~~~~
In file included from ../nstackLayout.hpp:6:
/nix/store/7hadpif8ip7f0sr4pif89v1k3m1b8i0d-hyprland-0.27.1+date=2023-07-18_81f4a4f-dev/include/hyprland/src/layout/IHyprLayout.hpp:79:18: note:     'virtual void IHyprLayout::resizeActiveWindow(const Vector2D&, eRectCorner, CWindow*)'
   79 |     virtual void resizeActiveWindow(const Vector2D&, eRectCorner corner = CORNER_NONE, CWindow* pWindow = nullptr) = 0;
      |                  ^~~~~~~~~~~~~~~~~~

Invalid dispatcher for `resetsplits` or `setstackcount`

I am unable to use the dispatchers, both resetsplits and setstackcount from neither my config nor hyprctl. Trying them with hyprctl dispatch resetsplits or hyprctl dispatch setstackcount returns with result "Invalid dispatcher". Also, I can't figure out what the formatting would be for setstackcount. Would it be something along the lines of bind = $mainMod CONTROL, I, setstackcount, +1 ?

Commit 671ddc4 crashes when opening window on empty workspace

Commit with issue: 671ddc4

Not sure what change(s) results in this, but when I try to open a new window on an empty workspace, Hyprland crashes and I exit to the tty. Reverting to b727255 (or using my fork) and the issue is not present.

Crash Log:

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Oops

Hyprland received signal 11 (Segmentation fault)

Version: 1012e2735a88188f43b11a9126e70977be1d2ab9
Tag: ?

Hyprland seems to be running with plugins. This crash might not be Hyprland's fault.
Plugins:
	N_Stack layout (Zakk) 1.0


System info:
	System name: Linux
	Node name: omer-laptop
	Release: 6.1.35
	Version: #1-NixOS SMP PREEMPT_DYNAMIC Wed Jun 21 14:01:03 UTC 2023

GPU:
	00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] [8086:3e9b] (prog-if 00 [VGA controller])


os-release:
	BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
	BUILD_ID="23.11.20230628.60a783e"
	DOCUMENTATION_URL="https://nixos.org/learn.html"
	HOME_URL="https://nixos.org/"
	ID=nixos
	LOGO="nix-snowflake"
	NAME=NixOS
	PRETTY_NAME="NixOS 23.11 (Tapir)"
	SUPPORT_URL="https://nixos.org/community.html"
	VERSION="23.11 (Tapir)"
	VERSION_CODENAME=tapir
	VERSION_ID="23.11"
	


Backtrace:
	#0 | /home/omer/.nix-profile/bin/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x839) [0x4c9c29]
		_ZN13CrashReporter18createAndSaveCrashEi
		??:?
	#1 | /home/omer/.nix-profile/bin/Hyprland(_Z25handleUnrecoverableSignali+0x3f) [0x585c4f]
		_Z25handleUnrecoverableSignali
		??:?
	#2 | /nix/store/3n58xw4373jp0ljirf06d8077j15pc4j-glibc-2.37-8/lib/libc.so.6(+0x38d30) [0x7fcff9f72d30]
		??
		??:0
	#3 | /nix/store/9wpjrnil0agva204svliyg6svyr10h2b-hyprNStack-1.0/lib/libhyprNStack.so(_ZN17CHyprNstackLayout21onWindowCreatedTilingEP7CWindow+0x16f) [0x7fcff6d38fcf]
		??
		??:0
	#4 | /home/omer/.nix-profile/bin/Hyprland(_ZN11IHyprLayout15onWindowCreatedEP7CWindow+0xe2) [0x509bc2]
		_ZN11IHyprLayout15onWindowCreatedEP7CWindow
		??:?
	#5 | /home/omer/.nix-profile/bin/Hyprland(_ZN6Events18listener_mapWindowEPvS0_+0xa15) [0x4e59e5]
		_ZN6Events18listener_mapWindowEPvS0_
		??:?
	#6 | /home/omer/.nix-profile/bin/Hyprland(_ZN15CHyprWLListener4emitEPv+0x3b) [0x4ecc7b]
		_ZN15CHyprWLListener4emitEPv
		??:?
	#7 | /nix/store/3ycvv2k8j2nj4ia3rnlf47fdc5cyg5n4-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7fcffabffa0c]
		??
		??:0
	#8 | /nix/store/knxbsirpq8y068qswb8h9x7v9m1wd662-wlroots-hyprland-2023-06-14_7e7633a/lib/libwlroots.so.12(+0x81a68) [0x7fcffab5ca68]
		??
		??:0
	#9 | /nix/store/g8l012l0q2xbl27da8zipg39mnpf40gb-libffi-3.4.4/lib/libffi.so.8(+0x788a) [0x7fcffa49888a]
		??
		??:0
	#10 | /nix/store/g8l012l0q2xbl27da8zipg39mnpf40gb-libffi-3.4.4/lib/libffi.so.8(+0x68de) [0x7fcffa4978de]
		??
		??:0
	#11 | /nix/store/g8l012l0q2xbl27da8zipg39mnpf40gb-libffi-3.4.4/lib/libffi.so.8(ffi_call+0xcd) [0x7fcffa4982fd]
		??
		??:0
	#12 | /nix/store/3ycvv2k8j2nj4ia3rnlf47fdc5cyg5n4-wayland-1.22.0/lib/libwayland-server.so.0(+0xd906) [0x7fcffac03906]
		??
		??:0
	#13 | /nix/store/3ycvv2k8j2nj4ia3rnlf47fdc5cyg5n4-wayland-1.22.0/lib/libwayland-server.so.0(+0x8c3b) [0x7fcffabfec3b]
		??
		??:0
	#14 | /nix/store/3ycvv2k8j2nj4ia3rnlf47fdc5cyg5n4-wayland-1.22.0/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7fcffac018e2]
		??
		??:0
	#15 | /nix/store/3ycvv2k8j2nj4ia3rnlf47fdc5cyg5n4-wayland-1.22.0/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7fcffabff445]
		??
		??:0
	#16 | /home/omer/.nix-profile/bin/Hyprland(main+0x99c) [0x458a2c]
		main
		??:?
	#17 | /nix/store/3n58xw4373jp0ljirf06d8077j15pc4j-glibc-2.37-8/lib/libc.so.6(+0x23ace) [0x7fcff9f5dace]
		??
		??:0
	#18 | /nix/store/3n58xw4373jp0ljirf06d8077j15pc4j-glibc-2.37-8/lib/libc.so.6(__libc_start_main+0x89) [0x7fcff9f5db89]
		??
		??:0
	#19 | /home/omer/.nix-profile/bin/Hyprland(_start+0x25) [0x473905]
		_start
		??:?


Log tail:
[LOG] Shaders initialized successfully.
[LOG] Overriding XWayland scale with 0.00
[LOG] New Gamma event at 7ffe310760e0
[LOG] GlobalShortcutsManager bound successfully!
[LOG] ToplevelExportManager bound successfully!
[LOG] ScreencopyProtocolManager bound successfully!
[LOG] Overriding XWayland scale with 0.00
[LOG] Overriding XWayland scale with 0.00
[LOG] Overriding XWayland scale with 0.00
[LOG] Registered signal for owner 1e19880: 1d24800 -> 1e19a60 (owner: layerSurface)
[LOG] Registered signal for owner 1e19880: 2106d80 -> 1e19928 (owner: layerSurface)
[LOG] Registered signal for owner 1e19880: 1d24810 -> 1e19990 (owner: layerSurface)
[LOG] Registered signal for owner 1e19880: 1d24820 -> 1e199f8 (owner: layerSurface)
[LOG] Registered signal for owner 1e19880: 2106d90 -> 1e19ac8 (owner: layerSurface)
[LOG] LayerSurface 2106cc0 (namespace waybar layer 2) created on monitor eDP-1
[LOG] LayerSurface 1be0fc0 arranged: x: 0 y: 0 w: 1920 h: 26 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 26.000000 0.000000 0.000000
[LOG] LayerSurface 2106cc0 mapped
[LOG] Registered signal for owner 1e198a0: 1d24840 -> 1e198a8 (owner: CWLSurface)
[LOG] CWLSurface 1e198a0 called init()
[LOG] LayerSurface 1be0fc0 arranged: x: 0 y: 0 w: 1920 h: 26 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 26.000000 0.000000 0.000000
[LOG]  [hookSystem] New hook event registered: openLayer
[LOG] Overriding XWayland scale with 0.00
[LOG] Overriding XWayland scale with 0.00
[LOG] New XWayland Surface created (class (null)).
[LOG] Registered signal for owner 21ccdd0: 1eb49f0 -> 21cd520 (owner: XWayland Window)
[LOG] Registered signal for owner 21ccdd0: 1eb4a00 -> 21cd588 (owner: XWayland Window)
[LOG] Registered signal for owner 21ccdd0: 1eb4970 -> 21ccf08 (owner: XWayland Window)
[LOG] Registered signal for owner 21ccdd0: 1eb4ab0 -> 21cd4b8 (owner: XWayland Window)
[LOG] Registered signal for owner 21ccdd0: 1eb4980 -> 21cd318 (owner: XWayland Window)
[LOG] Keybind triggered, calling dispatcher (64, , 65293)
[LOG] Executing WAYLAND_DISPLAY=wayland-1 DISPLAY=:0 /nix/store/cmhzc7i1mg5vjpd2d1ma6jdmaqrrpkpa-kitty-0.28.1/bin/kitty --single-instance
[LOG] Process Created with pid 2988
[LOG] New TextInput added!
[LOG] Registered signal for owner 213ed50: 205f918 -> 213ed68 (owner: textInput)
[LOG] Registered signal for owner 213ed50: 205f928 -> 213ee38 (owner: textInput)
[LOG] Registered signal for owner 213ed50: 205f938 -> 213edd0 (owner: textInput)
[LOG] Registered signal for owner 213ed50: 205f948 -> 213eea0 (owner: textInput)
[LOG] Overriding XWayland scale with 0.00
[LOG] New XDG Surface created. (class: kitty)
[LOG] Registered signal for owner 1894ac0: 1fe4d10 -> 1894b28 (owner: XDG Window)
[LOG] Registered signal for owner 1894ac0: 1e0f1c0 -> 1894bf8 (owner: XDG Window)
[LOG] Registered signal for owner 1894ac0: 1cbb260 -> 18950d8 (owner: Toplevel)
[LOG] Registered signal for owner 1894ac0: 1cbb270 -> 1895140 (owner: Toplevel)
[LOG] Registered signal for owner 1894ac0: 1cbb280 -> 1895070 (owner: Toplevel)
[LOG] Registered signal for owner 18952e0: 1fe4d40 -> 18952e8 (owner: CWLSurface)
[LOG] CWLSurface 18952e0 called init()
[LOG] Registered signal for owner 1894ac0: 1fe4d20 -> 1894b90 (owner: CWindow)
[LOG] Searching for matching rules for kitty (title: zsh)

No bottom gap with >1 window in orientationtop

With orientation=top and a bar present, opening 2 or more windows causes the bottom gap to disappear, tested with both stacks=2 and stacks=3, see image below:

image

The bottom gap works fine when there is only a single window / orientationbottom / no bar present

Move windows between stacks instead of swap

I tired this layout and it is pretty good.

I was trying to move windows between stacks, but I am unable to do so with the movewindow dispatcher. It simply swaps the windows.

Is there a way to do that?

new_is_master and new_on_top flags not working properly

Issue

Both the new_on_top and new_is_master flags, when set to false, are not working properly. This is based on how the flags perform when using the master layout.

new_is_master, when false, should result in the new window not replacing the current master. This is not the case currently.

new_on_top, when false, should result in the new window being created at the end of the stack. This is also not the case currently.

Workaround

I have modified some of the code in my own fork to work how I believe it should. This is very rough as I do not understand some of the code, but is at least useable.

Config

plugin {
  nstack {
    layout {
      # default placement of the master area
      orientation = left

      # whether a newly open window should be on the top of the stack
      new_on_top = false

      # whether a newly open window should replace the master or join the slaves.
      new_is_master = false

      # whether to apply gaps when there is only one window on a workspace, aka. smart gaps.
      no_gaps_when_only = true

      # (0.0 - 1.0) the scale of the special workspace windows
      special_scale_factor = 0.8

      # inherit fullscreen status when cycling/swapping to another window
      inherit_fullscreen = true

      # the number of total stacks, including the master
      stacks = 2

      # when there is a single window on the screen it is centered instead of taking up
      # the entire monitor
      center_single_master = 0

      # (0.0 - 1.0) master split factor, the ratio of master split
      # if this is set to 0 the master is the same size as the stacks
      mfact = 0
    }
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.