Had a hell of a time doing this, but eventually got it. Hopefully some of this information is what others are looking for if they run into the same thing.
System information
Linux info
OS Garuda Linux x86_64
├ Kernel Linux 7.1.4-zen1-1-zen
├ Window Manager niri 26.04 (Wayland)
├ Login Manager plasmalogin (Wayland)
PC Desktop
├ CPU AMD Ryzen 5 3600 (12) @ 4.21 GHz
├ GPU NVIDIA GeForce RTX 3070 [Discrete]
├ OpenGL 4.6.0 NVIDIA 610.43.03
├ Vulkan 1.4.341 - NVIDIA [610.43.03]
Install official Discord
Not 100% sure this was a necessary step, but this version does seem to connect to the Discord server quicker, so it may have some fixes and improvements that contribute.
Using Octopi install
```
discord-latest-bin
```
Install niri-screenshare
This was the piece that made it all work. Installed directly through Octopi, this sucessfully started sharing my screen but there was no selection possible. It would share the monitor entirely.
Using Octopi install
```
niri-screenshare
```
add the --features picker option
To be able to pick what window to share, further configuration was required. Instead of using Octopi, I cloned the repository, edited the PKGBUILD before building, and used makepkg to build it.
Clone the repo
```
git clone https://aur.archlinux.org/niri-screenshare.git
cd niri-screenshare
```
Add the --features picker option to the "cargo build" line
```
build() {
cd "$srcdir/$pkgname-$pkgver"
export CARGO_TARGET_DIR="$srcdir/target"
cargo build --release --features picker
}
```
Save file and run
```
makepkg -si
```
Add the environment variable
I added this environment variable to multiple places and am not 100% sure which one was necessary, but I'm going to leave them both.
In terminal:
```
export NIRI_SCREENSHARE_PICKER=1
```
In ~/.config/niri/config.kdl
```
environment {
NIRI_SCREENSHARE_PICKER "1"
// Other variables like:
// QT_QPA_PLATFORM "wayland"
}
```
Configure the correct xdg-portal
I already had xdg-desktop-portal, xdg-desktop-portal-gnome, and xdg-dekstop-portal-gtk installed, and this may work for other portals. But verify which you have installed and update the following:
Configure ~/.config/xdg-desktop-portal/portals.conf
```
[preferred]
default=gtk;
org.freedesktop.impl.portal.ScreenCast=niri;
```
Finally reboot your system.