Skip to content

Commit

Permalink
set wm hidpi settings in the proper module
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Jan 4, 2025
1 parent b0101af commit 804c05d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 8 additions & 1 deletion home/modules/hidpi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

with lib;

let
inherit (config.wayland.windowManager) hyprland;
inherit (config.xsession.windowManager) xmonad;
in
{
meta.maintainers = [ hm.maintainers.gvolpe ];

Expand All @@ -16,7 +20,10 @@ with lib;

browser.settings.dpi = mkOption {
type = types.str;
default = "0";
default =
if hyprland.enable then (if config.hidpi then "0" else "1.7")
else if xmonad.enable then (if config.hidpi then "-1.0" else "0.7")
else "0";
};

foot.fontSize = mkOption {
Expand Down
10 changes: 0 additions & 10 deletions outputs/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,11 @@ let
({ nix.registry.nixpkgs.flake = inputs.nixpkgs; })
];

hyprlandDpiSettings = { config, ... }: {
programs.browser.settings.dpi = if config.hidpi then "0" else "1.7";
};

xmonadDpiSettings = { config, ... }: {
programs.browser.settings.dpi = if config.hidpi then "-1.0" else "0.7";
};

mkXmonadHome = { hidpi }:
let
imports = sharedImports ++ [
../home/wm/xmonad/home.nix
({ inherit hidpi; })
xmonadDpiSettings
];
in
(
Expand All @@ -40,7 +31,6 @@ let
inputs.hypr-binds-flake.homeManagerModules.${system}.default
../home/wm/hyprland/home.nix
({ inherit hidpi; dotfiles.mutable = mutableDotFiles; })
hyprlandDpiSettings
];
in
(
Expand Down

0 comments on commit 804c05d

Please sign in to comment.