Ivan Molodetskikh
1e6b8906e0
layout/monitor: Extract add_workspace_bottom()
2024-11-23 15:07:52 +03:00
Ivan Molodetskikh
6c5b92e5c0
Add interactive_move_onto_empty_output test
...
Tests the add_workspace_bottom() in Monitor::add_tile().
2024-11-23 15:07:35 +03:00
Ivan Molodetskikh
88f4c1d610
layout: Preserve active workspace for removed outputs
2024-11-05 21:52:02 +03:00
Ivan Molodetskikh
ddcb5c5e10
layout: Move some types further down
2024-11-05 21:08:50 +03:00
Ivan Molodetskikh
fce5d66878
Follow window corner radius in insert hint
2024-11-02 10:53:55 +03:00
Ivan Molodetskikh
05d218113c
Add gradient support for the insert hint
...
Implement it via FocusRing which already handles SolidColor vs. Border
render element.
2024-11-02 10:53:55 +03:00
Ivan Molodetskikh
6632699e00
Remove obsolete TODO
2024-11-02 10:53:55 +03:00
Rasmus Eneman
e887ee93a3
Implement interactive window move
2024-10-27 23:07:39 -07:00
Ivan Molodetskikh
d640e85158
Require Clone for LayoutElement::Id
...
Now that we have MappedId, this could really be Copy. But it's quite a
big refactor, so for now just require Clone as I'll need it.
2024-10-27 23:07:39 -07:00
Ivan Molodetskikh
4b837f429c
layout: Accept anim_config in remove_column_by_idx
2024-10-17 08:59:06 +03:00
Ivan Molodetskikh
a13b9298c6
Draw the layout as inactive when layer-shell has focus
2024-10-15 11:11:57 +03:00
Ivan Molodetskikh
be7fbd418f
layout: Return Tile + info upon removal
2024-10-14 18:08:44 +03:00
Ivan Molodetskikh
06ec9eecdb
layout/tests: Use existing method
2024-10-14 17:39:55 +03:00
Ivan Molodetskikh
79eef5ee90
layout: Remove unnecessary vec lookup
2024-10-14 17:36:00 +03:00
Ivan Molodetskikh
d5cbc35811
Implement ConsumeOrExpelWindow{Left,Right} by id
2024-10-12 09:58:03 +03:00
Ivan Molodetskikh
810ea245f9
layout: Deduplicate default width resolution
2024-10-10 10:40:59 +03:00
Ivan Molodetskikh
58fc5f3b06
layout: Replace move_window_to_output with move_to_output
2024-10-10 10:28:55 +03:00
Ivan Molodetskikh
7d4e99b760
layout/workspace: Reduce code duplication in adding windows
2024-10-10 10:17:16 +03:00
Ivan Molodetskikh
ab7d81aae0
layout: Reduce field visibility
...
The outside code isn't supposed to mess with the fields.
2024-10-10 09:24:20 +03:00
Ivan Molodetskikh
d0f2b9abd0
Fix formatting
2024-09-12 20:54:44 +03:00
Ivan Molodetskikh
43578e21b1
Always clamp non-auto window height with >1 windows in column
2024-09-12 19:31:47 +03:00
Ivan Molodetskikh
55a798bd8b
Prevent unintended focus-follows-mouse during workspace switch
2024-09-12 16:48:29 +03:00
Ivan Molodetskikh
c3cb42f04d
Add SwitchPresetWindowHeight by id
2024-09-12 02:32:44 -07:00
Christian Rieger
d0e624e615
Implement preset window heights
2024-09-12 02:32:44 -07:00
Ivan Molodetskikh
dcb29efce5
Implement by-id window addressing in IPC and CLI, fix move-column-to-workspace
...
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-06 18:32:41 +03:00
elkowar
fd8ebb9d06
implement always_center_single_column layout option
2024-09-05 01:01:41 -07:00
Ivan Molodetskikh
f0157e03e7
Use libdisplay-info for make/model/serial parsing, implement throughout
2024-09-03 13:48:08 +03:00
Ivan Molodetskikh
f7181fb066
Implement by-id workspace action addressing
...
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-01 23:47:19 -07:00
Ivan Molodetskikh
30b213601a
Implement the event stream IPC
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
8eb34b2e18
Animate focus-workspace by idx/back and forth/previous
...
Deleting the test because it only made sense when no-animation was
special cased.
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
74d1b1f406
layout: Cache monitor output name
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
c8839f7658
Implement window close transaction
...
Mainly visible with disabled animations.
2024-08-23 15:41:06 +03:00
Ivan Molodetskikh
09f3d3fb12
Extract Niri::update_render_elements()
2024-08-23 12:54:07 +03:00
Ivan Molodetskikh
7bfdf87bf0
Implement resize transactions
2024-08-22 15:19:11 +03:00
Ivan Molodetskikh
cf357d7058
Implement window resize throttling
2024-08-22 14:40:40 +03:00
Ivan Molodetskikh
66f23c3980
layout: Implement weighted height distribution
...
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-15 10:50:38 +03:00
Ivan Molodetskikh
b454fd5d9e
Add negative struts to tests
2024-07-22 13:12:42 +03:00
Winter
a283c34dbb
Add move-column-{left/right}-or-to-monitor-{left/right} ( #528 )
...
* 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-10 04:52:48 +00:00
Ivan Molodetskikh
1da99f4003
Implement focus-follows-mouse max-scroll-amount
2024-07-05 20:53:11 +04:00
Ivan Molodetskikh
3f8707496f
layout: Remove todo!() when activating window with no monitors
2024-07-05 11:56:45 +04:00
TheAngusMcFire
a56e4ff436
Added Commnads to focus windows or Monitors above/below the active window ( #497 )
...
* 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-07-05 04:55:04 +00:00
Filipe Paniguel
bdf9894020
feat: add focus-column-or-monitor-left, focus-column-or-monitor-right ( #456 )
...
* 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-28 07:44:24 -07:00
Ivan Molodetskikh
db89d4d3dd
Implement vertical middle mouse gesture
2024-06-19 21:55:39 +03:00
Ivan Molodetskikh
793e1bdbc5
Animate xdg-activation and foreign-toplevel workspace switches
...
These are a bit jarring without an animation.
2024-06-18 14:01:34 +03:00
Ivan Molodetskikh
1dae45c58d
Refactor layout to fractional-logical
...
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-18 14:01:28 +03:00
Ivan Molodetskikh
032589446a
Fix cached data not updating on config change
2024-06-17 09:02:22 +03:00
Ivan Molodetskikh
2ffa1ae705
layout: Cache scale and transform on the workspace
2024-06-17 09:02:22 +03:00
Ivan Molodetskikh
3c63be6261
Implement our own TextureBuffer/RenderElement
...
Supports fractional texture scale + has some getters.
2024-06-10 18:08:00 +03:00
Ivan Molodetskikh
e3406ac255
Signal fractional scale to clients
...
Doesn't do anything yet because we don't bind the fractional scale
manager and don't allow fractional scales.
2024-06-10 18:08:00 +03:00
James Sully
a55e385b12
Add focus-column-right-or-first, focus-column-left-or-last ( #391 )
...
* add focus-column-right-or-first
* add focus-column-left-or-last
2024-06-09 11:14:51 +00:00