2024-04-07 22:16:33 -04:00
|
|
|
{
|
|
|
|
config,
|
2024-07-07 01:36:41 -04:00
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-04-07 22:16:33 -04:00
|
|
|
...
|
2024-07-09 23:40:10 -04:00
|
|
|
}: let
|
|
|
|
cfg = config.ar.home;
|
|
|
|
in {
|
|
|
|
config = lib.mkIf cfg.desktop.hyprland.enable {
|
2024-09-24 13:30:55 -04:00
|
|
|
services.hyprpaper =
|
|
|
|
lib.mkIf
|
|
|
|
(config.stylix.enable && !cfg.services.randomWallpaper.enable)
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
preload = ["${config.stylix.image}"];
|
|
|
|
wallpaper = [",${config.stylix.image}"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-19 13:59:48 -04:00
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
2024-11-23 22:39:28 -05:00
|
|
|
|
|
|
|
plugins = [
|
|
|
|
pkgs.hyprlandPlugins.hyprspace
|
|
|
|
];
|
|
|
|
|
2024-07-19 13:59:48 -04:00
|
|
|
settings = import ./settings.nix {inherit config lib pkgs;};
|
2024-09-15 10:54:10 -04:00
|
|
|
|
|
|
|
systemd = {
|
|
|
|
enable = true;
|
2024-09-15 17:37:13 -04:00
|
|
|
variables = ["--all"];
|
2024-09-15 10:54:10 -04:00
|
|
|
};
|
2024-08-07 19:39:43 -04:00
|
|
|
|
2024-07-19 13:59:48 -04:00
|
|
|
extraConfig = let
|
|
|
|
moveMonitorBinds =
|
|
|
|
lib.attrsets.mapAttrsToList (
|
2024-08-03 23:13:09 -04:00
|
|
|
key: direction: "bind=CONTROL,${key},movecurrentworkspacetomonitor,${builtins.substring 0 1 direction}"
|
2024-07-07 01:36:41 -04:00
|
|
|
)
|
2024-08-03 23:13:09 -04:00
|
|
|
cfg.desktop.windowManagerBinds;
|
2024-07-15 00:14:18 -04:00
|
|
|
|
2024-07-19 13:59:48 -04:00
|
|
|
moveWindowBinds =
|
|
|
|
lib.attrsets.mapAttrsToList (
|
2024-08-03 23:13:09 -04:00
|
|
|
key: direction: "bind=,${key},movewindow,${builtins.substring 0 1 direction}"
|
2024-07-19 13:59:48 -04:00
|
|
|
)
|
2024-08-03 23:13:09 -04:00
|
|
|
cfg.desktop.windowManagerBinds;
|
2024-07-15 00:14:18 -04:00
|
|
|
|
2024-07-19 13:59:48 -04:00
|
|
|
moveWorkspaceBinds = builtins.map (x: "bind=,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9];
|
|
|
|
in ''
|
2024-07-15 00:14:18 -04:00
|
|
|
submap=resize
|
|
|
|
binde=,down,resizeactive,0 10
|
|
|
|
binde=,left,resizeactive,-10 0
|
|
|
|
binde=,right,resizeactive,10 0
|
|
|
|
binde=,up,resizeactive,0 -10
|
|
|
|
binde=,j,resizeactive,0 10
|
|
|
|
binde=,h,resizeactive,-10 0
|
|
|
|
binde=,l,resizeactive,10 0
|
|
|
|
binde=,k,resizeactive,0 -10
|
|
|
|
bind=,escape,submap,reset
|
|
|
|
submap=reset
|
|
|
|
|
|
|
|
submap=move
|
2024-07-19 13:59:48 -04:00
|
|
|
${lib.strings.concatLines moveMonitorBinds}
|
|
|
|
${lib.strings.concatLines moveWindowBinds}
|
|
|
|
${lib.strings.concatLines moveWorkspaceBinds}
|
|
|
|
bind=,comma,exec,${lib.getExe pkgs.hyprnome} --previous --move
|
|
|
|
bind=,period,exec,${lib.getExe pkgs.hyprnome} --move
|
2024-07-15 00:14:18 -04:00
|
|
|
bind=,escape,submap,reset
|
|
|
|
submap=reset
|
2024-07-07 01:36:41 -04:00
|
|
|
'';
|
|
|
|
};
|
2024-07-09 23:40:10 -04:00
|
|
|
};
|
2024-03-28 22:12:08 -04:00
|
|
|
}
|