{
  config,
  pkgs,
  lib,
  ...
}: {
  wayland.windowManager.hyprland = lib.mkIf config.wayland.windowManager.hyprland.enable {
    settings = {
      exec-once = [
        "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
        "${pkgs.systemd}/bin/systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
        "${pkgs.wpaperd}/bin/wpaperd &"
      ];

      "$mod" = "SUPER";
      bind =
        [
          "$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
          "$mod, d, exec, ${pkgs.wofi}/bin/wofi --show drun"
          "$mod, h, movefocus, l"
          "$mod, j, movefocus, d"
          "$mod, k, movefocus, u"
          "$mod, l, movefocus, r"
          "$mod, LEFT, movefocus, l"
          "$mod, DOWN, movefocus, d"
          "$mod, UP, movefocus, u"
          "$mod, RIGHT, movefocus, r"
          "$mod SHIFT, h, movewindow, l"
          "$mod SHIFT, j, movewindow, d"
          "$mod SHIFT, k, movewindow, u"
          "$mod SHIFT, l, movewindow, r"
          "$mod SHIFT, LEFT, movewindow, l"
          "$mod SHIFT, DOWN, movewindow, d"
          "$mod SHIFT, UP, movewindow, u"
          "$mod SHIFT, RIGHT, movewindow, r"
          "$mod CTRL SHIFT, LEFT, moveactive, -10 0"
          "$mod CTRL SHIFT, DOWN, moveactive, 0 10"
          "$mod CTRL SHIFT, UP, moveactive, 0 -10"
          "$mod CTRL SHIFT, RIGHT, moveactive, 10 0"
          "$mod CTRL SHIFT, h, moveactive, -10 0"
          "$mod CTRL SHIFT, j, moveactive, 0 10"
          "$mod CTRL SHIFT, k, moveactive, 0 -10"
          "$mod CTRL SHIFT, l, moveactive, 10 0"
          "$mod SHIFT, q, killactive"
          "$mod CTRL, h, resizeactive, -5% 0%"
          "$mod CTRL, l, resizeactive, 5% 0%"
          "$mod CTRL, j, resizeactive, 0% -5%"
          "$mod CTRL, k, resizeactive, 0% 5%"
          "$mod, SPACE, togglefloating, active"
          "$mod SHIFT, SPACE, centerwindow"
          "$mod, f, fullscreen, 1"
          "$mod SHIFT, f, fullscreen, 0"
          "$mod CTRL, f, fakefullscreen"
          "$mod SHIFT, s, pin"
          "$mod SHIFT, x, exec, ${pkgs.hyprland}/bin/hyprctl kill"
          ", XF86AudioRaiseVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5"
          ", XF86AudioLowerVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5"
          ", XF86AudioMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute"
          ", XF86AudioMicMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute --id 1"
          ", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +5%"
          ", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
          "$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout"
        ]
        ++ (
          # workspaces
          # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
          builtins.concatLists (builtins.genList (
              x: let
                ws = builtins.toString (x + 1);
              in [
                "$mod, ${ws}, workspace, ${ws}"
                "$mod SHIFT, ${ws}, movetoworkspace, ${ws}"
                "$mod CTRL, ${ws}, movetoworkspacesilent, ${ws}"
              ]
            )
            8)
        );
      # See https://wiki.hyprland.org/Configuring/Monitors/
      monitor = ",preferred,auto,1";
      env = [
        "GDK_SCALE,1"
        "XCURSOR_SIZE,12"
      ];

      xwayland = {
        force_zero_scaling = true;
      };

      # See https://wiki.hyprland.org/Configuring/Keywords/ for more

      # Execute your favorite apps at launch
      # exec-once = waybar & hyprpaper & firefox

      # Source a file (multi-file configs)
      # source = ~/.config/hypr/myColors.conf

      # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
      input = {
        kb_layout = "de";
        kb_variant = "";
        kb_model = "";
        kb_options = "caps:ctrl_modifier";
        kb_rules = "";

        follow_mouse = 1;

        touchpad = {
          natural_scroll = "yes";
        };

        sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
      };

      general = {
        # See https://wiki.hyprland.org/Configuring/Variables/ for more

        gaps_in = 5;
        gaps_out = 10;
        border_size = 2;
        "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
        "col.inactive_border" = "rgba(595959aa)";

        layout = "dwindle";

        # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
        allow_tearing = false;
      };

      decoration = {
        # See https://wiki.hyprland.org/Configuring/Variables/ for more

        rounding = 10;

        blur = {
          enabled = true;
          size = 8;
          passes = 1;
          new_optimizations = true;
        };

        drop_shadow = "yes";
        shadow_range = 4;
        shadow_render_power = 3;
        "col.shadow" = "rgba(1a1a1aee)";
      };

      animations = {
        enabled = "yes";

        # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

        bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";

        animation = [
          "windows, 1, 7, myBezier"
          "windowsOut, 1, 7, default, popin 80%"
          "border, 1, 10, default"
          "borderangle, 1, 8, default"
          "fade, 1, 7, default"
          "workspaces, 1, 6, default"
        ];
      };

      dwindle = {
        # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
        pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
        preserve_split = "yes"; # you probably want this
        no_gaps_when_only = 0;
      };

      master = {
        # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
        # new_is_master = true;
        no_gaps_when_only = 0;
      };

      gestures = {
        # See https://wiki.hyprland.org/Configuring/Variables/ for more
        workspace_swipe = "off";
      };

      misc = {
        # See https://wiki.hyprland.org/Configuring/Variables/ for more
        force_default_wallpaper = 0; # Set to 0 to disable the anime mascot wallpapers
      };

      # Example per-device config
      # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
      # "device:epic-mouse-v1" = {
      #   sensitivity = -0.5;
      # };
    };
  };
}
