crispyricepc/sway-nvidia

Why xwayland ?

Closed this issue · 1 comments

if [ "x$XDG_SESSION_TYPE" = "xwayland" ] &&

This code isn’t checking xwayland, but wayland. Note the x before x$XDG_SESSION_TYPE.

Some devs prefer using extra string before variables in BASH condition tests, i can’t remember why, but it had something to do with BASH version that evaluated the condition incorrectly or something liks that. The string could be anything, but in most scripts I’ve seen, they use x.