♲ extract hyprland into own module

main
Christian Ott 2 years ago
parent cc0a856bd8
commit 3f5be7bb74
  1. 29
      home.nix
  2. 30
      hyperland/default.nix

@ -1,35 +1,14 @@
{ config, pkgs, pkgs-unstable, username, ... }: { config, pkgs, pkgs-unstable, username, ... }:
{ {
imports = [
./hyperland
];
# TODO please change the username & home directory to your own # TODO please change the username & home directory to your own
home.username = "${username}"; home.username = "${username}";
home.homeDirectory = "/home/${username}"; home.homeDirectory = "/home/${username}";
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
bind =
[
"$mod, F, exec, firefox"
", Print, exec, grimblast copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
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)
);
};
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ home.packages = with pkgs; [

@ -0,0 +1,30 @@
{ config, pkgs, pkgs-unstable, username, ... }:
{
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
bind =
[
"$mod, F, exec, firefox"
"$mod, k, exec, kitty"
", Print, exec, grimblast copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
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)
);
};
}
Loading…
Cancel
Save

Powered by TurnKey Linux.