Cannot drag file on arch linux niri

What I’m trying to do

I m arch linux with niri,after installing obsdian via paru,i found i couldn’t drag pdf to it unless i use
obsidian --ozone-platform=wayland

Things I have tried

i want to drag pdf to obsdian with command “obsdian” instead of "
obsidian --ozone-platform=wayland"

Hello!

To permanently enable Wayland support without typing the full flag, the cleanest method is to create an Electron configuration file. Run nano ~/.config/obsidian-flags.conf and add the line --ozone-platform=wayland inside; this ensures Obsidian always launches natively in Wayland mode, which is necessary for niri to handle drag-and-drop protocols correctly. Alternatively, you can copy the desktop entry to ~/.local/share/applications/obsidian.desktop and modify the Exec line to include the flag, ensuring that app launchers also use the Wayland-native version.

Thank you for your reply.

Although i prefer “alias obsidian= ‘obsidian --ozone-platform=wayland’“.