{inputs, pkgs, lib, config, ...}: let cfg = config.nix-config.hypr; in { options = { nix-config.hypr.internal-screen.resolution = lib.mkOption { type = lib.types.str; }; nix-config.hypr.internal-screen.scale = lib.mkOption { type = lib.types.str; }; nix-config.hypr.browser = lib.mkOption { type = lib.types.str; default = "firefox"; description = "The browser to use in Hyprland."; }; nix-config.hypr.ide = lib.mkOption { type = lib.types.str; default = "code"; description = "The IDE to use in Hyprland."; }; }; config = { wayland.windowManager.hyprland = { enable = true; systemd.enable = true; settings = { general = { resize_on_border = true; gaps_in = 5; gaps_out = 5; border_size = 1; "col.active_border" = "rgb(98971A) rgb(CC241D) 45deg"; layout = "master"; }; input = { kb_layout = "de"; # remap caps lock to ctrl kb_options = "ctrl:nocaps"; numlock_by_default = true; # mouse input should be unchanged natural_scroll = false; sensitivity = 0.3; touchpad = { disable_while_typing = false; natural_scroll = true; }; }; device = { name = "syna329a:00-06cb:cd4f-touchpad"; sensitivity = 0.5; }; gestures = { workspace_swipe = true; workspace_swipe_fingers = 4; workspace_swipe_touch = true; }; decoration = { rounding = 7; # active_opacity = 0.95; inactive_opacity = 0.9; shadow = { enabled = false; }; # blur = { # enabled = true; # size = 5; # passes = 2; # }; # blur is set on a per-program basis windowrulev2 = [ # kitty should behave like a floating window "animation popin, class:kitty" "move cursor -50% -50%, class:kitty" "float, class:kitty" "size 50% 50%, class:kitty" # blur the launcher background # "blur 10, class:${config.nix-config.launcher.name}" # some more floating windows "float, class:org.gnome.Settings" "float, class:desktopclient.owncloud.com" "float, class:org.keepassxc.KeePassXC" "float, title:^(Picture-in-Picture)$" "float, class:org.gnome.Nautilus" # when there is a single window, deactivate border and gaps # "border_size 0, onworkspace:w[tv1], " ]; }; monitor = [ # the internal monitor, always at the "center" "eDP-1, ${cfg.internal-screen.resolution}, 0x0, ${cfg.internal-screen.scale}" # Samsung monitors at irchel (matching the description) "desc:Samsung Electric Company LS27D80xU, 2560x1440@59.95, auto-up, 1" ", preferred, auto-up, auto" # automatically add any newly detected monitor ]; xwayland = { enabled = true; force_zero_scaling = true; }; env = [ # force apps to use wayland "NIXOS_OZONE_WL, 1" "ELECTRON_OZONE_PLATFORM_HINT, wayland" # set the scale factor for GDK apps "GDK_SCALE, ${cfg.internal-screen.scale}" # set the scale factor for QT apps # "QT_SCALE_FACTOR, ${cfg.internal-screen.scale}" "QT_SCALE_FACTOR, 1.1" # set the scale factor for GTK apps ]; }; plugins = [ # Global overview pkgs.hyprlandPlugins.hyprspace # Touch gestures pkgs.hyprlandPlugins.hyprgrass ]; }; }; }