mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 16:17:46 +00:00
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ pkgs, lib, config, ... }: {
|
|
options.mods.hyprland.enable = lib.mkEnableOption {
|
|
description = "enables hyprland";
|
|
default = false;
|
|
};
|
|
|
|
config = lib.mkIf config.mods.hyprland.enable {
|
|
programs.waybar.enable = true;
|
|
programs.fuzzel.enable = true;
|
|
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
xwayland.enable = true;
|
|
# systemd.enable = true;
|
|
settings = {
|
|
exec-once = "${lib.getExe pkgs.waybar}";
|
|
|
|
input = {
|
|
accel_profile = "flat";
|
|
|
|
kb_options = "caps:escape";
|
|
};
|
|
|
|
"$mod" = "SUPER";
|
|
bind = [
|
|
"$mod, Return, exec, alacritty"
|
|
"$mod, D, exec, fuzzel"
|
|
"$mod, F, exec, qutebrowser"
|
|
|
|
"$mod SHIFT, Q, killactive,"
|
|
"$mod SHIFT, X, exit,"
|
|
|
|
"$mod, H, movefocus, l"
|
|
"$mod, J, movefocus, d"
|
|
"$mod, K, movefocus, u"
|
|
"$mod, L, movefocus, r"
|
|
]
|
|
++ (builtins.concatLists (builtins.genList (
|
|
# workspaces
|
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
|
x: let
|
|
ws = let
|
|
c = (x + 1) / 10;
|
|
in
|
|
builtins.toString (x + 1 - (c * 10));
|
|
in [
|
|
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
|
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
|
]
|
|
) 10) );
|
|
};
|
|
};
|
|
};
|
|
}
|