From 80ee98058e6e54620fc3f51da1b2bb88bac359ee Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 10 Jan 2022 17:41:57 +0100 Subject: [PATCH] mayushii: Configure new monitor setup This configures the home profile for kanshi for an Acer B277K monitor. Since it is both larger than my previous monitor and has a higher resolution, a few things change with this. For one, my preferred setup is now to just have one monitor instead of having my laptop screen as a secondary display device. Therefore, logind should not suspend if the lid is closed. Since it fails to accurately detect when a dock is connected, it is configured to never suspend on lid switch when external power is connected. Another thing is that the high resolution makes it necessary to use a scaling factor, which is quite easy to configure with sway and kanshi. It does, however, not work for Xwayland clients (they render at a lower resolution and are scaled up with nearest-neighbor interpolation). That requires me to no longer force the qt backend to xcb for qutebrowser, because that significantly lowers the browsing experience. The setup for sayuri is still to be done. --- machines/mayushii/hardware-configuration.nix | 6 +++--- users/simon/modules/qutebrowser/default.nix | 3 --- users/simon/modules/sway/kanshi.nix | 12 +++++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/machines/mayushii/hardware-configuration.nix b/machines/mayushii/hardware-configuration.nix index 04eccc7..eb0dd96 100644 --- a/machines/mayushii/hardware-configuration.nix +++ b/machines/mayushii/hardware-configuration.nix @@ -54,9 +54,9 @@ }; }; - # Most of the time I want to use both screens at the same time and suspend it - # regularily by closing the lid - services.logind.lidSwitchDocked = config.services.logind.lidSwitch; + # logind fails to detect that the system is still docked when the external + # monitor is switched off via dpms + services.logind.lidSwitchExternalPower = "ignore"; environment.systemPackages = with pkgs; [ radeontop diff --git a/users/simon/modules/qutebrowser/default.nix b/users/simon/modules/qutebrowser/default.nix index 143fe77..319c134 100644 --- a/users/simon/modules/qutebrowser/default.nix +++ b/users/simon/modules/qutebrowser/default.nix @@ -200,9 +200,6 @@ in url.default_page = "about:blank"; url.start_pages = [ "about:blank" ]; - # hack to circumvent memory leak (https://github.com/qutebrowser/qutebrowser/issues/1476) - qt.force_platform = "xcb"; - # Privacy content.cookies.accept = "no-3rdparty"; content.headers.user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"; diff --git a/users/simon/modules/sway/kanshi.nix b/users/simon/modules/sway/kanshi.nix index 933a20e..c83879e 100644 --- a/users/simon/modules/sway/kanshi.nix +++ b/users/simon/modules/sway/kanshi.nix @@ -11,17 +11,19 @@ let criteria = "eDP-1"; mode = "1920x1080"; position = "0,0"; + status = "enable"; }; home.outputs = [ { criteria = "eDP-1"; - mode = "1920x1080"; - position = "0,60"; + position = "1920,0"; + status = "disable"; } { - criteria = "Dell Inc. DELL U2410 F525M0A104NL"; - mode = "1920x1200"; - position = "1920,0"; + criteria = "Acer Technologies Acer B277K 0x0000F36C"; + mode = "3840x2160"; + position = "0,0"; + scale = 2.0; } ]; };