nix-config/home/wm/hyprland.nix

229 lines
6.8 KiB
Nix

{ lib, pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
#package = pkgs.hyprland-patched;
systemd = {
enable = true;
};
xwayland.enable = true;
settings = {
monitor = [
"eDP-1, 2880x1920@120, 0x0, 1.5"
"DP-4, 1920x1080@60, 0x0, 1, mirror, eDP-1"
];
input = {
kb_layout = "de";
kb_variant = "neo_qwertz";
kb_model = "";
kb_options = "";
kb_rules = "";
follow_mouse = 1;
sensitivity = 0.3; # -1.0 - 1.0, 0 means no modification.
touchpad = {
natural_scroll = true;
scroll_factor = 0.8;
};
};
# cursor = {
# no_hardware_cursor = true;
# };
general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 1;
gaps_out = 2;
border_size = 1;
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
};
ecosystem = {
no_update_news = true;
};
debug = {
disable_logs = false;
};
animations = {
enabled = false;
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 0, 7, myBezier"
"windowsOut, 0, 7, default, popin 80%"
"windowsMove, 0, 7, myBezier"
"border, 0, 10, default"
"borderangle, 0, 8, default"
"fade, 0, 7, default"
"workspaces, 0, 6, default"
];
};
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mod + P in the keybinds section below
preserve_split = true; # you probably want this
};
master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = "master";
};
misc = {
disable_hyprland_logo = false;
force_default_wallpaper = -1;
vrr = 1;
};
xwayland = {
force_zero_scaling = true;
};
gesture = [
"3, horizontal, workspace"
];
windowrulev2 = [
"float,title:Welcome to ((IntelliJ IDEA)|PyCharm|RustRover|GoLand|DataGrip|(Android Studio))"
"float,title:flameshot"
"float,title:(\d+ Reminder(s)*)"
"float, title:(Edit Event: .*)"
];
"$mod" = "SUPER";
bind =
let
alacritty = lib.getExe pkgs.alacritty;
hyprshot = lib.getExe pkgs.hyprshot;
rofi = lib.getExe' pkgs.rofi "rofi";
rofimoji = lib.getExe pkgs.rofimoji;
swaylock = lib.getExe pkgs.swaylock;
nautilus = lib.getExe pkgs.nautilus;
cliphist = lib.getExe pkgs.cliphist;
wl-copy = lib.getExe' pkgs.wl-clipboard "wl-copy";
workspaces = [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
];
in
[
# Main binds
"$mod SHIFT,M,exit,"
"$mod,Q,exec,${alacritty}"
"$mod,E,exec,${nautilus}"
"$mod,W,killactive,"
"$mod,V,togglefloating,"
"$mod,P,pseudo,"
"$mod,J,togglesplit,"
"$mod,F,fullscreen"
"$mod, R, exec, ${rofi} -show drun"
"$mod, D, exec, ${rofi} -show run"
"$mod, SPACE, exec, ${rofi} -show drun"
"$mod, PERIOD, exec, ${rofimoji} -a copy -s neutral"
"$mod, X, exec, ${cliphist} list | ${rofi} -dmenu | ${cliphist} decode | ${wl-copy}"
"$mod, L, exec, ${swaylock}"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod CTRL, left, resizeactive, -5% 0"
"$mod CTRL, right, resizeactive, 5% 0"
"$mod CTRL, up, resizeactive, 0 -5%"
"$mod CTRL, down, resizeactive, 0 5%"
# Scroll through existing workspaces with mod + scroll
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
# use main mod alt to move around workspaces
# we use relative workspaces here to make it easier to
"$mod ALT, left, workspace, r-1"
"$mod ALT, right, workspace, r+1"
"$mod ALT, up, workspace, r+1"
"$mod ALT, down, workspace, r-1"
# use mod shift to move (shift haha) an actiuve window
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, down, movewindow, d"
# make Screenshot with Mod + Shift + S
"$mod SHIFT, S, exec, ${hyprshot} -m region -o /home/etwas/Pictures/screenshots"
"$mod, 0, workspace, 10"
"$mod SHIFT, 0, movetoworkspacesilent, 10"
]
++ (map (n: "$mod,${n},workspace,${n}") workspaces)
++ (map (n: "$mod SHIFT,${n},movetoworkspacesilent,${n}") workspaces);
bindel =
let
brightnessctl = lib.getExe' pkgs.brightnessctl "brightnessctl";
wpctl = lib.getExe' pkgs.wireplumber "wpctl";
in
[
", XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%-"
" ,XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86MonBrightnessUp,exec, ${brightnessctl} s 5%+"
", XF86MonBrightnessDown,exec, ${brightnessctl} s 5%-"
];
bindl =
let
playerctl = lib.getExe' pkgs.playerctl "playerctl";
swaylock = lib.getExe pkgs.swaylock;
in
[
", XF86AudioPrev, exec, ${playerctl} previous"
", XF86AudioPlay, exec, ${playerctl} play-pause"
", XF86AudioNext, exec, ${playerctl} next"
", switch:on:Lid Switch, exec, ${playerctl} pause"
", switch:on:Lid Switch, exec, ${swaylock}"
", switch:on:Lid Switch, exec, systemctl suspend"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
exec-once =
let
nm-applet = lib.getExe' pkgs.networkmanagerapplet "nm-applet";
wl-paste = lib.getExe' pkgs.wl-clipboard "wl-paste";
in
[
"${nm-applet} &"
"${wl-paste} --watch cliphist -max-items 50 store"
];
};
plugins = with pkgs; [
#hyprlandPlugins.hypr-dynamic-cursors
];
};
}