diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index 4a29023..248cdc1 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -270,6 +270,11 @@ in { }; window.titlebar = false; }; + + extraConfig = '' + bindswitch --reload --locked lid:on exec "[$(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq '. | length') -gt 1] && swaymsg output eDP-1 disable" + bindswitch --reload --locked lid:off output eDP-1 enable + ''; }; programs.waybar = {