diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-25 12:41:20 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-25 12:41:20 +0100 |
commit | 21e15c545ab2efdd3c46eb891e68a6f00a0215ef (patch) | |
tree | 39305b8fac77b9bb71a433991ecf5e50c16a0569 | |
parent | 0946b5e1a42b5cb64c5b78a33dd89f3647d43903 (diff) |
libkookie: dpi: add global dpi setting and wrap dino to use it
-rw-r--r-- | infra/libkookie/configuration/workstation/chat/default.nix | 26 | ||||
-rw-r--r-- | infra/libkookie/modules/workstation/ui/dpi/default.nix | 16 |
2 files changed, 35 insertions, 7 deletions
diff --git a/infra/libkookie/configuration/workstation/chat/default.nix b/infra/libkookie/configuration/workstation/chat/default.nix index 54b40cea805d..92bb2cbbb2fe 100644 --- a/infra/libkookie/configuration/workstation/chat/default.nix +++ b/infra/libkookie/configuration/workstation/chat/default.nix @@ -1,12 +1,24 @@ { config, pkgs, ... }: +let dpi = config.libkookie.ui.dpi; +in { + imports = [ <modules/workstation/ui/dpi> ]; + + # TODO: set this somewhere else? + libkookie.ui.dpi = 1.2; + home.packages = with pkgs; - [ - dino - quasselClient - element-desktop - signal-desktop - tdesktop - ]; + let + dino2 = (writeShellScriptBin "dino" '' + GDK_DPI_SCALE=${builtins.toString dpi} ${dino}/bin/dino + ''); + in + [ + dino2 + quasselClient + element-desktop + signal-desktop + tdesktop + ]; } diff --git a/infra/libkookie/modules/workstation/ui/dpi/default.nix b/infra/libkookie/modules/workstation/ui/dpi/default.nix new file mode 100644 index 000000000000..69cb37766f09 --- /dev/null +++ b/infra/libkookie/modules/workstation/ui/dpi/default.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +with lib; +{ + options.libkookie.ui.dpi = mkOption { + type = types.float; + default = 1.0; + description = '' + Override the default DPI scale for text on a system. By default + this value is set to 1.0, meaning that an application _or_ a + display manager will set the font size for you. By overriding + this setting it is possible to increase text size that is too + small by default. + ''; + }; +} |