From c88fd9eaa12c8a3c06502b09c2056d3c91421952 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Sep 2022 06:06:28 +0200 Subject: Use a font point size of 10 on hidpi With my new laptop, a font size of 12pt is rather large and given that hidpi displays usually have a quite large resolution (the name might hint at that), we don't necessarily need to use embedded bitmaps anymore which was one of the reasons why I used a point size of 12. Signed-off-by: aszlig --- modules/user/aszlig/profiles/workstation/default.nix | 5 ++++- modules/user/aszlig/services/i3/default.nix | 2 ++ modules/user/aszlig/services/i3/i3.conf | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/user/aszlig/profiles/workstation/default.nix b/modules/user/aszlig/profiles/workstation/default.nix index 43dc2ac4..12d50b6b 100644 --- a/modules/user/aszlig/profiles/workstation/default.nix +++ b/modules/user/aszlig/profiles/workstation/default.nix @@ -3,6 +3,7 @@ let cfg = config.vuizvui.user.aszlig.profiles.workstation; inherit (config.services.xserver) xrandrHeads; + faceSize = if config.hardware.video.hidpi.enable then 10 else 12; in { options.vuizvui.user.aszlig.profiles.workstation = { enable = lib.mkEnableOption "Workstation profile for aszlig"; @@ -35,6 +36,7 @@ in { (pkgs.vuizvui.aszlig.psi.override { jid = "aszlig@aszlig.net"; resource = config.networking.hostName; + inherit faceSize; }) ] ++ import ./packages.nix pkgs; @@ -46,6 +48,7 @@ in { # The default theme hurts my eyes. environment.variables.GTK_THEME = "Adwaita:dark"; + environment.variables.QT_AUTO_SCREEN_SCALE_FACTOR = lib.mkIf hidpi "1"; vuizvui.lazyPackages = import ./lazy-packages.nix pkgs; @@ -194,7 +197,7 @@ in { XTerm*termName: xterm-direct XTerm*directColor: true XTerm*faceName: MxPlus IBM VGA 8x16 - XTerm*faceSize: 12 + XTerm*faceSize: ${toString faceSize} XTerm*renderFont: true XTerm*saveLines: 10000 XTerm*bellIsUrgent: true diff --git a/modules/user/aszlig/services/i3/default.nix b/modules/user/aszlig/services/i3/default.nix index d11140dd..503b192b 100644 --- a/modules/user/aszlig/services/i3/default.nix +++ b/modules/user/aszlig/services/i3/default.nix @@ -117,6 +117,8 @@ in inherit (pkgs.xorg) xsetroot; inherit wsConfig barConfig; + faceSize = if config.hardware.video.hidpi.enable then 10 else 12; + # XXX: Decouple this by making the i3 bindsym directives available to # the NixOS module system. flameshot = config.vuizvui.user.aszlig.programs.flameshot.package; diff --git a/modules/user/aszlig/services/i3/i3.conf b/modules/user/aszlig/services/i3/i3.conf index 1f5246fe..38514c2b 100644 --- a/modules/user/aszlig/services/i3/i3.conf +++ b/modules/user/aszlig/services/i3/i3.conf @@ -2,7 +2,7 @@ set $mod Mod4 # we want to have a VT-style font :-) -font pango:MxPlus IBM VGA 8x16 12 +font pango:MxPlus IBM VGA 8x16 @faceSize@ # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod -- cgit 1.4.1