forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 055a94de3d3b792adfb6842bdddd8eab6384164fFiltered to src/main.rsClear filter

2025-08-05

fix hot reloading `/etc/niri/config.kdl` (#1907)sodiboo · Unverified52c579d
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-07-18

2025-07-16

2025-07-14

Print when exiting by signalIvan Molodetskikh · 56901ee
Print when exiting by signal

Doesn't appear to work at the moment?
Set logind LockedHint on lock/unlock (#1763)peelz · Unverified25cbb73
Set logind LockedHint on lock/unlock (#1763)

* Set logind LockedHint on lock/unlock

* fixup! Set logind LockedHint on lock/unlock

- use warn!() instead of error!()
- extract dbus call into a separate method

* fixup! Set logind LockedHint on lock/unlock

- Update LockedHint in refresh_and_flush_clients

* fixup! Set logind LockedHint on lock/unlock

woops

* fixup! Set logind LockedHint on lock/unlock

- only call SetLockedHint if niri was run with `--session`

* fixes

---------

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

2025-07-13

2025-07-14

Add nushell completion support (#2009)Artrix · Unverified746a7e8
Add nushell completion support (#2009)

* Add nushell completion support

Adds `clap_complete_nushell` crate and implements it into the `niri
completions` command.

* Add nushell to flake.nix autocompletions

* Convert to `TryFrom`

* Fix linting errors

* Move types down

---------

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

2025-06-04

2025-05-09

refactor(main): eliminate a `mut` from config load code in mainJames Sully · 7a10f71
refactor(main): eliminate a `mut` from config load code in main 

I think this makes for marginally better readability, since you don't
have to wonder whether config_errored is set anywhere else. It's also
slightly terser.
fix: don't try to create a default config at path that existsJames Sully · ea7add3
fix: don't try to create a default config at path that exists

Currently this bug has no actual consequences, we just continue silently
on AlreadyExists in main()
(this line: https://github.com/YaLTeR/niri/blob/e9c6f08906143c3fec1ad1301d538bef4cbc1978/src/main.rs#L151).

This commit just eliminates the redundant attempt.

2025-03-12

main: Log to stderr instead of stdoutJon Heinritz · e88dfae
main: Log to stderr instead of stdout

Currently we can't use logging in paths like niri msg that have meaningful
stdout. Logging to stderr makes that possible. Even if we don't want to log
anything in niri msg code paths, it's easy to have something accidentally log.

2025-03-10

Add Shell completions (#1226)Jon Heinritz · Unverified87b6c12
Add Shell completions (#1226)

* feat(cli): add subcommand to generate shell completions

* Update src/cli.rs

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

---------

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

2025-02-16

Enable fancy miette errors for the main binaryIvan Molodetskikh · 108e88e
Enable fancy miette errors for the main binary

Seems there's not much dependency/binary size impact now, compared to when I
first made the KDL config.

2025-02-12

Parse the config on the file watcher threadIvan Molodetskikh · ef80bcc
Parse the config on the file watcher thread

It takes a while, so let's not block the main thread.

2025-02-05

2025-01-27

2025-01-12

Support `WAYLAND_SOCKET` in winit backendbbb651 · c523c80
Support `WAYLAND_SOCKET` in winit backend

I know of a single compositor that supports `WAYLAND_SOCKET` but not
`WAYLAND_DISPLAY`: https://gitlab.freedesktop.org/mstoeckl/windowtolayer

This should also make niri more robust against accidentally setting
`WAYLAND_SOCKET` when starting as a session, before programs could fail
if they preffered `WAYLAND_SOCKET` over `WAYLAND_DISPLAY`

2024-12-20

Add a Headless backend for testsIvan Molodetskikh · fbb0054
Add a Headless backend for tests

Rendering and stuff is unimplemented.

2024-11-03

xdg: startup activationChristian Meissl · 61f2ac0
xdg: startup activation

pass an activation token to process spawned through actions

2024-11-24

2024-11-02

2024-09-13

Add NIRI_DISABLE_SYSTEM_MANAGER_NOTIFY envIvan Molodetskikh · 22fee7b
Add NIRI_DISABLE_SYSTEM_MANAGER_NOTIFY env

Useful for UWSM I guess.

2024-09-04

2024-09-02

2024-05-26

2024-05-23

Increase RLIMIT_NOFILE to maximumIvan Molodetskikh · bcca03c
Increase RLIMIT_NOFILE to maximum

Fixes Xwayland + RustRover crashing.

See similar changes:
* https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2235
* https://github.com/swaywm/sway/pull/6629

2024-05-09

2024-04-21

2024-03-06

Adjust commentsIvan Molodetskikh · cedfd49Browse files
Add dinit support (#246)metent · Unverified431f070
Add dinit support (#246)

* Add dinit support

- Add --notify-fd cli flag for ready notifications
- Set dinit activation environment when "dinit" feature flag is enabled

* Make systemd and dinit environment activation additive

* Use NOTIFY_FD env variable instead of --notify-fd cli flag for sending ready notifications

* Format with rustfmt

2024-02-24

2024-02-22

Fix new warningsIvan Molodetskikh · af6485cBrowse files

2024-02-21

Move watcher to utilsIvan Molodetskikh · 9e60b34Browse files
Move spawn to submoduleIvan Molodetskikh · 2c01cdeBrowse files

2024-02-20

Upgrade logs about removing env vars to warn!Ivan Molodetskikh · 5b3bfd9
Upgrade logs about removing env vars to warn!

These are more visible now with the --session flag.
Add --session CLI flag instead of detection based on systemd serviceIvan Molodetskikh · f0a5e9c
Add --session CLI flag instead of detection based on systemd service

Allows running without systemd.

2024-02-19

utils/spawn: Put processes into systemd scopesIvan Molodetskikh · 6ba24e3
utils/spawn: Put processes into systemd scopes

This separates them from the niri scope for the purposes of e.g. the OOM
killer only killing the app and not the compositor.

2024-02-12

2024-02-10

Move CLI types to submoduleIvan Molodetskikh · e68641cBrowse files

2024-02-07

2024-02-05

Add lib.rs, become a mixed lib-bin crateIvan Molodetskikh · 3789d85
Add lib.rs, become a mixed lib-bin crate

Will be used for visual tests.

2024-02-01

2024-01-29

Implement wlr-foreign-toplevel-managementIvan Molodetskikh · 59ff331
Implement wlr-foreign-toplevel-management

The parent event isn't sent but whatever.

2024-01-28