From cec64613630b68a8b0e286df862a92ce555a6bdc Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 1 Feb 2019 18:46:54 +0100 Subject: Add custom config key for enabling hidpi mode If this approach works as well as I hope it might become advantageous to nixify e.g. XMonad configuration. --- gui/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gui/default.nix') diff --git a/gui/default.nix b/gui/default.nix index 9ada0be..2cc011e 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -1,6 +1,9 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: -{ +let + hidpi = config.custom.hidpi; + +in { imports = [ ./xmonad.nix ./kitty.nix @@ -11,4 +14,14 @@ ./apps/web.nix ./apps/dev.nix ]; + + xresources.extraConfig = pkgs.lib.mkIf hidpi '' + Xft.dpi: 160 + Xft.autohint: 0 + Xft.lcdfilter: lcddefault + Xft.hintstyle: hintfull + Xft.hinting: 1 + Xft.antialias: 1 + Xft.rgba: rgb + ''; } -- cgit v1.2.3