env-niri isn't loading env vars defined there and a feature request for loading multiple env files
Hi, I have 2 related issues:
1. I am running niri and `XDG_CURRENT_DESKTOP` returns `niri`. The docs say I should be able to add `~/.config/uwsm/env/env-niri` but when I export env variables in that file they are not available after I reboot, however if I add them to `~/.config/uwsm/env` then they are available. The expectation is they would get merged together and all be available.
2. Is there a pattern to add arbitrary env files that will get picked up?
Number 2 is especially important because I have my dotfiles all git committed but I want to export NVIDIA specific env vars on a device that has an NVIDIA card but I don't want a different AMD device to have these defined.
If number 1 worked I could git ignore `env-niri` and use that as a local file for 1 specific device. It wouldn't be named the best but it would work, however the issue related to number 1 prevents that.
I'd like to propose supporting something like `~/.config/uwsm/env.d/` and any files in there will get sourced in alphabetical order. Anything defined there would overwrite `~/.config/uwsm/env` as well. This matches how many other tools work and lets you do `10-hello`, `20-world` to order them in a user controlled way. The shell already supports overwriting duplicate keys where the last one wins.
关闭于 2025-12-30 13 条评论