From 0b02f1b94fed8488c06f5bf7be21272473563649 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Tue, 23 Aug 2022 17:45:48 +0200 Subject: [PATCH] Fix screen dpi + alacritty font size + obs plugins --- hm_modules/alacritty.nix | 2 +- hm_modules/autorandr.nix | 86 +++++++++++++++++++++++---------------- hm_modules/obs-studio.nix | 7 ++++ 3 files changed, 58 insertions(+), 37 deletions(-) diff --git a/hm_modules/alacritty.nix b/hm_modules/alacritty.nix index ff027e9..7534c09 100644 --- a/hm_modules/alacritty.nix +++ b/hm_modules/alacritty.nix @@ -38,7 +38,7 @@ in scrolling.history = 3000; font = { normal.family = pkgs.rice.font.monospace.name; - size = pkgs.rice.font.monospace.size; + size = pkgs.rice.font.monospace.size / 1.5; # Font size is broken }; window.opacity = pkgs.rice.opacity; mouse = { diff --git a/hm_modules/autorandr.nix b/hm_modules/autorandr.nix index 81598dd..ff92311 100644 --- a/hm_modules/autorandr.nix +++ b/hm_modules/autorandr.nix @@ -1,43 +1,57 @@ { programs.autorandr = { enable = true; - profiles = { - odin-intel = { - fingerprint = { "eDP1" = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; }; - config = { - "eDP1" = { primary = true; crtc = 0; mode = "1920x1080"; }; + profiles = + let + dell-laptop = { + dpi = 96; + fingerprint = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; + mode = "1920x1080"; + }; + in + { + odin-nvidia = { + fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; }; + config = { + "eDP-1-1" = { inherit (dell-laptop) mode dpi; primary = true; crtc = 0; }; + }; + }; + odin-intel = { + fingerprint = { "eDP1" = dell-laptop.fingerprint; }; + config = { + "eDP1" = { inherit (dell-laptop) mode dpi; primary = true; crtc = 0; }; + }; + }; + odin-intel-laboratorio-dock-dell = { + fingerprint = { + "DP1-3" = "00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088"; + "eDP1" = dell-laptop.fingerprint; + }; + config = { + "DP1-3" = { crtc = 1; mode = "1680x1050"; position = "120x0"; primary = true; dpi = 96; }; + "eDP1" = { inherit (dell-laptop) mode dpi; crtc = 0; position = "0x1080"; }; + }; + }; + odin-intel-laboratorio = { + fingerprint = { + "DP1-3" = "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081"; + "eDP1" = dell-laptop.fingerprint; + }; + config = { + "DP1-3" = { crtc = 1; mode = "1920x1080"; position = "0x0"; primary = true; dpi = 96; }; + "eDP1" = { inherit (dell-laptop) mode dpi; crtc = 0; position = "0x1080"; }; + }; + }; + thor-two-screens = { + fingerprint = { + "DP-4" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; + "HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; + }; + config = { + "DP-4" = { crtc = 0; mode = "2560x1440"; position = "1080x162"; primary = true; dpi = 96; }; + "HDMI-0" = { crtc = 1; mode = "1920x1080"; position = "0x0"; rotate = "right"; dpi = 96; }; + }; }; }; - odin-intel-laboratorio-dock-dell = { - fingerprint = { - "DP1-3" = "00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088"; - "eDP1" = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; - }; - config = { - "DP1-3" = { crtc = 1; mode = "1680x1050"; position = "120x0"; primary = true; }; - "eDP1" = { crtc = 0; mode = "1920x1080"; position = "0x1080"; }; - }; - }; - odin-intel-laboratorio = { - fingerprint = { - "DP1-3" = "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081"; - "eDP1" = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; - }; - config = { - "DP1-3" = { crtc = 1; mode = "1920x1080"; position = "0x0"; primary = true; }; - "eDP1" = { crtc = 0; mode = "1920x1080"; position = "0x1080"; }; - }; - }; - thor-two-screens = { - fingerprint = { - "DP-4" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; - "HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; - }; - config = { - "DP-4" = { crtc = 0; mode = "2560x1440"; position = "1080x162"; primary = true; }; - "HDMI-0" = { crtc = 1; mode = "1920x1080"; position = "0x0"; rotate = "right"; }; - }; - }; - }; }; } diff --git a/hm_modules/obs-studio.nix b/hm_modules/obs-studio.nix index 35aca65..24d75cc 100644 --- a/hm_modules/obs-studio.nix +++ b/hm_modules/obs-studio.nix @@ -2,7 +2,14 @@ { programs.obs-studio = { enable = true; + package = pkgs.obs-studio; plugins = with pkgs.obs-studio-plugins; [ + # obs-backgroundremoval + # obs-multi-rtmp + obs-nvfbc + obs-pipewire-audio-capture + obs-vkcapture + # obs-linuxbrowser # obs-gstreamer # obs-move-transition