{ inputs, pkgs, ...}: let package = pkgs.hyprland; mainMod = "SUPER"; in { programs.kitty.enable = true; wayland.windowManager.hyprland = { inherit package; enable = true; systemd = { enable = true; variables = [ "--all" ]; }; plugins = [ #inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars ]; }; home.sessionVariables.NIXOS_OZONE_WL = "1"; wayland.windowManager.hyprland.settings = { env = [ "NIXOS_OZONE_WL,1" "MOZ_ENABLE_WAYLAND,1" "MOZ_WEBRENDER,1" "_JAVA_AWT_WM_NONREPARENTING,1" "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" "QT_QPA_PLATFORM,wayland" "SDL_VIDEODRIVER,wayland" "GDK_BACKEND,wayland" ]; monitor = [ "DP-1, 1920x1080@60, 1920x0, 1" "HDMI-A-2, 1920x1080@60, 0x0, 1" ]; bind = [ "$mainMod, Q, exec, $terminal" "$mainMod, C, killactive, " "$mainMod, M, exit, " "$mainMod, E, exec, $fileManager" "$mainMod, V, togglefloating, " "$mainMod, R, exec, $menu" "$mainMod, S, exec, $power" "$mainMod, P, pseudo, " # dwindle "$mainMod, J, togglesplit, "# dwindle # Move focus with mainMod + arrow keys "$mainMod, left, movefocus, l" "$mainMod, right, movefocus, r" "$mainMod, up, movefocus, u" "$mainMod, down, movefocus, d" # Switch workspaces with mainMod + [0-9] "$mainMod, 1, workspace, 1" "$mainMod, 2, workspace, 2" "$mainMod, 3, workspace, 3" "$mainMod, 4, workspace, 4" "$mainMod, 5, workspace, 5" "$mainMod, 6, workspace, 6" "$mainMod, 7, workspace, 7" "$mainMod, 8, workspace, 8" "$mainMod, 9, workspace, 9" "$mainMod, 0, workspace, 10" # Move active window to a workspace with mainMod + SHIFT + [0-9] "$mainMod SHIFT, 1, movetoworkspace, 1" "$mainMod SHIFT, 2, movetoworkspace, 2" "$mainMod SHIFT, 3, movetoworkspace, 3" "$mainMod SHIFT, 4, movetoworkspace, 4" "$mainMod SHIFT, 5, movetoworkspace, 5" "$mainMod SHIFT, 6, movetoworkspace, 6" "$mainMod SHIFT, 7, movetoworkspace, 7" "$mainMod SHIFT, 8, movetoworkspace, 8" "$mainMod SHIFT, 9, movetoworkspace, 9" "$mainMod SHIFT, 0, movetoworkspace, 10" # Example special workspace (scratchpad) #"$mainMod, S, togglespecialworkspace, magic" "$mainMod SHIFT, S, movetoworkspace, special:magic" # Scroll through existing workspaces with mainMod + scroll "$mainMod, mouse_down, workspace, e+1" "$mainMod, mouse_up, workspace, e-1" # Screenshot "$mainMod, Z, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%s_grim.png')" ]; bindl = [ #", XF86AudioMute, exec, amixer set Master toggle ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ", XF86AudioPlay, exec, playerctl play-pause" # the stupid key is called play , but it toggles ", XF86AudioNext, exec, playerctl next" ", XF86AudioPrev, exec, playerctl previous" ]; bindle = [ # Multi Media Control ", XF86AudioRaiseVolume, exec, vol --up" ", XF86AudioLowerVolume, exec, vol --down" ", XF86MonBrightnessUp, exec, bri --up" ", XF86MonBrightnessDown, exec, bri --down" ", XF86Search, exec, $menu" ]; bindm = [ "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" ]; }; # NOTE: this executable is used by greetd to start a wayland session when system boot up # with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module home.file.".wayland-session" = { source = "${package}/bin/Hyprland"; executable = true; }; # hyprland configs, based on https://github.com/notwidow/hyprland /*xdg.configFile = { "hypr/mako" = { source = ../conf/mako; recursive = true; }; "hypr/scripts" = { source = ../conf/scripts; recursive = true; }; "hypr/waybar" = { source = ../conf/waybar; recursive = true; }; "hypr/wlogout" = { source = ../conf/wlogout; recursive = true; }; # music player - mpd "mpd" = { source = ../conf/mpd; recursive = true; }; };*/ }