nixos-configs/hyprland/home.nix
2024-06-09 19:08:00 +02:00

191 lines
5.4 KiB
Nix

{ pkgs, lib, config, inputs, ... }: {
imports = [
../home-manager/neovim
./waybar/style.css.nix
./waybar/config.jsonc.nix
];
home = {
username = "pim";
homeDirectory = "/home/pim";
stateVersion = "23.05";
packages = with pkgs; [
hyprland
telegram-desktop
signal-desktop
];
};
programs = {
home-manager.enable = true;
alacritty.enable = true;
librewolf = {
enable = true;
settings = {
"identity.fxaccounts.enabled" = true;
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.downloads" = false;
"browser.translations.automaticallyPopup" = false;
"browser.aboutConfig.showWarning" = false;
"privacy.clearOnShutdown.cookies" = false;
};
};
waybar = {
enable = true;
systemd = {
enable = true;
target = "hyprland-session.target";
};
};
};
fonts.fontconfig.enable = true;
wayland.windowManager.hyprland =
let
mainMod = "SUPER";
terminalEmulator = lib.getExe config.programs.alacritty.package;
fileManager = lib.getExe pkgs.gnome.nautilus;
webBrowser = lib.getExe config.programs.librewolf.package;
launcherCommand = "${lib.getExe pkgs.wofi} --show drun --allow-images --insensitive --matching fuzzy";
# startupScript = pkgs.writeShellScriptBin "hyprlandStart.sh" ''
# ${lib.getExe pkgs.waybar} &
# '';
in
{
enable = true;
settings = {
# exec-once = "${lib.getExe startupScript}";
monitor = ",preferred,auto,auto";
env = [
"XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24"
];
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
resize_on_border = false;
layout = "dwindle";
};
decoration = {
rounding = 10;
active_opacity = "1.0";
inactive_opacity = "1.0";
drop_shadow = true;
shadow_range = 4;
shadow_render_power = 3;
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = "0.1696";
};
};
animations = {
enabled = true;
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
master.new_is_master = true;
misc = {
force_default_wallpaper = -1;
disable_hyprland_logo = false;
};
input = {
follow_mouse = 1;
sensitivity = 0;
touchpad.natural_scroll = true;
};
gestures.workspace_swipe = false;
bind = [
"${mainMod}, T, exec, ${terminalEmulator}"
"${mainMod}, D, exec, ${fileManager}"
"${mainMod}, E, exec, ${webBrowser}"
"${mainMod}, W, exec, ${launcherCommand}"
"${mainMod} SHIFT, Q, killactive"
"${mainMod}, M, exit"
"${mainMod}, V, togglefloating"
"${mainMod}, P, pseudo,"
"${mainMod}, C, togglesplit,"
"${mainMod}, F, fullscreen, 0"
"${mainMod}, left, movefocus, l"
"${mainMod}, right, movefocus, r"
"${mainMod}, up, movefocus, u"
"${mainMod}, down, movefocus, d"
"${mainMod}, H, movefocus, l"
"${mainMod}, L, movefocus, r"
"${mainMod}, K, movefocus, u"
"${mainMod}, J, movefocus, d"
"${mainMod} SHIFT, H, movewindow, l"
"${mainMod} SHIFT, L, movewindow, r"
"${mainMod} SHIFT, K, movewindow, u"
"${mainMod} SHIFT, J, movewindow, d"
"${mainMod} Control&SHIFT, H, resizeactive, exact -10% 0"
"${mainMod} Control&SHIFT, L, resizeactive, exact 10% 0"
"${mainMod} Control&SHIFT, K, resizeactive, exact 0 -10%"
"${mainMod} Control&SHIFT, J, resizeactive, exact 0 10%"
"${mainMod}, 1, workspace, 1"
"${mainMod}, 2, workspace, 2"
"${mainMod}, 3, workspace, 3"
"${mainMod}, 4, workspace, 4"
"${mainMod}, 5, workspace, 5"
"${mainMod}, 6, workspace, 6"
"${mainMod}, 7, workspace, 7"
"${mainMod}, 8, workspace, 8"
"${mainMod}, 9, workspace, 9"
"${mainMod}, 0, workspace, 10"
"${mainMod} SHIFT, 1, movetoworkspace, 1"
"${mainMod} SHIFT, 2, movetoworkspace, 2"
"${mainMod} SHIFT, 3, movetoworkspace, 3"
"${mainMod} SHIFT, 4, movetoworkspace, 4"
"${mainMod} SHIFT, 5, movetoworkspace, 5"
"${mainMod} SHIFT, 6, movetoworkspace, 6"
"${mainMod} SHIFT, 7, movetoworkspace, 7"
"${mainMod} SHIFT, 8, movetoworkspace, 8"
"${mainMod} SHIFT, 9, movetoworkspace, 9"
"${mainMod} SHIFT, 0, movetoworkspace, 10"
"${mainMod}, mouse_down, workspace, e+1"
"${mainMod}, mouse_up, workspace, e-1"
];
bindm = [
"${mainMod}, mouse:272, movewindow"
"${mainMod}, mouse:273, resizewindow"
];
windowrulev2 = "suppressevent maximize, class:.*";
};
};
}