add mouse focus settings to prevent vanishing dropdown menus to hyprland.nix, this seems to actually have improved things but behaviour is still intermittent
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{ config, pkgs, ... }:
|
|
{
|
|
# Enable Hyprland compositor
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
package = pkgs.hyprland;
|
|
xwayland.enable = true;
|
|
|
|
# Autostart using systemd
|
|
systemd.enable = true;
|
|
settings = {
|
|
# Monitor config for home desk layout
|
|
monitor =
|
|
[
|
|
"eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor
|
|
"DP-3, 1920x1080@119.98, -1280x-1080, auto" # left external monitor
|
|
"DP-2, 1920x1080@119.98, 640x-1080, auto" # right external monitor
|
|
];
|
|
|
|
# Define SUPER key as mod key
|
|
"$mod" = "SUPER";
|
|
|
|
# Set keyboard layout
|
|
input = {
|
|
kb_layout = "gb";
|
|
follow_mouse = 1;
|
|
mouse_refocus = false;
|
|
};
|
|
|
|
# Allow using SUPER+LEFT to move windows and SUPER+RIGHT to resize windows
|
|
bindm = [
|
|
"$mod, mouse:272, movewindow"
|
|
"$mod, mouse:273, resizewindow"
|
|
];
|
|
|
|
# Declare all keybinds
|
|
bind =
|
|
[
|
|
# Keybinds for starting programs
|
|
"$mod, F, exec, firefox"
|
|
"$mod, 1, exec, alacritty"
|
|
"$mod, D, exec, vesktop"
|
|
"$mod, space, exec, anyrun"
|
|
|
|
# Screenshot tool
|
|
", Print, exec, grimblast copy area"
|
|
|
|
# Screen locking tool
|
|
"$mod, l, exec, hyprlock"
|
|
|
|
# Window management
|
|
"$mod, x, killactive"
|
|
"$mod, tab, togglefloating"
|
|
];
|
|
|
|
# Prevent xwayland apps from looking pixellated, cursor scaling to compensate for this is defined in home.nix
|
|
xwayland = {
|
|
force_zero_scaling = true;
|
|
};
|
|
};
|
|
};
|
|
}
|