From 98aaa974298405a65994501a479b71097b5c875f Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 15 Jul 2024 07:53:04 -0400 Subject: [PATCH] home/hyprland: don't include clamshell script if no laptopMonitors exist --- homeManagerModules/desktop/hyprland/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homeManagerModules/desktop/hyprland/default.nix b/homeManagerModules/desktop/hyprland/default.nix index b0d19fcc..20c76a8a 100644 --- a/homeManagerModules/desktop/hyprland/default.nix +++ b/homeManagerModules/desktop/hyprland/default.nix @@ -177,9 +177,11 @@ in { monitor = ,preferred,auto,auto - # Turn off the internal display when lid is closed. - bindl = ,switch:on:Lid Switch,exec,${clamshell} on - bindl = ,switch:off:Lid Switch,exec,${clamshell} off + ${lib.optionalString (cfg.desktop.hyprland.laptopMonitors != []) '' + # Turn off the internal display when lid is closed. + bindl = ,switch:on:Lid Switch,exec,${clamshell} on + bindl = ,switch:off:Lid Switch,exec,${clamshell} off + ''} # Enable virtual keyboard in tablet mode ${