nix-conf/home/user/hyprland.nix
2024-12-29 16:12:18 +08:00

45 lines
1 KiB
Nix

{ pkgs, lib, inputs, system, ... }:
{
home.packages = with pkgs; [
# wayland
];
systemd.user.targets.hyprland-session.Unit.Wants = [
"xdg-desktop-autostart.target"
];
# Have not figured out how to config throught homeManager yet
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
plugins = [
inputs.hyprland-plugins.packages.${system}.hyprbars
inputs.hyprgrass.packages.${system}.default
];
settings = {
"$mod" = "SUPER";
bind = [
"$mod, F, exec, firefox"
"$mod, enter, exec, ghostty"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (builtins.genList
(i:
let ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
)
9)
);
};
};
}