aboutsummaryrefslogtreecommitdiff
path: root/src/layout
AgeCommit message (Collapse)Author
2024-09-12Add SwitchPresetWindowHeight by idIvan Molodetskikh
2024-09-12 Implement preset window heightsChristian Rieger
2024-09-06Fix set-window-height SetProportion scaleIvan Molodetskikh
2024-09-06Implement by-id window addressing in IPC and CLI, fix move-column-to-workspaceIvan Molodetskikh
This is a JSON-breaking change for the IPC actions that changed from unit variants to struct variants. Unfortunately, I couldn't find a way with serde to both preserve a single variant, and make it serialize to the old value when the new field is None. I don't think anyone is using these actions from JSON at the moment, so this breaking change is fine.
2024-09-05implement always_center_single_column layout optionelkowar
2024-09-04layout: Prevent view gesture snap beyond first/last columnIvan Molodetskikh
2024-09-04layout: Extract snap_points()Ivan Molodetskikh
2024-09-03Use libdisplay-info for make/model/serial parsing, implement throughoutIvan Molodetskikh
2024-09-01Implement by-id workspace action addressingIvan Molodetskikh
It's not added to clap because there's no convenient mutually-exclusive argument enum derive yet (to have either the current <REFERENCE> or an --id <ID>). It's not added to config parsing because I don't see how it could be useful there. As such, it's only accessible through raw IPC.
2024-09-01Change IdCounter to be backed by an AtomicU64Ivan Molodetskikh
Let's see if anyone complains.
2024-09-01Make WorkspaceId inner field privateIvan Molodetskikh
2024-09-01Implement the event stream IPCIvan Molodetskikh
2024-09-01Animate focus-workspace by idx/back and forth/previousIvan Molodetskikh
Deleting the test because it only made sense when no-animation was special cased.
2024-09-01layout: Cache monitor output nameIvan Molodetskikh
2024-08-25layout: Break out early on min sizeIvan Molodetskikh
2024-08-25layout: Fix rounding in height distributionIvan Molodetskikh
Rounding before checking min height could artificially increase the window height that we check, leading to an incorrectly satisfied min constraint.
2024-08-25layout: Clamp window height to max available in columnIvan Molodetskikh
When the window is alone in its column this logic intentionally isn't triggered. Until we have a floating layer, there's no other way to get a window larger than the screen, which I need.
2024-08-23Implement window close transactionIvan Molodetskikh
Mainly visible with disabled animations.
2024-08-23Extract Niri::update_render_elements()Ivan Molodetskikh
2024-08-22Implement resize transactionsIvan Molodetskikh
2024-08-22Implement window resize throttlingIvan Molodetskikh
2024-08-22Update Smithay (apply state in post commit)Ivan Molodetskikh
2024-08-15layout: Do not recompute total_weight every iterationIvan Molodetskikh
2024-08-15layout: Implement weighted height distributionIvan Molodetskikh
The intention is to make columns add up to the working area height most of the time, while still preserving the ability to have one fixed-height window. Automatic heights are now distributed according to their weight, rather than evenly. This is similar to flex-grow in CSS or fraction in Typst. Resizing one window in a column still makes that window fixed, however it changes all other windows to automatic height, computing their weights in such a way as to preserve their apparent heights.
2024-08-15layout: Pre-subtract gaps during height distributionIvan Molodetskikh
Same result, but code a bit clearer.
2024-07-22Add negative struts to testsIvan Molodetskikh
2024-07-16Implement gradient color interpolation option (#548)Ivan Molodetskikh
* Added the better color averaging code (tested & functional) * rustfmt * Make Color f32 0..1, clarify premul/unpremul * Fix imports and test name * Premultiply gradient colors matching CSS * Fix indentation * fixup * Add gradient image --------- Co-authored-by: K's Thinkpad <K.T.Kraft@protonmail.com>
2024-07-10Add move-column-{left/right}-or-to-monitor-{left/right} (#528)Winter
* feature added, move-column-left-or-monitor-left and move-column-right-or-monitor-right * fixed stupid mistake * yalter's fixes * fixed names * fixed a stupid mistake --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2024-07-09Fix view offset anim restart on switching focusIvan Molodetskikh
2024-07-09Add tolerance to view offset anim restart checkIvan Molodetskikh
It was getting tripped by tiny differences.
2024-07-05Implement focus-follows-mouse max-scroll-amountIvan Molodetskikh
2024-07-05Refactor and simplify new view offset calculationIvan Molodetskikh
* Split new offset computation from starting the animation. * Simplify new column on empty workspace logic.
2024-07-05layout: Remove todo!() when activating window with no monitorsIvan Molodetskikh
2024-07-05Added Commnads to focus windows or Monitors above/below the active window (#497)TheAngusMcFire
* Implement focus-window-up/down-or-monitor calls * Fixed wrong naming of focus-window-or-monitor commands * fix copy pase errors for focusing direction * Fixed wrong behaviour when the current workspace is empty * Cleanup navigation code to reduce complexity * Fix wrong comments and add testcases for FocusWindowOrMonitorUp/Down --------- Co-authored-by: Christian Rieger <christian.rieger@student.tugraz.at>
2024-06-28feat: add `focus-column-or-monitor-left`, `focus-column-or-monitor-right` (#456)Filipe Paniguel
* feat: add support for focus-window-or-monitor * addresses output without window case * refactor: reduce verbosity * update this.. * refactor: rename `maybe_focus_window` functions * refactor: flip focus_window_or_output return logic * Update src/layout/mod.rs Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com> * refactor: rename to Column * move blocks next to other Column variables --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2024-06-19Implement vertical middle mouse gestureIvan Molodetskikh
2024-06-19Somewhat fix height distribution logicIvan Molodetskikh
This got a bit broken with fractional layout. The current logic seems to give exact results for integer scales again, but for fractional scales sometimes the resulting height goes beyond the maximum, even clearly by more than one logical pixel. Not entirely sure why that is.
2024-06-18Fix blurry rounded corners on high scalesIvan Molodetskikh
2024-06-18Animate xdg-activation and foreign-toplevel workspace switchesIvan Molodetskikh
These are a bit jarring without an animation.
2024-06-18Refactor layout to fractional-logicalIvan Molodetskikh
Lets borders, gaps, and everything else stay pixel-perfect even with fractional scale. Allows setting fractional border widths, gaps, struts. See the new wiki .md for more details.
2024-06-17Fix cached data not updating on config changeIvan Molodetskikh
2024-06-17layout: Cache scale and transform on the workspaceIvan Molodetskikh
2024-06-10Implement our own TextureBuffer/RenderElementIvan Molodetskikh
Supports fractional texture scale + has some getters.
2024-06-10Signal fractional scale to clientsIvan Molodetskikh
Doesn't do anything yet because we don't bind the fractional scale manager and don't allow fractional scales.
2024-06-09Add `focus-column-right-or-first`, `focus-column-left-or-last` (#391)James Sully
* add focus-column-right-or-first * add focus-column-left-or-last
2024-06-09Fix typos (#429)Ujp8LfXBJ6wCPR
* Fix typos reported by "typos" crate https://github.com/crate-ci/typos * Ignore typo datas -> data See https://github.com/crate-ci/typos?tab=readme-ov-file#false-positives for more configureability. --------- Co-authored-by: Carl Hjerpe <git@hjerpe.xyz> Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2024-06-04Add missing fullscreen checkIvan Molodetskikh
Fixes crash when a window in a column requests to be unfullscreened.
2024-06-02Preserve empty named workspaces upon output removalIvan Molodetskikh
Not sure how we missed this.
2024-05-24Added actions to allow focusing up or down as normal but to wrap to the ↵Micah N Gorrell
column to the left or right if there is no window above or below
2024-05-17Implement niri msg workspacesrustysec