Commit graph

50 commits

Author SHA1 Message Date
9b2b156197
all: chase hyprland 2025-12-19 16:24:43 +00:00
e058ea23b8
all: chase hyprland 2025-12-08 15:22:46 +00:00
fc76c5674a
scrolling: chase hyprland 2025-12-06 11:23:55 +00:00
mwahstache
be3fac629c
hyprscrolling: fix layoutmsg move -col (#558) 2025-12-01 16:47:05 +00:00
nnra
84659a2502
all: chase hyprland for 40d8fa8 (#549)
* hyprexpo: Fixes for 40d8fa8

* csgo-vulkan-fix: Fixes for 40d8fa8

* hyprbars: Fixes for 40d8fa8

I am not entirely sure whether I was supposed to use fullWindowFocus()
or rawWindowFocus() in hyprbars/barDeco.cpp at line 220

* xtra-dispatchers: Fixes for 40d8fa8

I am not entirely sure whether I was supposed to use fullWindowFocus()
or rawWindowFocus() in xtra-dispatchers/main.cpp at lines 47 and 106

* hyprscrolling: Fixes for 40d8fa8

A lot of repeated code can be removed if it's safe to store
`Desktop::focusState()`, `Desktop::focusState()->monitor()` and
`Desktop::focusState()->window()` at the top of the
`CScrollingLayout::findBestNeighbor` function.
This change requires further review as I don't know if any of those
change during this function so I didn't wanna introduce any unexpected
issues.
I am not entirely sure whether I was supposed to use fullWindowFocus()
or rawWindowFocus() in xtra-dispatchers/main.cpp at lines 786, 789 and
1344
2025-11-26 22:10:33 +00:00
mwahstache
7ffc0b314e
hyprscrolling: fixed moveWindowTo behavior (#546)
* fixed incorrect index

* fixed broken conditional

* undoing idxForHeight change
2025-11-23 00:07:34 +00:00
mwahstache
a70775789c
scrolling: fixed +conf and -conf logic in colresize (#542) 2025-11-20 14:09:52 +00:00
nnra
793d24e6b5
all: Window rules V3 Fixes (#541) 2025-11-19 19:07:46 +00:00
a5a6f93d72
scrolling: implement swapWindow
fixes #511
2025-10-17 00:56:45 +01:00
Liam Hanrahan
f6dd103dfb
scrolling: Remove redundant workspace check (#506) 2025-10-11 02:39:56 +02:00
Ralph Zhou
5cf12b0fa1
Hyprscrolling: Fix colresize breaking the centered position (#502) 2025-10-07 23:00:02 +02:00
Ralph Zhou
7be897d6ae
Hyprscrolling: (feat) Add togglefit command (#498)
* Hyprscrolling: (feat) Add `togglefit` command

* fix multi-workspaces bugs and focus change bug.

* fix center to fitcol bug

* remove "fullyvisible" logic to simplify the logic
2025-10-06 12:00:49 +01:00
Ralph Zhou
4d940a10af
Hyprscrolling: fix window size disturbance on focus change (#492) 2025-09-26 15:58:09 +02:00
Ralph Zhou
6913b8d506
Hyprscrolling: feat: improve focus stability with last-focused memory (#484)
* Hyprscrolling: feat: improve focus stability

* style and functions choose change

1. replace `std::find` and `std::min_element` with `ranges`
2. replace `push_back` with `emplace_back`
3. add `{}` for nested `if`

* flake.lock: Update

* chore: chase nixpkgs

---------

Co-authored-by: Amadej Kastelic <amadejkastelic7@gmail.com>
2025-09-25 15:31:05 +02:00
Ralph Zhou
1e3fa62428
Hyprscrolling: fix layoutmsg fit visible incorrectly include window at the border (#487) 2025-09-23 20:00:29 +02:00
Ralph Zhou
c8b2be3502
Hyprscrolling: feat: Add column movement commands (swapcol, movecoltoworkspace) (#481)
* hyprscrolling: feat(layout) Add `swapcol` command for cyclic column swapping

This commit introduces a new layout message, `swapcol`, to allow users
to efficiently reorder entire columns within the scrolling layout like
niri.

The `swapcol` command accepts two arguments:
- `l`: Swaps the current column with the one to its left.
- `r`: Swaps the current column with the one to its right.

A key feature of this implementation is its cyclic (wrap-around)
behavior. When the leftmost column is swapped left, it moves to the end
of the list. Similarly, swapping the rightmost column right moves it to
the beginning. This provides a fluid and powerful way to rearrange the
workspace without getting stuck at the edges.

The README has also been updated to document this new functionality.

Example usage in `hyprland.conf`:
# Swap current column with the one to the left
bind = $mainMod, H, layoutmsg, swapcol l
# Swap current column with the one to the right
bind = $mainMod, L, layoutmsg, swapcol r

* Hyprscrolling: feat(layout) feat(layout): Add `movecoltoworkspace` command

This commit introduces the `movecoltoworkspace` layout message, enabling
users to move an entire column of windows to another workspace with a
single command.

This feature preserves the internal layout, window arrangement, and
relative sizes within the column upon moving. It robustly handles moving
to any workspace, including empty ones, by ensuring the target workspace
is set to the 'scrolling' layout before the move.

This addresses a key aspect of the feature request in issue #431,
specifically the need for commands to move columns between workspaces.

The README has been updated to document this new command.

Example usage:
# Move current column to workspace 2
bind = $mainMod, SHIFT, 2, layoutmsg, movecoltoworkspace 2
# Move current column to the next workspace
bind = $mainMod, SHIFT, L, layoutmsg, movecoltoworkspace +1

* Hyprscrolling: fix: remove `{}` from short `if, for`s

* Hyprscrolling: style: remove `{}` for short `if`. Add it back from `for`.

* Hyprscrolling: clang-format
2025-09-20 17:33:04 +02:00
Ralph Zhou
ebb4040cac
Hyprscrolling: focus left/right moves to the best vertical neighbour (#482)
* Hyprscrolling: feat: focus left/right moves to the best vertical neighbour (closes #473)

When moving focus horizontally between columns we now pick the window
whose vertical span overlaps the current window the most.
If no overlap exists we fall back to the top-most window of the target
column.
This makes `layoutmsg focus l/r` behave intuitively in multi-column
setups: from the bottom-left terminal you land on the bottom-left
terminal of the neighbouring column instead of always jumping to the
top.

* Hyprscrolling: fix: remove `{}` from short ifs in `findBestNeighbor()`

* Hyprscrolling: fix: Simplify nested ifs
2025-09-19 00:04:18 +02:00
Ralph Zhou
5ff379f4e5
hyprscrolling: Ensure maximized state is restored from full-screen (#479)
When a window is in full-screen mode (mode 2), dispatching `fullscreen
1` (maximized mode) fails to resize the window correctly, leaving it at
full-screen dimensions.

This occurs because the `applyNodeDataToWindow` function contains an
early `return` when it detects the window is in a fullscreen state. This
check does not account for the `ignoreFullscreenChecks` flag, which is
specifically set in `fullscreenRequestForWindow` to handle this exact
transition.

The condition is updated to `if (PWINDOW->isFullscreen() &&
!data->ignoreFullscreenChecks)`, allowing the function to proceed and
apply the correct maximized geometry when toggling from a full-screen
state.
2025-09-13 16:37:08 +02:00
James Satterfield
b8d6d36961
hyprscrolling: respect focus_fit_method when moving windows and fix left column centering (#460)
* scrolling: add SWorkspaceData::centerOrFitCol and use it in CScrollingLayout::moveWindowTo. Remove clamp on leftOffset in SWorkspateData::recalculate to fix left column centering.

* Omit this-> for member functions

* rerun checks
2025-09-02 11:47:59 +02:00
James Satterfield
bf843fc6ad
scrolling: Add warpCursorTo for all layout move/focus operations (#461) 2025-08-27 22:05:58 +02:00
James Satterfield
ee66b49fda
scrolling: SCollumnData::up/down Break out of the loop after the first swap (#457) 2025-08-27 18:25:38 +02:00
James Satterfield
984669ebb5
scrolling: centerOrFit with 'focus' when first or last column already focused. (#447) 2025-08-11 19:04:40 +01:00
James Satterfield
c8dc6f3d54
Hyprscrolling: Respect general:no_focus_fallback config when using layoutmsg focus (#443)
* Respect general:no_focus_fallback config when using layoutmsg focus

* Remove braces from short ifs
2025-08-06 23:58:46 +02:00
James Satterfield
bdd56d2c56
Hyprscrolling: Make resizeactive keyboard binds work for vertical window resizing (#442)
* Get resizeactive keyboard binds working. Set corner based on window having previous or next neighbors in the column. Negate delta.y when not the top window.

* Rename mod_delta modDelta. Remove braces on short ifs.
2025-08-06 23:58:40 +02:00
d723e5b153
scrolling: make movewindowto l promote on the left edge
fixes #421
2025-07-11 19:24:48 +02:00
7c4fe5ed42
scrolling: guess window's stack position on movement
ref #421
2025-07-11 19:22:28 +02:00
033fc54c3c
scrolling: keep inner gap if there are windows to the side
ref #421
2025-07-11 19:06:23 +02:00
2c93c08880
scrolling: pad first invisible window by 1px to avoid ffm grabbing it 2025-07-11 19:00:15 +02:00
0748c1e296
scrolling: add follow_focus
fixes #401
2025-07-11 19:00:15 +02:00
4783860953
scrolling: force instant change on manual resize
fixes #388
2025-06-15 11:39:26 +02:00
a79dc40e61
scrolling: fix promote not recalculating
fixes #387
2025-06-15 11:36:50 +02:00
7769e10250 scrolling: avoid crash on clamp
fixes #375
2025-06-08 13:51:06 +02:00
eb42a53d17 scrolling: add focus_fit_method
fixes #363
2025-06-08 10:37:29 +02:00
66de9f58ae scrolling: do not leave empty space on close
fixes #370
2025-06-08 10:37:29 +02:00
209f5cbcc4 scrolling: fit column on resize
ref #370
2025-06-08 10:37:29 +02:00
d81d96e9d6
scrolling: fixup refocus on close issues
fixes #364
2025-05-26 16:59:09 +02:00
clotodex
1e57d4e54d
hyprscrolling: fix colresize not always recalculating (#360) 2025-05-24 23:46:48 +02:00
clotodex
032b2fd879
hyprscrolling: fix viewport should follow movewindowto (#359) 2025-05-24 23:46:33 +02:00
c04dee3d0c
scrolling: add promote layoutmsg 2025-05-24 14:31:35 +02:00
19dc215230
scrolling: make new windows columns by default
ref #348
2025-05-24 14:28:17 +02:00
clotodex
d4df48ee95
hyprscrolling: Fix focus not calling recalculate (#358) 2025-05-24 14:00:40 +02:00
139cccf4ca
scrolling: add all to colresize
ref #348
2025-05-22 15:17:25 +02:00
212f79fc36
scrolling: add focus layoutmsg
ref #348
2025-05-22 15:14:27 +02:00
1b659b70cb
hyprscrolling: add fit
ref #348
2025-05-22 15:05:40 +02:00
e00453ede3
scrolling: fix fullscreen
fixes #351
2025-05-22 14:03:19 +02:00
4dea1029e8
hyprscrolling: add preconfigured widths for resize
ref #348
2025-05-18 21:18:38 +02:00
f7665af850
hyprscrolling: fixup minor oopsie
fixes #349
2025-05-18 20:57:19 +02:00
05dae996eb
hyprscroller: add mouse resize controls
fixes #347
2025-05-18 19:03:07 +02:00
803343f7ef
hyprscrolling: fix reserved area
fixes #346
2025-05-18 18:14:46 +02:00
6e215e4f9d
hyprscrolling: init plugin 2025-05-02 19:48:37 +01:00