diff --git a/arduino-ide.sh b/arduino-ide.sh index 6193758..a71026c 100644 --- a/arduino-ide.sh +++ b/arduino-ide.sh @@ -2,9 +2,13 @@ FLAGS='' -if [[ $XDG_SESSION_TYPE == "wayland" ]] && [ -c /dev/nvidia0 ] -then - FLAGS="$FLAGS --disable-gpu-sandbox" +if [[ $XDG_SESSION_TYPE == "wayland" ]]; then + if [ -c /dev/nvidia0 ]; then + FLAGS="$FLAGS --disable-gpu-sandbox" + fi + if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + FLAGS="$FLAGS --enable-features=UseOzonePlatform --ozone-platform=wayland" + fi fi # I cracked zypak's secrets diff --git a/cc.arduino.IDE2.json b/cc.arduino.IDE2.json index 22441f6..e6814b5 100644 --- a/cc.arduino.IDE2.json +++ b/cc.arduino.IDE2.json @@ -8,7 +8,8 @@ "command": "arduino-ide", "separate-locales": false, "finish-args": [ - "--socket=x11", + "--socket=wayland", + "--socket=fallback-x11", "--socket=pulseaudio", "--share=ipc", "--share=network",