crispyricepc / sway-nvidia

Helper files to make sway a better experience for us poor NVIDIA users.
https://aur.archlinux.org/packages/sway-nvidia
144 stars 5 forks source link

Why xwayland ? #6

Closed ghost closed 1 year ago

ghost commented 1 year ago

https://github.com/crispyricepc/sway-nvidia/blob/3024c13f4675de081640ee9a0f3679c3886318b5/sway-nvidia.sh#L4

tukusejssirs commented 1 year ago

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.