From 9731c42015c61dc0f2496e1ef47919349dd76ceb Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Mon, 2 Jan 2017 20:31:36 +0100 Subject: [PATCH] add variable dpi per system --- default.nix | 7 ++++--- x/.Xdefaults | 4 +++- x/default.nix | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 x/default.nix diff --git a/default.nix b/default.nix index 88ca8e9..6d856c3 100644 --- a/default.nix +++ b/default.nix @@ -7,12 +7,13 @@ i3 = with_lock: pkgs.callPackage ./i3/i3.nix { inherit (bin) screenshot_public; inherit with_lock; }; +xres = dpi: pkgs.callPackage ./x/default.nix { inherit dpi; }; in lib.mapAttrs (k: paths: pkgs.symlinkJoin { inherit paths; name = "dotfiles-${k}"; } ) { - ascanius = [(i3 true)]; - woodhouse = [(i3 false)]; + ascanius = [(i3 true) (xres 109)]; + woodhouse = [(i3 false) (xres 44)]; pennyworth = []; frumar = []; - jarvis = [(i3 true)]; + jarvis = [(i3 true) (xres 192)]; } diff --git a/x/.Xdefaults b/x/.Xdefaults index dd6bea3..4184bfb 100644 --- a/x/.Xdefaults +++ b/x/.Xdefaults @@ -58,7 +58,7 @@ URxvt*background: [85]#002b36 URxvt.scrollstyle: plain URxvt.scrollBar_right: true URxvt.perl-ext-common: default,matcher,font-size,vtwheel -URxvt.url-launcher: firefox +URxvt.url-launcher: chromium URxvt.matcher.button: 1 URxvt.urgentOnBell: True URxvt.depth: 32 @@ -73,3 +73,5 @@ rofi.font: Source Code Pro 12 URxvt.font-size.step: 4 URxvt.keysym.C-equal: perl:font-size:increase URxvt.keysym.C-minus: perl:font-size:decrease + +#include "/home/yorick/dotfiles/result/setdpi" diff --git a/x/default.nix b/x/default.nix new file mode 100644 index 0000000..84c8585 --- /dev/null +++ b/x/default.nix @@ -0,0 +1,6 @@ +{writeTextDir, dpi ? 96}: + +writeTextDir "setdpi" '' +Xft.dpi: ${toString dpi} +*dpi: ${toString dpi} +''