From 35a7315b77467bd796d14f19103934530f673554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 15 Jul 2019 21:31:39 +0100 Subject: [PATCH] Better hidpi handling --- nixos/common.nix | 3 ++- nixos/home.nix | 1 - nixos/programs/alacritty.nix | 4 ++-- nixos/user-xsession.nix | 9 ++++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/nixos/common.nix b/nixos/common.nix index 67e3ef9c..b25f376b 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -76,8 +76,9 @@ in clickMethod = "clickfinger"; }; - displayManager.slim = { + displayManager.sddm = { enable = true; + enableHidpi = true; }; }; }; diff --git a/nixos/home.nix b/nixos/home.nix index a53b42c0..ce2e67d1 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -27,7 +27,6 @@ in ]; home.sessionVariables = { TERMINAL="alacritty"; - GDK_SCALE="2"; QT_AUTO_SCREEN_SCALE_FACTOR="1"; }; diff --git a/nixos/programs/alacritty.nix b/nixos/programs/alacritty.nix index f1be2f6d..886ecd1f 100644 --- a/nixos/programs/alacritty.nix +++ b/nixos/programs/alacritty.nix @@ -17,7 +17,7 @@ font = { family = "DejaVu Sans Mono for Powerline"; - size = 12.0; + size = 8.0; }; draw_bold_text_with_bright_colors = true; @@ -50,7 +50,7 @@ white= "0xfdf6e3"; }; - background_opacity= 1.0; + background_opacity = 0.9; dynamic_title= true; }; cursor= { diff --git a/nixos/user-xsession.nix b/nixos/user-xsession.nix index 165e22b7..e265a9cd 100644 --- a/nixos/user-xsession.nix +++ b/nixos/user-xsession.nix @@ -14,6 +14,7 @@ in package = pkgs.i3-gaps; config = { startup = [ + { command = "exec autorandr -c"; always = true; notification = false; } { command = "exec i3-sensible-terminal"; always = false; notification = false; } { command = "exec $HOME/dev/dotfiles/lock.sh"; always = false; notification = false; } ]; @@ -61,6 +62,10 @@ in programs.autorandr = { enable = true; + hooks.postswitch = { + "notify-i3" = "''${pkgs.i3}/bin/i3-msg restart"; + }; + profiles = { "foureighty-alone" = { fingerprint = { @@ -70,10 +75,8 @@ in eDP1 = { enable = true; primary = true; - position = "0x0"; mode = "2560x1440"; - rate = "60.00"; - scale = { x=1.25; y=1.25; }; + dpi = 192; }; }; };