diff options
-rw-r--r-- | accounts/gkleen@sif/hyprland.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix index 83b13729..22b64611 100644 --- a/accounts/gkleen@sif/hyprland.nix +++ b/accounts/gkleen@sif/hyprland.nix | |||
@@ -271,6 +271,24 @@ in { | |||
271 | "$mainMod, mouse:272, movewindow" | 271 | "$mainMod, mouse:272, movewindow" |
272 | "$mainMod, mouse:273, resizewindow" | 272 | "$mainMod, mouse:273, resizewindow" |
273 | ]; | 273 | ]; |
274 | bindl = [ | ||
275 | ", switch:off:Lid Switch,exec,hyprctl dispatch dpms on eDP-1" | ||
276 | ", switch:on:Lid Switch,exec,hyprctl dispatch dpms off eDP-1" | ||
277 | |||
278 | ", switch:off:Lid Switch,exec,${pkgs.writeShellScript "clamshell-off" '' | ||
279 | export PATH="${lib.makeBinPath (with pkgs; [ jq ])}:$PATH" | ||
280 | [[ $(hyprctl monitors -j | jq '.[] | select(.name == "eDP-1") | .disabled') = "true" ]] || exit 0 | ||
281 | |||
282 | hyprctl keyword monitor \"eDP-1,3840x2160@59.99900,auto,1.5\"" | ||
283 | ''}" | ||
284 | ", switch:on:Lid Switch,exec,${pkgs.writeShellScript "clamshell-on" '' | ||
285 | export PATH="${lib.makeBinPath (with pkgs; [ jq ])}:$PATH" | ||
286 | |||
287 | [[ $(hyprctl monitors -j | jq 'reduce (.[] | select(.disabled == false)) as $_ (0; .+1)') -gt 1 ]] || exit 0 | ||
288 | |||
289 | hyprctl keyword monitor \"eDP-1,disable\" | ||
290 | ''}" | ||
291 | ]; | ||
274 | 292 | ||
275 | windowrulev2 = [ | 293 | windowrulev2 = [ |
276 | "suppressevent maximize fullscreen, class:.*" | 294 | "suppressevent maximize fullscreen, class:.*" |