From 90dd724794c1ace3f275ef78328fedb931849214 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 25 Aug 2024 01:55:08 +0200 Subject: [PATCH] Hyprland make tearing disabled by default --- modules/programs/hyprland/hyprland.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 50dd979..334136b 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -29,6 +29,14 @@ The workspace configuration for hyprland. ''; }; + no_atomic = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Use tearing + ''; + }; extra_autostart = lib.mkOption { default = [ ]; example = [ "your application" ]; @@ -195,7 +203,7 @@ "col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; # "col.inactive_border" = "0x66333333"; - allow_tearing = true; + allow_tearing = lib.mkIf config.mods.hyprland.no_atomic true; }; decoration = { rounding = 4; }; @@ -269,7 +277,7 @@ "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" "QT_SCALE_FACTOR,1" ''EDITOR,"neovide --novsync --nofork"'' - "WLR_DRM_NO_ATOMIC,1" + (lib.mkIf config.mods.hyprland.no_atomic "WLR_DRM_NO_ATOMIC,1") "GTK_USE_PORTAL, 1" ];