hyprland: expose density and cursor tuning
This commit is contained in:
@@ -106,8 +106,8 @@ function M.setup(ctx)
|
||||
hl.plugin.load("/run/current-system/sw/lib/hyprglass.so")
|
||||
end
|
||||
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
hl.env("XCURSOR_SIZE", tostring(hyprland_cursor_size))
|
||||
hl.env("HYPRCURSOR_SIZE", tostring(hyprland_cursor_size))
|
||||
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
|
||||
hl.env("HYPR_MAX_WORKSPACE", "9")
|
||||
|
||||
@@ -128,8 +128,8 @@ function M.setup(ctx)
|
||||
persistent_warps = true,
|
||||
},
|
||||
general = {
|
||||
gaps_in = 5,
|
||||
gaps_out = 10,
|
||||
gaps_in = hyprland_gaps_enabled and 5 or 0,
|
||||
gaps_out = hyprland_gaps_enabled and 10 or 0,
|
||||
border_size = 2,
|
||||
col = {
|
||||
active_border = { colors = { "rgba(3b82f6ee)", "rgba(33ccffee)" }, angle = 45 },
|
||||
|
||||
@@ -68,6 +68,8 @@ return {
|
||||
enable_hyprwobbly = true,
|
||||
enable_dynamic_cursors = true,
|
||||
enable_hyprglass = false,
|
||||
hyprland_gaps_enabled = os.getenv("IMALISON_HYPRLAND_GAPS") ~= "0",
|
||||
hyprland_cursor_size = tonumber(os.getenv("IMALISON_HYPRLAND_CURSOR_SIZE")) or 24,
|
||||
hypr_visual_performance_mode = false,
|
||||
configure_nstack_plugin_from_lua = false,
|
||||
workspace_layouts = {},
|
||||
|
||||
@@ -149,6 +149,11 @@
|
||||
overrideAttrs = f: makeHyprlandLuaPackage (package.overrideAttrs f);
|
||||
};
|
||||
hyprlandPackage = makeHyprlandLuaPackage baseHyprlandPackage;
|
||||
hyprlandGapsEnabledString =
|
||||
if config.myModules.hyprland.gaps.enable
|
||||
then "1"
|
||||
else "0";
|
||||
hyprlandCursorSizeString = toString config.myModules.hyprland.cursorSize;
|
||||
enableHyprglass = false;
|
||||
hyprglass = pkgs.callPackage ./packages/hyprglass {
|
||||
src = inputs.hyprglass;
|
||||
@@ -415,6 +420,13 @@
|
||||
|
||||
services.rumno.enable = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
IMALISON_HYPRLAND_GAPS = hyprlandGapsEnabledString;
|
||||
IMALISON_HYPRLAND_CURSOR_SIZE = hyprlandCursorSizeString;
|
||||
XCURSOR_SIZE = hyprlandCursorSizeString;
|
||||
HYPRCURSOR_SIZE = hyprlandCursorSizeString;
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.hyprscratch.homeModules.default
|
||||
(
|
||||
@@ -470,6 +482,19 @@
|
||||
settings = {};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
IMALISON_HYPRLAND_GAPS = hyprlandGapsEnabledString;
|
||||
IMALISON_HYPRLAND_CURSOR_SIZE = hyprlandCursorSizeString;
|
||||
XCURSOR_SIZE = hyprlandCursorSizeString;
|
||||
HYPRCURSOR_SIZE = hyprlandCursorSizeString;
|
||||
};
|
||||
systemd.user.sessionVariables = {
|
||||
IMALISON_HYPRLAND_GAPS = hyprlandGapsEnabledString;
|
||||
IMALISON_HYPRLAND_CURSOR_SIZE = hyprlandCursorSizeString;
|
||||
XCURSOR_SIZE = hyprlandCursorSizeString;
|
||||
HYPRCURSOR_SIZE = hyprlandCursorSizeString;
|
||||
};
|
||||
|
||||
xdg.configFile."hyprscratch/config.conf" = lib.mkIf false {
|
||||
text = lib.hm.generators.toHyprconf {
|
||||
attrs = hyprscratchSettings;
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
myModules.postgres.enable = true;
|
||||
myModules.kat.enable = true;
|
||||
myModules.hyprland.gaps.enable = false;
|
||||
myModules.hyprland.cursorSize = 20;
|
||||
networking.networkmanager.enable = true;
|
||||
services.libinput.enable = true;
|
||||
|
||||
@@ -71,6 +73,13 @@
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.stateVersion = "23.05";
|
||||
gtk.font.size = lib.mkForce 9;
|
||||
gtk.gtk3.extraConfig.gtk-cursor-theme-size = lib.mkForce 20;
|
||||
dconf.settings."org/gnome/desktop/interface".text-scaling-factor = 0.9;
|
||||
dconf.settings."org/gnome/desktop/interface".cursor-size = 20;
|
||||
xdg.configFile."ghostty/config".text = lib.mkAfter ''
|
||||
font-size = 11
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -32,6 +32,18 @@ in {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
myModules.hyprland.gaps.enable = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
description = "Whether Hyprland should use nonzero window gaps.";
|
||||
};
|
||||
|
||||
myModules.hyprland.cursorSize = lib.mkOption {
|
||||
default = 24;
|
||||
type = lib.types.ints.positive;
|
||||
description = "Cursor size exported to Hyprland and cursor-aware toolkits.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
Reference in New Issue
Block a user