先编辑niri的配置文件位于~.config/niri/config.kdl
加入以下内容
window-rule {
match app-id="com-st-microxplorer-maingui-STM32CubeMX"
open-floating true
}
再编辑stmcubemx的desktop文件
用aur安装的话应该会在/usr/share/applications
在stm32cubemx.desktop中,修改 Exec=stm32cubemx %F 为 Exec=env _JAVA_AWT_WM_NONREPARENTING=1 AWT_TOOLKIT=MToolkit stm32cubemx