2024-04-15 10:01:24 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
if [ -f /usr/bin/code-insiders ]; then
|
2024-04-19 12:57:52 +02:00
|
|
|
/usr/bin/code-insiders --verbose --enable-features=WaylandWindowDecorations,UseOzonePlatform,WebContentsForceDark --ozone-platform-hint=auto "$@"
|
2024-04-15 10:01:24 +02:00
|
|
|
|
|
|
|
elif [ -f /snap/bin/code-insiders ]; then
|
|
|
|
# https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1951491/comments/104
|
|
|
|
#unset DBUS_SESSION_BUS_ADDRESS
|
|
|
|
# https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1951491/comments/105
|
|
|
|
#export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
|
2024-04-19 12:57:52 +02:00
|
|
|
snap run code-insiders --verbose --enable-features=WaylandWindowDecorations,UseOzonePlatform,WebContentsForceDark --ozone-platform-hint=auto "$@"
|
2024-04-15 10:01:24 +02:00
|
|
|
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/run/com.visualstudio.code.insiders ]; then
|
2024-04-19 12:57:52 +02:00
|
|
|
flatpak run --user com.visualstudio.code.insiders --verbose --no-sandbox --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebContentsForceDark "$@"
|
2024-04-15 10:01:24 +02:00
|
|
|
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/run/com.visualstudio.code.insiders ]; then
|
2024-04-19 12:57:52 +02:00
|
|
|
flatpak run com.visualstudio.code.insiders --verbose --no-sandbox --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebContentsForceDark "$@"
|
2024-04-15 10:01:24 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
echo "code not found :("
|
|
|
|
fi
|
|
|
|
set +x
|