Bash: Start sway only when enabled.

This commit is contained in:
Dmitry Voronin 2025-01-18 21:44:23 +03:00
parent ad77bffae7
commit 739d3e0fee
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -1,8 +1,9 @@
{ {
util, config,
lib,
pkgs, pkgs,
secret, secret,
config, util,
... ...
}: }:
let let
@ -42,7 +43,8 @@ in
# Export all functions. # Export all functions.
export -f $(find_function | tr '\n' ' ') export -f $(find_function | tr '\n' ' ')
export -f find_function export -f find_function
''
+ lib.optionalString config.module.sway.enable ''
# Autostart Sway. # Autostart Sway.
if [[ -z $DISPLAY ]] && [[ "$(tty)" = "/dev/tty1" ]]; then if [[ -z $DISPLAY ]] && [[ "$(tty)" = "/dev/tty1" ]]; then
exec sway exec sway