nichts/modules/wms/wayland/hyprland/settings.nix

90 lines
2.1 KiB
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (builtins) toString;
inherit (lib.attrsets) mapAttrsToList;
inherit (config.modules.style.colorScheme) colors;
inherit (config.modules.system.hardware) monitors;
in {
config = {
programs.hyprland = {
settings = {
# Hyprland settings
"$mainMod" = "SUPER";
# Monitor config
# Thanks Poz for inspiration, using an attrSet is actually much smarter
# than using a normal list.
monitor =
mapAttrsToList (
name: m: let
w = toString m.resolution.x;
h = toString m.resolution.y;
refreshRate = toString m.refreshRate;
x = toString m.position.x;
y = toString m.position.y;
scale = toString m.scale;
in "${name},${w}x${h}@${refreshRate},${x}x${y},${scale}"
)
monitors;
# Input settings
input = {
kb_layout = "us,ru";
kb_variant = ",phonetic_winkeys";
kb_options = "grp:rctrl_rshift_toggle, compose:102";
follow_mouse = true;
repeat_rate = 60;
repeat_delay = 200;
touchpad = {
disable_while_typing = true;
};
};
2025-05-09 11:36:58 +02:00
gestures = {
workspace_swipe = true;
};
general = {
2025-03-26 19:15:12 +01:00
layout = "dwindle";
gaps_in = 0;
gaps_out = 0;
border_size = 2;
"col.active_border" = "0xff${colors.base07}";
no_border_on_floating = true;
2024-10-18 18:50:55 +02:00
};
# No annoying startup errors
debug.suppress_errors = true;
ecosystem.no_update_news = true;
plugin = {
hyprsplit = {
num_workspaces = 10;
persistent_workspaces = true;
};
dynamic-cursors = {
enabled = true;
mode = "rotate";
rotate = {
length = 20;
offset = 0.0;
};
threshhold = 2;
shake.enabled = false;
};
};
};
};
};
}