Commit graph

45 commits

Author SHA1 Message Date
ItsDrike b488fb9ff1
Fix typo 2023-12-15 00:37:11 +00:00
ItsDrike 969114890a
Add video showcase to README 2023-12-15 00:33:57 +00:00
ItsDrike 9ec31792fe
Add hyprpm manifest 2023-12-10 02:13:33 +01:00
ItsDrike 93d0ee4cba
Update hyprload manifest 2023-12-10 02:04:55 +01:00
ItsDrike 66f03d3a08
Remove prefix newlines from demangled func name
The demangled function names from HyprlandAPI::findFunctionsByName were
originally always returning a string prefixed with a newline character.
This was fixed in Hyprland since
1afb00a01b
so the newline char can now be removed.
2023-10-06 15:13:14 +02:00
ItsDrike 54cf7c6989
Improve wording in log msg 2023-10-03 21:38:13 +02:00
ItsDrike ab36aeeae7
Fix crash on single window group 2023-10-03 20:49:32 +02:00
ItsDrike 49b45918db
Merge pull request #8 from ItsDrike/better-ungroup
Improve ungroupping behavior
2023-10-02 21:55:58 +00:00
ItsDrike e78317fdeb
Merge branch 'main' into better-ungroup 2023-10-02 23:55:00 +02:00
ItsDrike ccb76de062
Merge pull request #9 from ItsDrike/rewrite
Full rewrite
2023-10-02 21:50:36 +00:00
ItsDrike 3505d4aa5b
Full rewrite 2023-10-02 22:51:45 +02:00
ItsDrike 03eac7e26b
Improve ungroupping behavior 2023-09-29 20:04:02 +02:00
ItsDrike e5661c4a37
Remove useless clear call in install 2023-09-29 19:17:21 +02:00
ItsDrike 5351a9d8af
Update Makefile 2023-09-29 19:15:54 +02:00
ItsDrike 879e7a839a
Fix building on v0.30.0
Since Hyprland commit
<3785defaf1>
building the plugin was failing with `CHyprGroupBarDecoration` not being
declared. This happened because this commit has removed an include in
`layout/DwindleLayout.hpp` that contained this struct.

Instead of relying on that include being in `DwindleLayout.hpp`, we now
include it ourselves directly from
`render/decorations/CHyprGroupBarDecoration.hpp`.

Note that even with this fix, the plugin will not be buildable until
Hyprland commit
<1925e64c21>
which fixes another issue created by the commit above, where the
`helpers/Vector2D.hpp` had a typo in `macros.hpp` include, which
should've been `../macros.hpp`.

That said, this commit is a part of version 0.30.0, where the plugin is
now working without issues.

Fixes #7
2023-09-29 19:03:42 +02:00
ItsDrike 1ef67f7b26
Update makefile 2023-07-23 18:16:30 +02:00
ItsDrike ab155b2678
Separate logic for adding child windows to group to func 2023-07-23 15:15:08 +02:00
ItsDrike c38652c26f
Make sure the new group window has group bar
The previous commit (120a9c33d1) reworked
the behavior for inserting windows into groups, however in this rework,
the code for adding a group bar window decoration was also removed,
assuming that the CWindow::insertWindowToGroup would do that
automatically. Apparently this is not the case, and we still need to do
it manually.

This therefore just brings the code for adding the group bar back,
fixing this issue.
2023-07-23 14:21:37 +02:00
ItsDrike 120a9c33d1
Don't focus a window when inserting to group
The changes the behavior of groupCreate function when adding each of the
dwindle child node windows into a group, to no longer also focus them,
only to later refocus back on the original group's head/visible window.

This was impossible before, as the CWindow::insertWindowToGroup function
automatically made the inserted window the group's head/current window,
however since that's no longer the case - see the previous commit:
c1c883a237 it is now possible to remove
this janky behavior for a much cleaner one, where the window is simply
moved into a group and marked as hidden immediately.
2023-07-22 23:11:07 +02:00
ItsDrike c1c883a237
Replicate the new moveIntoGroup behavior
Hyprland has updated some of the core functions related to groupping
windows in PR: https://github.com/hyprwm/Hyprland/pull/2630

Specifically, the CWindow::insertWindowIntoGroup was updated to no
longer automatically make the newly inserted window the group's head,
allowing to insert windows without the group auto-focusing them.

With that, the CKeybindManager::moveIntoGroup (dispatcher) function was
then updated to adhere to the change in insertWindowIntoGroup and to
make the inserted widow the group's head from there.

It's probably possible to utilize the insertWindowIntoGroup without
making the inserted window the group's head in a more clever way,
however for now, this commit just changes our logic in groupCreate
function to fully replicate the moveIntoGroup for each dwindle child
node window.

This means we're still doing what we were doing before, that is to
insert a window, make it the group head, repeat for each dwindle child
and at the end make the original group head the head again.

The reason this fix doesn't simply skip making each of the nodes a group
head is that without it, the layout doesn't seem to properly recognize
that the window should no longer be shown, and while this probably can
be addressed by replicating some of the CWindow::setGroupCurrent
function's behavior, for now, that's a task for later.
2023-07-22 22:34:11 +02:00
ItsDrike 6bc69d03d6
Define WLR_USE_UNSTABLE in Makefile, not directly in main.cpp 2023-06-07 00:32:58 +02:00
ItsDrike 0759df0727
Update installation instructions after move to pkg-config
In 6218a99a3a the Makefile was updated to
use the new `pkg-config` method for including Hyprland soucres, however
this commit didn't update the README instructions, which did change a
bit.

The most notable change is that exporting `HYPRLAND_HEADERS` is no
longer necessary, and the updated required Hyprland commit for the
plugin.

This commit also updates the hyprload instructions.
2023-06-07 00:14:36 +02:00
ItsDrike 171f9dd094
Add comment explaining .PHONY 2023-06-07 00:03:08 +02:00
ItsDrike 575c35c00e
Update top comment 2023-06-07 00:02:44 +02:00
ItsDrike e727aed197
Add INSTALL_LOCATION variable 2023-06-07 00:00:04 +02:00
ItsDrike e35c1a136d
Add COMPILE_FLAGS variable, avoiding repetition in clangd 2023-06-06 23:56:01 +02:00
ItsDrike 6218a99a3a
Move to pkg-config
Hyprland has recently changed the way plugins recognize the hyprland
headers, moving from directly including the paths with -I option to
automatically generating the cflags with `pkg-config --cflags hyprland`.

This change means that compilation attempts using the direct include
option will start to fail with newer versions of hyprland, which now
uses /usr/local/include for it's headers after `make pluginenv`.

This commit migrates the original system to respect this change,
modifying Makefile, and with it, the include paths for hyprland headers,
which are now prefixed with hyprland/.
2023-06-06 23:48:28 +02:00
ItsDrike a826dfbebc
Fix formatting 2023-04-04 00:15:37 +02:00
ItsDrike c62024d74d
Rename addChildNodesToDequeRecursive -> collectChildNodes 2023-04-04 00:15:26 +02:00
ItsDrike 93d3948bfb
Remove unnecessary parents deque from addChildNodesToDequeRecursive 2023-04-04 00:14:44 +02:00
ItsDrike 16f67af969
Only refocus original win after childs were added 2023-04-04 00:12:41 +02:00
ItsDrike bea3f75c19
Restructure the project, making groupCreate and groupDissolve funcs 2023-04-04 00:11:20 +02:00
ItsDrike 6afe3cb756
Include wlroots subproject from hyprland sources during compilation 2023-04-03 17:27:02 +02:00
ItsDrike a9eedb1d72
Add missing return statements on ignores 2023-04-03 17:23:08 +02:00
ItsDrike 9e665e359c
Find correct function based on demangled signature 2023-04-01 00:16:08 +02:00
ItsDrike 312eeaeb34
Fix using wrong getNodeFromWindow function with findFunctionsByName 2023-03-31 23:57:34 +02:00
ItsDrike 5c56bd64ed
Mention minimum hyprland version requirement 2023-03-31 23:10:58 +02:00
ItsDrike 477097523e
Reference the PR that removed autogroupping 2023-03-31 23:05:11 +02:00
ItsDrike 03e6e33a98
Add license 2023-03-31 22:56:49 +02:00
ItsDrike 6caef995d1
Move to using findFunctionsByName instead of compiler dependant getFunctionAddressFromSignature 2023-03-31 22:44:33 +02:00
ItsDrike 7eca164413
Add initial support for children groupping 2023-03-31 22:32:25 +02:00
ItsDrike 2788905750
Add custom wrapper overriding togglegroup dispatcher 2023-03-31 21:32:28 +02:00
ItsDrike 1ae38874f2
Update clang-format 2023-03-31 15:48:55 +02:00
ItsDrike 6f367d865e
Remove unnecessary template code 2023-03-31 14:57:46 +02:00
ItsDrike 2d883200bc
Initial commit 2023-03-31 14:56:32 +02:00