Skip to content

Commit

Permalink
🔧 match the existing format
Browse files Browse the repository at this point in the history
  • Loading branch information
noonsleeper authored and gasinvein committed Jun 8, 2024
1 parent b51ea4b commit 7b72347
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions editor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ function display_server_args (){
# See https://github.com/flathub/im.riot.Riot/blob/3fdd41c84f40fa1e8e186bade5d832d79045600c/element.sh
# See also https://gaultier.github.io/blog/wayland_from_scratch.html
# and https://github.com/flathub/com.vscodium.codium/issues/321
if [ "wayland" == "${XDG_SESSION_TYPE}" ] && [ -n "${WAYLAND_DISPLAY}" ]
then
if [[ "${WAYLAND_DISPLAY}" =~ ^/ ]]
then
if [ "wayland" == "${XDG_SESSION_TYPE}" ] && [ -n "${WAYLAND_DISPLAY}" ]; then
if [[ "${WAYLAND_DISPLAY}" =~ ^/ ]]; then
wayland_socket="${WAYLAND_DISPLAY}"
else
wayland_socket="${XDG_RUNTIME_DIR:-/run/user/${UID}}/${WAYLAND_DISPLAY}"
fi
fi

if [ -e "$wayland_socket" ]
then
if [ -e "$wayland_socket" ]; then
DISPLAY_SERVER_ARGS="--ozone-platform=wayland --enable-wayland-ime --enable-features=WaylandWindowDecorations"
[ -c /dev/nvidia0 ] && DISPLAY_SERVER_ARGS="${DISPLAY_SERVER_ARGS} --disable-gpu-sandbox"
else
Expand Down

0 comments on commit 7b72347

Please sign in to comment.