nix/modules/wm/hyprland/default.nix

161 lines
5.5 KiB
Nix
Raw Normal View History

2024-10-04 18:30:45 +02:00
{pkgs, ...}: {
2024-09-08 17:04:51 +02:00
programs.hyprland = {
enable = true;
};
2024-10-04 18:30:45 +02:00
2024-09-08 15:05:18 +02:00
home-manager.users.joy = {
2024-09-08 17:04:51 +02:00
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
2024-10-04 16:16:47 +02:00
"$sciPath" = "~/nix/modules/wm/hyprland/scripts";
2024-09-08 17:04:51 +02:00
cursor = {
inactive_timeout = "3";
};
env = [
"HYPRCURSOR_THEME = Bibata-Modern-Ice"
"HYPRCURSOR_SIZE = 24"
"NIXOS_OZONE_WL = 1"
];
xwayland = {
force_zero_scaling = true;
};
monitor = [
"DP-1,2560x1440@165.00Hz,auto,1,bitdepth,10"
"eDP-1,prefrered,auto,1"
"HDMI-A-1,prefrered,auto,1,mirror,eDP-1"
];
exec-once = [
"ags"
];
2024-10-04 16:16:47 +02:00
windowrulev2 = [
"float,title:(Disks)"
"float,title:(Calculator)"
"float,title:(Bluetooth)"
"float,title:(Clocks)"
2024-10-08 19:45:43 +02:00
"size 854 480,title:(Clocks)"
2024-10-04 16:16:47 +02:00
"float,title:(Network Connections)"
2024-10-20 11:11:07 +02:00
"float,title:(Pipewire)"
2024-10-26 15:45:20 +02:00
"opacity 0.9,class:(foot)"
2024-09-08 17:04:51 +02:00
];
gestures = {
workspace_swipe = true;
workspace_swipe_forever = true;
workspace_swipe_distance = 200;
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 4;
allow_tearing = false;
layout = "master";
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
decoration = {
rounding = 5;
};
input = {
kb_layout = "us,de";
kb_variant = ",qwerty";
kb_options = "grp:alt_shift_toggle,caps:swapescape";
2024-10-04 15:19:23 +02:00
repeat_rate = 50;
2024-09-08 17:04:51 +02:00
};
2024-10-04 15:19:23 +02:00
2024-09-08 17:31:09 +02:00
bind = [
# launch Apps
"$mod,TAB, exec, foot"
"$mod, E, exec, foot -e yazi"
2024-09-08 17:31:09 +02:00
"$mod, S, exec, firefox"
"$mod, X, exec, keepassxc"
"$mod, M, exec, mbsync -a && foot -e neomutt"
"$mod, N, exec, foot -e newsboat"
2024-09-08 17:31:09 +02:00
"$mod, A, exec, rofi -show drun"
"$mod, F, exec, freetube"
"$mod, C, exec, hyprpicker -a"
"$mod+Shift, Z, exec, grim - | swappy -f -"
"$mod, Z, exec, sh $sciPath/screen.sh"
2024-10-06 12:57:02 +02:00
"$mod, V, exec, cliphist list | rofi show -dmenu | cliphist decode | wl-copy"
2024-09-08 17:31:09 +02:00
"$mod, O, exec, sh $sciPath/mpv.sh"
2024-10-04 18:30:45 +02:00
"$mod+Shift, TAB,hyprexpo:expo, toggleoverview"
2024-10-06 13:31:57 +02:00
"$mod, B, exec, rofimoji"
"$mod, F, exec, foot -e hx"
2024-10-04 16:16:47 +02:00
# controls
2024-09-08 17:31:09 +02:00
"$mod, Q, killactive"
"$mod, W, togglefloating"
"$mod, R, togglesplit"
"$mod+shift, S, exec, systemctl suspend"
"$mod+shift, M, exit, hyprland"
"$mod, G, exec, sh $sciPath/gamemode.sh"
"$mod+shift, B, exec, sh $sciPath/ags.sh"
"$mod, up, exec, sh $sciPath/volume.sh -i"
"$mod, down, exec, sh $sciPath/volume.sh -d"
2024-10-25 21:56:29 +02:00
"$mod, P, exec, hyprctl dispatch togglefloating && hyprctl dispatch resizeactive exact 854 480 && hyprctl dispatch movewindow d && hyprctl dispatch movewindow r && hyprctl dispatch pin"
2024-09-08 17:31:09 +02:00
# cmus
2024-10-26 11:30:12 +02:00
"$mod, D, exec, [float; pin; size 80% 80%;] sh $sciPath/cmus.sh"
2024-09-08 17:31:09 +02:00
"$mod, space, exec, playerctl play-pause"
"$mod, comma, exec, playerctl previous"
"$mod, period, exec, playerctl next"
"$mod, equal, exec, cmus-remote -v +10%"
"$mod, minus, exec, cmus-remote -v -10%"
# Move focus
"$mod, Return, fullscreen"
"$mod, H, movefocus, l"
"$mod, L, movefocus, r"
"$mod, K, movefocus, u"
"$mod, J, movefocus, d"
# Window resizing X Y
2024-10-26 11:30:12 +02:00
"$mod+ctrl, H, resizeactive, -60 0"
"$mod+ctrl, L, resizeactive, 60 0"
"$mod+ctrl, K, resizeactive, 0 -60"
"$mod+ctrl, J, resizeactive, 0 60"
2024-09-08 17:31:09 +02:00
# Moving windows
2024-10-25 21:56:29 +02:00
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
2024-09-08 17:31:09 +02:00
# Switch workspaces
"$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"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
# Move active window to a workspace
"$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"
"$mod+Shift, 9, movetoworkspace, 9"
"$mod+Shift, 0, movetoworkspace, 10"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bindl = [
", XF86MonBrightnessUp, exec, brightnessctl set +10%"
", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
", XF86AudioRaiseVolume, exec, sh $sciPath/volume.sh -i"
", XF86AudioLowerVolume, exec, sh $sciPath/volume.sh -d"
", XF86AudioMute, exec, sh $sciPath/volume.sh -m"
", XF86AudioMicMute, exec, sh $sciPath/volume.sh -t"
];
2024-08-31 16:04:57 +02:00
};
2024-10-04 16:16:47 +02:00
plugins = with pkgs.hyprlandPlugins; [
2024-10-04 00:07:09 +02:00
hyprexpo
2024-10-04 18:30:45 +02:00
];
2024-08-31 16:04:57 +02:00
};
};
}