nix/modules/home/gui/hyprland/default.nix

200 lines
5.0 KiB
Nix
Raw Normal View History

2024-03-14 21:36:28 +01:00
{ config, pkgs, lib, hostName, ... }:
2024-03-09 17:18:36 +01:00
{
imports = [
2024-05-28 14:19:16 +02:00
# ./hyprpaper.nix
2024-03-09 17:18:36 +01:00
./waybar.nix
./fixes.nix
2024-03-14 22:46:49 +01:00
./dunst.nix
2024-04-15 15:06:07 +02:00
./rofi.nix
2024-03-09 17:18:36 +01:00
];
home.packages = with pkgs; [
2024-05-28 14:19:16 +02:00
alacritty
2024-03-09 17:18:36 +01:00
wev
brightnessctl
playerctl
wl-clipboard
grimblast
nwg-bar
powertop
2024-03-14 14:06:39 +01:00
lxqt.lxqt-policykit
2024-03-09 17:18:36 +01:00
];
wayland.windowManager.hyprland = {
enable = true;
settings = {
2024-06-17 11:49:58 +02:00
monitor = if hostName == "xv-laptop" then [
"eDP-1,preferred,3840x0,1.333"
"DP-10,preferred,0x0,1"
"DP-9,preferred,1920x0,1"
] else [
",preferred,auto,auto"
];
2024-03-09 17:18:36 +01:00
exec-once = [
"waybar"
2024-03-14 22:46:49 +01:00
"lxqt-policykit-agent"
2024-03-09 17:18:36 +01:00
];
"$mod" = "SUPER";
input = {
follow_mouse = 2;
touchpad = {
natural_scroll = true;
clickfinger_behavior = true;
};
};
general = {
gaps_in = "5";
gaps_out = "10";
border_size = "2";
"col.active_border" = "rgba(00bfffee) rgba(36b7e2ee) 45deg";
"col.inactive_border" = "rgba(0a3543aa)";
layout = "dwindle";
};
decoration = {
rounding = "5";
drop_shadow = "false";
blur.enabled = "false";
shadow_render_power = "3";
"col.shadow" = "rgba(1a1a1aee)";
};
gestures = {
workspace_swipe = "on";
workspace_swipe_distance = "200";
};
misc = {
vfr = "true";
2024-06-17 11:49:58 +02:00
vrr = 2;
2024-05-28 14:19:16 +02:00
force_default_wallpaper = "0";
2024-03-09 17:18:36 +01:00
};
2024-03-12 17:31:56 +01:00
xwayland = {
force_zero_scaling = true;
};
2024-03-14 21:36:28 +01:00
workspace = if hostName == "xv-desktop" then [
"1, monitor:DP-2"
"2, monitor:DP-2"
"3, monitor:DP-2"
"4, monitor:DP-2"
"5, monitor:DP-2"
"6, monitor:HDMI-A-1"
"7, monitor:HDMI-A-1"
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
"10, monitor:HDMI-A-1"
2024-06-18 11:22:58 +02:00
] else [
"1, monitor:DP-10"
"2, monitor:DP-10"
"3, monitor:DP-10"
"4, monitor:DP-10"
"5, monitor:DP-9"
"6, monitor:DP-9"
"7, monitor:DP-9"
"8, monitor:eDP-1"
"9, monitor:eDP-1"
"10, monitor:eDP-1"
];
2024-03-14 21:36:28 +01:00
2024-03-09 17:18:36 +01:00
bind = [
2024-05-28 14:19:16 +02:00
"$mod, Q, exec, alacritty"
2024-03-09 17:18:36 +01:00
"$mod, SPACE, exec, rofi -show drun"
",Print, exec, grimblast copy area"
"$mod,ESCAPE, exec, nwg-bar"
2024-05-28 14:19:16 +02:00
"$mod, P, exit"
2024-03-09 17:18:36 +01:00
"$mod, C, killactive"
2024-03-18 16:30:09 +01:00
"$mod SHIFT, C, exec, hyprctl kill"
2024-03-09 17:18:36 +01:00
"$mod, V, togglefloating"
"$mod, F, fullscreen, 0"
"$mod, M, fullscreen, 1"
2024-03-14 14:06:39 +01:00
"$mod SHIFT, L, exec, hyprlock"
2024-03-12 17:31:56 +01:00
"$mod, S, exec, systemctl suspend"
2024-03-09 17:18:36 +01:00
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod ALT, h, resizeactive, -20 0"
"$mod ALT, l, resizeactive, 20 0"
"$mod ALT, k, resizeactive, 0 -20"
"$mod ALT, j, resizeactive, 0 20"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
2024-03-14 21:36:28 +01:00
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
2024-03-09 17:18:36 +01:00
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
2024-03-14 21:36:28 +01:00
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
] ++ (if hostName == "xv-desktop" then [
",code:194,workspace, 6"
",code:195,workspace, 7"
",code:196,workspace, 8"
",code:197,workspace, 9"
",code:198,workspace, 10"
2024-03-16 20:45:29 +01:00
"SHIFT, code:194, movetoworkspace, 6"
"SHIFT, code:195, movetoworkspace, 7"
"SHIFT, code:196, movetoworkspace, 8"
"SHIFT, code:197, movetoworkspace, 9"
"SHIFT, code:198, movetoworkspace, 10"
2024-03-14 21:36:28 +01:00
] else [ ]);
2024-03-09 17:18:36 +01:00
bindle = [
# Volume control
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
# Brightness control
",XF86MonBrightnessUp, exec, brightnessctl set 5%+"
",XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindl= [
# Toggle audio mute
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Media control
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
}