window rules i was using to move things into the right places on the comms workspace were redundant, as the single move could be performed in the exec dispatcher using rules instead
81 lines
2.6 KiB
Nix
81 lines
2.6 KiB
Nix
{...}: {
|
|
# Enable Hyprland compositor
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
xwayland.enable = true;
|
|
systemd.variables = ["--all"];
|
|
settings = {
|
|
# Monitor config for home desk layout
|
|
monitor = [
|
|
"eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor
|
|
"desc:Lenovo Group Limited LEN G24-10 U5B4KL78, 1920x1080@119.98, -960x-1080, auto" # left external monitor
|
|
"desc:Lenovo Group Limited LEN G24-10 U5B4ZAM2, 1920x1080@119.98, 960x-1080, auto" # right external monitor
|
|
];
|
|
workspace = [
|
|
"name:comms, monitor:desc:Lenovo Group Limited LEN G24-10 U5B4KL78, default:true"
|
|
];
|
|
|
|
# Define SUPER key as mod key
|
|
"$mod" = "SUPER";
|
|
|
|
# Set keyboard layout
|
|
input = {
|
|
kb_layout = "gb";
|
|
follow_mouse = 1;
|
|
mouse_refocus = false;
|
|
touchpad = {
|
|
disable_while_typing = true;
|
|
};
|
|
};
|
|
gestures = {
|
|
workspace_swipe = true;
|
|
};
|
|
|
|
# Allow using SUPER + left click to move windows and SUPER + right click to resize windows
|
|
bindm = [
|
|
"$mod, mouse:272, movewindow"
|
|
"$mod, mouse:273, resizewindow"
|
|
];
|
|
exec-once = [
|
|
"[workspace name:comms silent; move -100%,100%] telegram-desktop"
|
|
"[workspace name:comms silent; move -100%,-100%] signal-desktop"
|
|
"[workspace name:comms silent; move 100%,100%] firefox https://web.whatsapp.com https://instagram.com"
|
|
"[workspace name:comms silent; move 100%,-100%] vesktop"
|
|
];
|
|
|
|
# Declare all keybinds
|
|
bind = [
|
|
# Keybind for setting fullscreen
|
|
"$mod, F11, fullscreen"
|
|
# Keybinds for starting programs
|
|
"$mod, F, exec, firefox"
|
|
"$mod, 1, exec, alacritty"
|
|
"$mod, D, exec, vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
|
"$mod, space, exec, zsh -c 'wofi --show drun, run'"
|
|
|
|
# Screenshot tool
|
|
", Print, exec, grimblast copy area"
|
|
"SHIFT, Print, exec, grimblast save area"
|
|
|
|
# Screen locking tool
|
|
"$mod, l, exec, hyprlock"
|
|
|
|
# Window management
|
|
"$mod, x, killactive"
|
|
"$mod, tab, togglefloating"
|
|
|
|
# Workspace swipe but with $mod+scroll
|
|
"$mod, mouse_up, workspace, r+1"
|
|
"$mod, mouse_down, workspace, r-1"
|
|
# Send window to next workspace
|
|
"$mod SHIFT, mouse_up, movetoworkspace, r+1"
|
|
"$mod SHIFT, mouse_down, movetoworkspace, r-1"
|
|
];
|
|
|
|
# Prevent xwayland apps from looking pixellated, cursor scaling to compensate for this is defined in home.nix
|
|
xwayland = {
|
|
force_zero_scaling = true;
|
|
};
|
|
};
|
|
};
|
|
}
|