nix-config/home/features/desktop/hyprland/config.nix

225 lines
7.3 KiB
Nix
Raw Normal View History

2024-12-08 17:32:47 +01:00
{
wayland.windowManager.hyprland = {
settings = {
# autostart
exec-once = [
2024-12-14 00:43:32 +01:00
"systemctl --user start hyprpolkitagent" # polkit agent
"hyprshade on bluelight" # set bluelight shader
"fcitx5 -d" # japanese typing
"webcord --start-minimized --force-audio-share-support" # discord but some privacy
"kdeconnect-indicator & kdeconnect-cli -l" # kde connect
"signal-desktop --start-in-tray"
2024-12-14 00:43:32 +01:00
"wl-clip-persist --clipboard both &" # Keep Wayland clipboard even after programs close
"wl-paste --watch cliphist store &" # Store clipboard contents in cliphist on each change
2024-12-08 17:32:47 +01:00
];
input = {
kb_layout = "de";
numlock_by_default = true;
follow_mouse = 1;
2024-12-13 17:53:50 +01:00
sensitivity = 0; # 0 means no modification
2024-12-08 17:32:47 +01:00
touchpad = {
natural_scroll = true;
};
};
general = {
"$mainMod" = "SUPER";
2024-12-13 17:53:50 +01:00
"$terminal" = "alacritty";
"$menu" = "wofi --show drun --allow-images --no-actions";
2024-12-08 17:32:47 +01:00
layout = "dwindle";
gaps_in = 5;
gaps_out = 10;
border_size = 2;
border_part_of_window = false;
no_border_on_floating = false;
};
2024-12-13 17:53:50 +01:00
plugin = {
hyprsplit = {
num_workspaces = 10;
};
};
2024-12-08 17:32:47 +01:00
misc = {
disable_hyprland_logo = true;
always_follow_on_dnd = true;
layers_hog_keyboard_focus = true;
animate_manual_resizes = false;
enable_swallow = true;
focus_on_activate = true;
new_window_takes_over_fullscreen = 2;
middle_click_paste = false;
};
dwindle = {
2024-12-13 17:53:50 +01:00
pseudotile = true;
preserve_split = true;
2024-12-08 17:32:47 +01:00
};
master = {
new_status = "master";
};
decoration = {
2024-12-13 17:53:50 +01:00
rounding = 10;
2024-12-08 17:32:47 +01:00
blur = {
enabled = true;
passes = 3;
2024-12-08 17:32:47 +01:00
};
shadow = {
enabled = true;
2024-12-13 17:53:50 +01:00
range = 4;
2024-12-08 17:32:47 +01:00
render_power = 3;
};
};
2024-12-13 17:53:50 +01:00
animations = {
enabled = true;
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
2024-12-08 17:32:47 +01:00
bind = [
2024-12-13 17:53:50 +01:00
"$mainMod, Return, exec, $terminal"
"$mainMod SHIFT, C, killactive"
"$mainMod SHIFT, Q, exit"
2024-12-14 00:43:32 +01:00
"$mainMod, T, togglefloating"
2024-12-13 17:53:50 +01:00
"$mainMod, Space, exec, $menu"
"$mainMod, P, pseudo" # dwindle
"$mainMod, J, togglesplit" # dwindle
2024-12-15 12:03:04 +01:00
", Print, exec, hyprshade off && grim -g \"$(slurp -w 0 -d)\" - | wl-copy && hyprshade on bluelight"
2024-12-13 17:53:50 +01:00
# Move focus with mainMod + arrow keys
2024-12-08 17:32:47 +01:00
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
2024-12-13 17:53:50 +01:00
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, split:workspace, 1"
"$mainMod, 2, split:workspace, 2"
"$mainMod, 3, split:workspace, 3"
"$mainMod, 4, split:workspace, 4"
"$mainMod, 5, split:workspace, 5"
"$mainMod, 6, split:workspace, 6"
"$mainMod, 7, split:workspace, 7"
"$mainMod, 8, split:workspace, 8"
"$mainMod, 9, split:workspace, 9"
"$mainMod, 0, split:workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, split:movetoworkspacesilent, 1"
"$mainMod SHIFT, 2, split:movetoworkspacesilent, 2"
"$mainMod SHIFT, 3, split:movetoworkspacesilent, 3"
"$mainMod SHIFT, 4, split:movetoworkspacesilent, 4"
"$mainMod SHIFT, 5, split:movetoworkspacesilent, 5"
"$mainMod SHIFT, 6, split:movetoworkspacesilent, 6"
"$mainMod SHIFT, 7, split:movetoworkspacesilent, 7"
"$mainMod SHIFT, 8, split:movetoworkspacesilent, 8"
"$mainMod SHIFT, 9, split:movetoworkspacesilent, 9"
"$mainMod SHIFT, 0, split:movetoworkspacesilent, 10"
# Example special workspace (scratchpad)
"$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, S, movetoworkspace, special:magic"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
2024-12-08 17:32:47 +01:00
# media and volume controls
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
",XF86AudioStop,exec, playerctl stop"
2024-12-14 00:43:32 +01:00
# clipboard manager
"$mainMod, V, exec, cliphist list | wofi --show dmenu | cliphist decode | wl-copy"
2024-12-08 17:32:47 +01:00
];
2024-12-13 17:53:50 +01:00
# Move/resize windows with mainMod + LMB/RMB and dragging
2024-12-08 17:32:47 +01:00
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
2024-12-13 17:53:50 +01:00
windowrulev2 = [
"suppressevent maximize, class:.*" # Ignore maximize requests from apps. You'll probably like this.
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # Fix some dragging issues with XWayland
"float, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
"float,class:^(pavucontrol)$"
"float,class:^(SoundWireServer)$"
"float,class:^(.sameboy-wrapped)$"
"float,class:^(file_progress)$"
"float,class:^(confirm)$"
"float,class:^(dialog)$"
"float,class:^(download)$"
"float,class:^(notification)$"
"float,class:^(error)$"
"float,class:^(confirmreset)$"
"float,title:^(Open File)$"
"float,title:^(File Upload)$"
"float,title:^(branchdialog)$"
"float,title:^(Confirm to replace files)$"
"float,title:^(File Operation Progress)$"
# workspace setup
"workspace 10, class:^(feishin)$"
# nextcloud
"float,class:^(com.nextcloud.desktopclient.nextcloud)$"
"stayfocused,class:^(com.nextcloud.desktopclient.nextcloud)$" # otherwise window immediately closes
# Remove context menu transparency in chromium based apps
"opaque,class:^()$,title:^()$"
"noshadow,class:^()$,title:^()$"
"noblur,class:^()$,title:^()$"
];
2024-12-08 17:32:47 +01:00
2024-12-13 17:53:50 +01:00
monitor = [
2024-12-15 12:02:51 +01:00
"DP-1, 1920x1080@74.97, auto-left, 1" # Adalbert: Left
"DP-3, 2560x1440@143.86, auto-right, 1" # Adalbert: Right
"eDP-1, 1920x1080@60, auto, 1.1" # Ludwig
",highrr,auto,auto"
2024-12-13 17:53:50 +01:00
];
2024-12-15 12:02:51 +01:00
misc = {
vrr = 1;
};
2024-12-13 17:53:50 +01:00
};
2024-12-08 17:32:47 +01:00
};
}