mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2024-12-23 03:02:53 +01:00
24 lines
1.1 KiB
Bash
Executable File
24 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
if [ -f /usr/bin/code-insiders ]; then
|
|
/usr/bin/code-insiders --verbose --enable-features=WaylandWindowDecorations,UseOzonePlatform --ozone-platform=wayland "$@"
|
|
|
|
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
|
|
snap run code-insiders --verbose --enable-features=WaylandWindowDecorations,UseOzonePlatform --ozone-platform=wayland "$@"
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/run/com.visualstudio.code.insiders ]; then
|
|
flatpak run --user com.visualstudio.code.insiders --verbose --no-sandbox --ozone-platform=wayland --enable-features=WaylandWindowDecorations "$@"
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/run/com.visualstudio.code.insiders ]; then
|
|
flatpak run com.visualstudio.code.insiders --verbose --no-sandbox --ozone-platform=wayland --enable-features=WaylandWindowDecorations "$@"
|
|
|
|
else
|
|
echo "code not found :("
|
|
fi
|
|
set +x
|