Commit Graph

320 Commits

Author SHA1 Message Date
Ivan Molodetskikh c0f19d48fa config: Add merging for Input 2025-10-02 09:38:17 +03:00
Ivan Molodetskikh 31f9577df9 config: Add merging for Animations 2025-10-02 09:38:17 +03:00
Ivan Molodetskikh 2eabc22b38 config: Add merging for Gestures 2025-10-02 09:38:17 +03:00
Ivan Molodetskikh 2de34e8798 config: Add merging for misc sections 2025-10-02 09:38:17 +03:00
Ivan Molodetskikh ceaf9408a5 config: Add merging for Debug 2025-10-02 09:38:17 +03:00
Ivan Molodetskikh eff41ab716 config: Add merging for SwitchBinds 2025-10-02 09:38:17 +03:00
Ivan Molodetskikh b3ae3adbb7 Partially implement config includes
Subsequent commits will add merging for all leftover sections.
2025-10-02 09:38:17 +03:00
Ivan Molodetskikh 09cf8402c3 Add per-output layout config 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh d5f4e79e4c Add per-workspace layout config
Per-workspace background-color doesn't work yet.
2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 1fa9dd32ed config: Split Layout from LayoutPart 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 2781d3a743 config: Replace resolve_against with MergeWith 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh e739ce8171 config: Add merge!() macros to reduce boilerplate 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh a2727ba2c9 config: Introduce MergeWith trait 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 6451d6be4f config: Fix discrepancy in default shadow color 2025-09-20 15:08:15 +03:00
Ivan Molodetskikh 00a4e22566 config: Add a diff empty to default test 2025-09-20 15:08:15 +03:00
Ivan Molodetskikh 19d21fc9b1 config: Fix inability to override border/focus-ring/tab-indicator gradient with color in window rules 2025-09-20 15:08:15 +03:00
Kai Koehler 08f5c6fecb Make hot corners configurable, including per-output (#2108)
* Add corner selection in config

* Add hot corner docs

* Working per-monitor hot corners

Handle defaults

* run cargo fmt --all

* Fix hot corners in is_sticky_obscured_under

* Change default to fall back to gesture hot corners if output hot corners are unset

* Add hot corner output config docs

* Support fractional scaling

* Trigger hot corners over widgets

* Improve float handling
Fixed YaLTeR/niri/pull/2108

* Refactor

* Bug Fixes

* Amend docs

Fix styling

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>

* Integrate code review

Move is_inside_hot_corner

* fixes

---------

Co-authored-by: Aadniz <8147434+Aadniz@users.noreply.github.com>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-09-16 15:10:01 +00:00
Ivan Molodetskikh af4b5f99e9 Bump version to 25.08 2025-08-29 22:01:28 +03:00
Said Kadrioski 0c3223ac72 Add cycle back feature for presets of column/window width/height. 2025-08-29 09:13:52 +03:00
Horu 1ffda91e0c feat: cubic-bezier curve for animation (#2059)
* feat: bezier curve for animation

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-29 05:31:50 +00:00
Ivan Molodetskikh b02c5d2d36 config: Rename DebugConfig => Debug 2025-08-27 11:25:51 +03:00
Ivan Molodetskikh e5188da1f8 config: Clean up animations struct names 2025-08-27 11:22:27 +03:00
Ivan Molodetskikh 82697773f8 config: Move workspace into its own module 2025-08-27 11:16:36 +03:00
Ivan Molodetskikh f64cb6c03e config: Cleanup 2025-08-27 11:12:28 +03:00
Ivan Molodetskikh 91257862e5 config: Move leftover input tests to input 2025-08-27 11:10:38 +03:00
Ivan Molodetskikh 178469301b config: Extract misc 2025-08-27 11:02:04 +03:00
Ivan Molodetskikh c637d4ce99 config: Move some stuff to utils 2025-08-27 10:59:28 +03:00
Ivan Molodetskikh a03a7bd1a3 config: Extract binds 2025-08-27 10:55:31 +03:00
Ivan Molodetskikh 758a4c5e65 Move Position/SizeChange parsing tests to niri-ipc 2025-08-27 10:55:16 +03:00
Ivan Molodetskikh 66584ab466 config: Extract debug 2025-08-27 10:46:46 +03:00
Ivan Molodetskikh 3c11004515 config: Extract gestures 2025-08-27 10:46:46 +03:00
Ivan Molodetskikh 02e3f9f66e config: Extract appearance and layout 2025-08-27 10:46:46 +03:00
Ivan Molodetskikh 19c576cfd8 config: Extract output 2025-08-27 10:43:57 +03:00
Ivan Molodetskikh ab52bb9521 config: Extract input 2025-08-27 10:43:57 +03:00
Ivan Molodetskikh da5e33775c config: Extract animations 2025-08-27 10:43:57 +03:00
Ivan Molodetskikh 1e3ab8a880 config: Extract window_rule 2025-08-27 10:43:57 +03:00
gibberish e038b8770a Fix focus=false for move-column-to-workspace*, add to move-window-to-workspace-up/down 2025-08-27 09:17:58 +03:00
Ivan Molodetskikh effae2bc2b Bump dependencies 2025-08-26 21:17:28 +03:00
Ivan Molodetskikh 210d5e90fe exit_confirm_dialog: Add open/close animation 2025-08-22 08:57:08 +03:00
Ivan Molodetskikh 34b05e8671 Rename spawn-at-startup-sh => spawn-sh-at-startup
Makes a bit more sense
2025-08-20 15:10:05 +03:00
Ivan Molodetskikh e81f356908 Add spawn-sh, spawn-at-startup-sh
Our top 10 most confusing config moments
2025-08-20 14:43:50 +03:00
Bernardo Kuri 5ea9092a49 Add per-axis scroll speed config for input devices (#2109)
* Add per-axis scroll speed config for input devices.

Accepts negative values to inverse scroll direction.

Properly complements/overrides global `scroll-direction` setting.

Includes docs and tests.

* Update per-axis scroll factor implementation after testing

- Refined configuration structure in niri-config
- Updated input handling to use per-axis scroll factors
- Added comprehensive test snapshots
- Updated documentation with per-axis examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Simplify per-axis scroll factor implementation per review feedback

- Make documentation concise and clear
- Remove unnecessary comments and test helper functions
- Use inline snapshots for tests
- Rename get_factors() to h_v_factors() for clarity
- Remove unnecessary .clone() calls (ScrollFactor is Copy)
- Reduce test count to essential cases only
- Fix comment about window factor override behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove unnecessary ScrollFactor::new() helper function

The maintainer prefers minimal code, so removing this helper and
constructing ScrollFactor directly in tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix scroll factor behavior - all settings now multiply with window factor

Per maintainer feedback, both combined and per-axis scroll settings
should multiply with the window-specific scroll factor, not override it.
This ensures consistent behavior regardless of configuration method.

Also removed the now-unused has_per_axis_override() method.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Final cleanup: remove redundant comments and unused snapshot files

- Removed unused snapshot files (now using inline snapshots)
- Removed redundant inline comments in tests
- Simplified test descriptions to be more concise

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Convert scroll factor parsing tests to use assert_debug_snapshot

Updates parse_scroll_factor_combined, parse_scroll_factor_split, and
parse_scroll_factor_partial tests to use assert_debug_snapshot instead
of manual assert_eq comparisons, as requested in PR review.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Convert to inline snapshots as requested

- Convert all scroll factor parsing tests to use inline snapshots instead of external files
- Remove external snapshot files to keep test directory clean
- All tests still pass with inline snapshot assertions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix missed assert_eq in parse_scroll_factor_mixed test

Converts the remaining assert_eq calls to assert_debug_snapshot
with inline snapshots in the mixed syntax test function.
Also fixes raw string delimiters from ### to #.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Convert scroll_factor_h_v_factors test to use assert_debug_snapshot

Makes all scroll factor tests consistent by using snapshots instead
of assert_eq for better maintainability.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fixes

---------

Co-authored-by: Bernardo Kuri <github@bkuri.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-19 05:51:32 +00:00
Kent Daleng dc93f1c1fd github wiki replacement / mkdocs-docs (#2147)
* Add wiki based on mkdocs

* wording fixes

* fix github bg color on narrow

* Fix left sidebar section headers being bigger than pages

* fix hover accent

* fix list rendering on fractional layout

* fix videos

* fix automatic full links

* remove redundant commented css

* improve dark mode contrast

* update pygments for better child node coloring

* update logo

* remove blank lines

* add systemd language hint

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-17 17:05:41 +03:00
Horu 271534e115 Add ConfigLoaded event to IPC, option to disable built-in notification (#1829)
* feat: config reload ipc event

* cleanups

* Rename and move the new config option

* rename to ConfigLoaded and emit at connection

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-17 09:28:24 +03:00
Ivan Molodetskikh 0044578681 Fix new lifetime warnings 2025-08-11 09:39:28 +03:00
vanderlokken 67361f88fd Add the LoadConfigFile action (#2163)
* Add the `LoadConfigFile` action

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-09 12:20:08 +00:00
BB f74d83dcca niri-config: add keep-max-bpc-unchanged option (#2195)
* niri-config: add disable-set-bpc option
setting bpc to 8 bricks some OLED displays driven by amdgpu

* change to keep-max-bpc-unchanged and add to wiki

* fmt

* Update wiki/Configuration:-Debug-Options.md

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-07 11:06:11 -07:00
sodiboo 52c579d556 fix hot reloading /etc/niri/config.kdl (#1907)
* refactor config load logic, and properly watch the system config path

* move config creation to niri-config, and make the errors a bit nicer

notably, "error creating config" is now a cause for "error loading
config", instead of it being one error and then "error loading config:
no such file or directory". also, failure to load a config is now
printed as an error level diagnostic (because it is indeed an error, not
just a warning you can shrug off)

* refactor watcher tests; add some new ones

now they check for the file contents too! and i added some tests for
ConfigPath::Regular, including a messy one with many symlink swaps

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-05 06:27:28 -07:00
Ivan Molodetskikh f49ecc31c4 pw_utils: Wait for frame completion before queueing
Without explicit sync, we have no way to signal the PipeWire consumer when the
rendering is done. So, wait until it's done before giving it the frame.

This should fix flickering screencasts on NVIDIA.
2025-08-04 14:36:34 +02:00
Ivan Molodetskikh dfb3683187 Fix new Clippy warnings 2025-07-13 12:54:03 +03:00