From 577fd364fda7ff2f62aa4a5847c38a840cbd2c50 Mon Sep 17 00:00:00 2001 From: soraefir Date: Sun, 14 Jun 2026 10:16:57 +0200 Subject: [PATCH] Cleanup kanshi&HDR --- modules/home/gui/apps/mpv/default.nix | 2 +- modules/home/wayland/apps/kanshi/default.nix | 113 +++++++++---------- modules/home/wayland/hyprland/config.nix | 12 +- 3 files changed, 68 insertions(+), 59 deletions(-) diff --git a/modules/home/gui/apps/mpv/default.nix b/modules/home/gui/apps/mpv/default.nix index 8677b22..11aafc7 100755 --- a/modules/home/gui/apps/mpv/default.nix +++ b/modules/home/gui/apps/mpv/default.nix @@ -4,7 +4,7 @@ programs.mpv = { enable = true; scripts = with pkgs; [ mpvScripts.mpris ]; - }; + };#--target-colorspace-hint-mode=source for HDR programs.yt-dlp.enable = true; }; diff --git a/modules/home/wayland/apps/kanshi/default.nix b/modules/home/wayland/apps/kanshi/default.nix index 84a020c..ac142f5 100644 --- a/modules/home/wayland/apps/kanshi/default.nix +++ b/modules/home/wayland/apps/kanshi/default.nix @@ -1,109 +1,108 @@ -{ config, lib, ... }: { +{ config, lib, pkgs, ... }: +let + baseOutput = { + position = "0,0"; + scale = 1.0; + adaptiveSync = true; + status = "enable"; + }; + +in { config = lib.mkIf (config.usercfg.wm == "Wayland") { services.kanshi = { enable = true; systemdTarget = "graphical-session.target"; settings = [ - { - profile.name = "tower_0"; - profile.outputs = [ + {output = baseOutput//{ + criteria = "AOC 24E1W1 GNSKCHA086899"; + mode = "1920x1080@60.000"; + };} + {output = baseOutput//{ + criteria = "AOC 24E1W1 GNSKBHA080346"; + mode = "1920x1080@60.000"; + };} + {output = baseOutput//{ + criteria = "LG UNKNOWN_TBD"; + mode = "1920x1080@144.000"; + };} + {output = baseOutput//{ + criteria = "LG Display 0x060A Unknown"; + mode = "1920x1080@60.020"; + };} + {output = baseOutput//{ + criteria = "CEX CX133 0x00000001"; + mode = "2560x1600@59.972"; + };} + {output = baseOutput//{ + criteria = "AOC 16G3 1DDP7HA000348"; + mode = "1920x1080@144.000"; + };} + + {profile = { + name = "tower_0"; + outputs = [ { criteria = "AOC 24E1W1 GNSKCHA086899"; - mode = "1920x1080@60.000"; position = "0,0"; - status = "enable"; - scale = 1.0; - adaptiveSync = true; } { criteria = "AOC 24E1W1 GNSKBHA080346"; - mode = "1920x1080@60.000"; position = "1920,0"; - status = "enable"; - scale = 1.0; - adaptiveSync = true; } ]; - } - { - profile.name = "tower_1"; - profile.outputs = [ + exec = [ "${pkgs.eww}/bin/eww open bar --screen 1" ]; + };} + {profile = { + name = "tower_1"; + outputs = [ { criteria = "AOC 24E1W1 GNSKCHA086899"; - mode = "1920x1080@60.000"; position = "0,0"; - status = "enable"; - scale = 1.0; - adaptiveSync = true; } { criteria = "AOC 24E1W1 GNSKBHA080346"; - mode = "1920x1080@60.000"; position = "0,0"; - status = "enable"; - scale = 1.0; - adaptiveSync = true; } { criteria = "LG UNKNOWN_TBD"; - mode = "1920x1080@144.000"; position = "0,0"; - status = "enable"; - scale = 1.0; - adaptiveSync = true; } ]; - } - { - profile.name = "laptop_0"; - profile.outputs = [{ + };} + {profile = { + name = "laptop_0"; + outputs = [{ criteria = "LG Display 0x060A Unknown"; - mode = "1920x1080@60.020"; position = "0,0"; - scale = 1.0; - status = "enable"; }]; - } - { - profile.name = "laptop_1"; - profile.outputs = [ + };} + {profile = { + name = "laptop_1"; + outputs = [ { criteria = "CEX CX133 0x00000001"; - mode = "2560x1600@59.972"; position = "0,0"; - scale = 1.0; - status = "enable"; } { criteria = "LG Display 0x060A Unknown"; - mode = "1920x1080@60.020"; position = "2560,0"; - scale = 1.0; - status = "enable"; } ]; - } - { - profile.name = "laptop_2"; - profile.outputs = [ + };} + {profile = { + name = "laptop_2"; + outputs = [ { criteria = "AOC 16G3 1DDP7HA000348"; - mode = "1920x1080@144.000"; position = "0,0"; - status = "enable"; - scale = 1.0; - adaptiveSync = true; } { criteria = "LG Display 0x060A Unknown"; - mode = "1920x1080@60.020"; position = "1920,0"; - scale = 1.0; - status = "enable"; } ]; - } + };} ]; }; }; diff --git a/modules/home/wayland/hyprland/config.nix b/modules/home/wayland/hyprland/config.nix index 2dc425a..c7e67b8 100644 --- a/modules/home/wayland/hyprland/config.nix +++ b/modules/home/wayland/hyprland/config.nix @@ -85,7 +85,13 @@ in { tap_to_click = false; }; }; - + render = { + cm_enabled = true; + cm_auto_hdr = 1; + }; + quirks = { + # prefer_hdr = 1; + }; misc = { force_default_wallpaper = -1; disable_hyprland_logo = true; @@ -93,6 +99,10 @@ in { animate_manual_resizes = false; vrr = 1; }; + ecosystem = { + no_update_news = true; + no_donation_nag = true; + }; general = { gaps_in = config.colorScheme.palette.gaps-window; gaps_out = config.colorScheme.palette.gaps-screen;