Bash: Dont autostart sway for root.

This commit is contained in:
Dmitry Voronin 2025-01-19 13:44:21 +03:00
parent 2ec4a35e0c
commit 1c81d0a6c8
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -46,7 +46,7 @@ in
''
+ lib.optionalString config.module.sway.enable ''
# Autostart Sway.
if [[ -z $DISPLAY ]] && [[ "$(tty)" = "/dev/tty1" ]]; then
if [[ -z $DISPLAY ]] && [[ "$(tty)" = "/dev/tty1" ]] && [[ $UID != 0 ]]; then
exec sway
fi
'';