big refactor
This commit is contained in:
commit
76d68230f6
81 changed files with 3065 additions and 0 deletions
13
modules/programs/hyprland/default.nix
Normal file
13
modules/programs/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, osconfig, ... }:
|
||||
{
|
||||
imports = [
|
||||
./settings/default.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = lib.mkIf osconfig.device.wm.hyprland.enable {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
15
modules/programs/hyprland/settings/default.nix
Normal file
15
modules/programs/hyprland/settings/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ osconfig, ... }:
|
||||
{
|
||||
imports = [
|
||||
./key-bind.nix
|
||||
./theme.nix
|
||||
./exec.nix
|
||||
./window-rules.nix
|
||||
./input.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = osconfig.device.wm.hyprland.monitors;
|
||||
};
|
||||
}
|
||||
|
||||
8
modules/programs/hyprland/settings/exec.nix
Normal file
8
modules/programs/hyprland/settings/exec.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"quickshell"
|
||||
"fcitx5"
|
||||
];
|
||||
}
|
||||
|
||||
5
modules/programs/hyprland/settings/input.nix
Normal file
5
modules/programs/hyprland/settings/input.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings.input = {
|
||||
touchpad.natural_scroll = true;
|
||||
};
|
||||
}
|
||||
47
modules/programs/hyprland/settings/key-bind.nix
Normal file
47
modules/programs/hyprland/settings/key-bind.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ osconfig, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"CTRL ALT, T, exec, ${osconfig.device.programs.terminal}"
|
||||
|
||||
"ALT, F4, killactive"
|
||||
"SUPER SHIFT, L, exit,"
|
||||
"SUPER SHIFT, TAB, togglefloating,"
|
||||
"SUPER SHIFT, S, exec, hyprshot -m region -o '~/Pictures/Screenshot/' -z"
|
||||
"SUPER, J, togglesplit,"
|
||||
"SUPER, E, exec, dolphin"
|
||||
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
|
||||
"SUPER CTRL, left, movewindow, l"
|
||||
"SUPER CTRL, right, movewindow, r"
|
||||
"SUPER CTRL, up, movewindow, u"
|
||||
"SUPER CTRL, down, movewindow, d"
|
||||
|
||||
"SUPER, tab, workspace, e+1"
|
||||
"SUPER, mouse_down, workspace, e-1"
|
||||
"SUPER, mouse_up, workspace, e+1"
|
||||
|
||||
"ALT, space, global, asakiyuki:launcher"
|
||||
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 5%-"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s +5%"
|
||||
]
|
||||
++ builtins.concatLists (
|
||||
builtins.genList (i: [
|
||||
"SUPER, ${toString (i + 1)}, workspace,${toString (i + 1)}"
|
||||
"SUPER SHIFT, ${toString (i + 1)}, movetoworkspace,${toString (i + 1)}"
|
||||
]) 9
|
||||
)
|
||||
++ [
|
||||
"SUPER, 0, workspace, 10"
|
||||
"SUPER SHIFT, 0, movetoworkspace, 10"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
}
|
||||
58
modules/programs/hyprland/settings/theme.nix
Normal file
58
modules/programs/hyprland/settings/theme.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgb(cdd6f4)";
|
||||
"col.inactive_border" = "rgb(7f849c)";
|
||||
allow_tearing = true;
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
rounding_power = 5;
|
||||
active_opacity = 1;
|
||||
inactive_opacity = 1;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 2;
|
||||
passes = 5;
|
||||
vibrancy = 3;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
|
||||
bezier = [
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 3, overshot, popin 60%"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 2, default"
|
||||
"workspaces, 1, 3.5, overshot, slidefade 15%"
|
||||
"specialWorkspace, 1, 3, md3_decel, slidevert"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 1;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/programs/hyprland/settings/window-rules.nix
Normal file
15
modules/programs/hyprland/settings/window-rules.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
|
||||
"noanim, class:^(xwaylandvideobridge)$"
|
||||
"noinitialfocus, class:^(xwaylandvideobridge)$"
|
||||
"maxsize 1 1, class:^(xwaylandvideobridge)$"
|
||||
"noblur, class:^(xwaylandvideobridge)$"
|
||||
"nofocus, class:^(xwaylandvideobridge)$"
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.windowrulev2 = [
|
||||
"tile, class:^(Chromium)$"
|
||||
];
|
||||
}
|
||||
|
||||
Reference in a new issue