Configure the basics of hyprland

This commit is contained in:
SebastianStork 2024-04-05 22:47:48 +02:00
parent 90781bbed0
commit 288c7180a3
3 changed files with 126 additions and 2 deletions

View file

@ -6,7 +6,10 @@
}: let }: let
cfg = config.myConfig.de; cfg = config.myConfig.de;
in { in {
imports = [./qtile.nix]; imports = [
./qtile.nix
./hyprland.nix
];
options.myConfig.de = { options.myConfig.de = {
theming.enable = lib.mkEnableOption ""; theming.enable = lib.mkEnableOption "";

View file

@ -0,0 +1,114 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.myConfig.de;
in {
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
config = lib.mkIf cfg.hyprland.enable {
home.packages = [pkgs.hyprpaper];
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload=${cfg.wallpaper}
wallpaper=,${cfg.wallpaper}
splash=false
'';
myConfig.rofi.enable = true;
services.cliphist.enable = true;
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
"$terminal" = "kitty";
"$menu" = "rofi -show drun";
"$browser" = "brave";
"$fileManager" = "nemo";
"$editor" = "codium";
exec-once = ["hyprpaper"];
monitor = "DP-2,2560x1440@144,0x0,1";
input = {
kb_layout = "de";
kb_variant = "nodeadkeys";
accel_profile = "flat";
touchpad = {
disable_while_typing = true;
natural_scroll = true;
middle_button_emulation = true;
};
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
layout = "master";
};
master = {
new_is_master = false;
no_gaps_when_only = 1;
};
decoration.drop_shadow = false;
animations.enabled = false;
bind =
[
# Essentials
"$mod CONTROL, Q, exit,"
"$mod SHIFT, C, killactive,"
"$mod, TAB, cyclenext,"
"$mod SHIFT, V, togglefloating,"
"$mod SHIFT, F, fullscreen, 0"
# Launch programs
"$mod, RETURN, exec, $terminal"
"$mod, R, exec, $menu"
"$mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
"$mod, B, exec, $browser"
"$mod, F, exec, $fileManager"
"$mod, C, exec, $editor"
"$mod, S, exec, spotify"
# Move focus
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
# Move window
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, down, movewindow, d"
]
# Switch workspace
++ (
builtins.concatLists (builtins.genList (
x: [
"$mod, ${toString (x + 1)}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${toString (x + 1)}, movetoworkspacesilent, ${toString (x + 1)}"
]
)
9)
);
# Move/resize windows
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
};
}

View file

@ -5,14 +5,18 @@
}: { }: {
myConfig = { myConfig = {
de = { de = {
qtile.enable = true; qtile.enable = osConfig.myConfig.de.qtile.enable;
hyprland.enable = osConfig.myConfig.de.hyprland.enable;
wallpaper = ./wallpaper; wallpaper = ./wallpaper;
theming.enable = true; theming.enable = true;
tray = { tray = {
syncthing.enable = osConfig.myConfig.syncthing.enable; syncthing.enable = osConfig.myConfig.syncthing.enable;
networkmanager.enable = osConfig.networking.networkmanager.enable; networkmanager.enable = osConfig.networking.networkmanager.enable;
}; };
}; };
shell = { shell = {
bash.enable = true; bash.enable = true;
starship.enable = true; starship.enable = true;
@ -20,10 +24,13 @@
improvedCommands.enable = true; improvedCommands.enable = true;
direnv.enable = true; direnv.enable = true;
}; };
ssh-client.enable = true; ssh-client.enable = true;
git.enable = true; git.enable = true;
neovim.enable = true; neovim.enable = true;
vscode.enable = true; vscode.enable = true;
kitty.enable = true; kitty.enable = true;
}; };