{ config, pkgs, ... }: { wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; settings = { source = "~/.config/hypr/colors.conf"; monitor = [ "DP-6, 5120x1440@239.761, 0x1440, 1" "DP-5, 2560x1440@164.958, 1280x0, 1" ]; workspace = [ "1, monitor:DP-6, default:true" ]; "$mainMod" = "SUPER"; "$terminal" = "alacritty"; "$filemanager" = "yazi"; "$applauncher" = "rofi -show drun -no-custom"; animations = { enabled = true; bezier = [ "overshot, 0.13, 0.99, 0.29, 1.1" "smooth, 0.25, 1, 0.5, 1" "snappy, 0.1, 1, 0.1, 1" ]; animation = [ "windowsIn, 1, 4, overshot, slide" "windowsOut, 1, 5, default, popin 80%" "border, 1, 5, default" "workspacesIn, 1, 6, snappy, slide" "workspacesOut, 1, 6, snappy, slidefade 80%" "specialWorkspace, 1, 6, snappy, slidevert" ]; }; input = { kb_layout = "de"; kb_options = "caps:escape"; follow_mouse = 1; touchpad = { natural_scroll = true; tap-to-click = true; clickfinger_behavior = true; }; }; decoration = { blur = { enabled = true; size = 8; passes = 3; new_optimizations = true; ignore_opacity = true; }; }; general = { gaps_in = 3; gaps_out = 5; border_size = 3; "col.active_border" = "$primary"; "col.inactive_border" = "$surface_variant"; layout = "dwindle"; }; dwindle = { pseudotile = true; preserve_split = true; }; bind = [ "$mainMod, T, exec, $terminal" "$mainMod, E, exec, $terminal -e $filemanager" # Terminal -e wegen yazi "$mainMod, Q, killactive" "$mainMod, V, exec, copyq show" "$mainMod, D, exec, $applauncher" "$mainMod, Tab, exec, rofi -show window" "$mainMod SHIFT, D, exec, bash -c 'FILE=${config.home.homeDirectory}/nixos/templates/bookmarks.txt; sel=$(sed \"s/ :: .*//\" \"$FILE\" | rofi -dmenu -i -p \"Web: \"); [ -z \"$sel\" ] && exit; match=$(grep -F \"$sel :: \" \"$FILE\"); if [ -n \"$match\" ]; then url=\"\${match##* :: }\"; else url=\"$sel\"; fi; if [[ \"$url\" == http* ]] || ([[ \"$url\" != *\" \"* && \"$url\" == *\".\"* ]]); then firefox \"$url\"; else firefox \"https://duckduckgo.com/?q=$url\"; fi'" "$mainMod, Y, layoutmsg, togglesplit" "$mainMod, C, exec, hyprpicker -a" "$mainMod, N, exec, wayscriber -a" "$mainMod SHIFT, N, exec, wayscriber -a --freeze" "$mainMod, G, exec, woomer" "$mainMod, F, fullscreen" "$mainMod, Escape, exec, wlogout" "$mainMod, Z, togglefloating" "$mainMod, H, movefocus, l" "$mainMod, J, movefocus, d" "$mainMod, K, movefocus, u" "$mainMod, L, movefocus, r" "$mainMod CTRL, H, swapwindow, l" "$mainMod CTRL, J, swapwindow, d" "$mainMod CTRL, K, swapwindow, u" "$mainMod CTRL, L, swapwindow, r" "$mainMod SHIFT, H, movewindow, l" "$mainMod SHIFT, J, movewindow, d" "$mainMod SHIFT, K, movewindow, u" "$mainMod SHIFT, L, movewindow, r" "$mainMod, S, togglespecialworkspace, special" "$mainMod CTRL, S, movetoworkspace, special" "$mainMod SHIFT, S, movetoworkspace, e+0" "$mainMod, left, focusmonitor, l" "$mainMod, right, focusmonitor, r" "$mainMod, up, focusmonitor, u" "$mainMod, down, focusmonitor, d" "$mainMod SHIFT, left, movewindow, l" "$mainMod SHIFT, right, movewindow, r" "$mainMod SHIFT, up, movewindow, u" "$mainMod SHIFT, down, movewindow, d" # Submap "$mainMod, R, submap, resize" # Screenshot eines Bereichs (Selection) -> Speichern + Clipboard ", Print, exec, bash -c 'mkdir -p ${config.home.homeDirectory}/Bilder/Bildschirmfotos && FILE=${config.home.homeDirectory}/Bilder/Bildschirmfotos/Screenshot_$(date +%Y%m%d_%H%M%S).png && grim -g \"$(slurp)\" $FILE && wl-copy < $FILE'" # Screenshot des gesamten Bildschirms (Full Monitor) -> Speichern + Clipboard "SHIFT, Print, exec, bash -c 'mkdir -p ${config.home.homeDirectory}/Bilder/Bildschirmfotos && FILE=${config.home.homeDirectory}/Bilder/Bildschirmfotos/Fullscreen_$(date +%Y%m%d_%H%M%S).png && grim $FILE && wl-copy < $FILE'" ] ++ ( builtins.concatLists (builtins.genList (x: let ws = builtins.toString (x + 1); in [ "$mainMod, ${ws}, workspace, ${ws}" "$mainMod CTRL, ${ws}, movetoworkspace, ${ws}" "$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${ws}" ] ) 9) ); binde = [ # Lautstärke Audio (Sink) ", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise" ", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower" # Helligkeit ", XF86MonBrightnessUp, exec, swayosd-client --brightness raise" ", XF86MonBrightnessDown, exec, swayosd-client --brightness lower" ]; bindl = [ # Stummschaltung (Toggle) ", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle" ", XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle" # Mediensteuerung ", XF86AudioPlay, exec, swayosd-client --playerctl play-pause" ", XF86AudioNext, exec, swayosd-client --playerctl next" ", XF86AudioPrev, exec, swayosd-client --playerctl previous" ]; bindr = [ "CAPS, Caps_Lock, exec, swayosd-client --caps-lock" ]; bindm = [ "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" ]; windowrulev2 = [ "opacity 0.9 0.8, class:^(Alacritty)$" "noanim, title:^(woomer)$" "noanim, class:^(ueberzugpp_.*)$" "noinitialfocus, class:^(ueberzugpp_.*)$" "noblur, class:^(ueberzugpp_.*)$" "noshadow, class:^(ueberzugpp_.*)$" "noborder, class:^(ueberzugpp_.*)$" "float, class:^(ueberzugpp_.*)$" "float, class:^(com.github.casperdcl.ripdrag)$" "float, size 800 600, center, class:^(org.pulseaudio.pavucontrol)$" "float, class:^(waypaper)$" "size 800 600, class:^(waypaper)$" "center, class:^(waypaper)$" "float, class:^(com.github.hluk.copyq)$" "center, class:^(com.github.hluk.copyq)$" "size 800 600, class:^(com.github.hluk.copyq)$" "opacity 0.9 0.9, class:^(com.github.hluk.copyq)$" ]; layerrule = [ "blur, rofi" "ignorealpha 0.1, rofi" "blur, logout_dialog" "ignorealpha 0.1, logout_dialog" "ignorezero, logout_dialog" "blur, swaync-control-center" "blur, swaync-notification-window" "ignorealpha 0.5, swaync-control-center" "ignorealpha 0.5, swaync-notification-window" ]; exec-once = [ "sway-audio-idle-inhibit" "hyprctl dispatch focusmonitor DP-6" "waybar" "swaync" "pgrep copyq || copyq --start-server && copyq hide" "nextcloud --background" "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland" "${pkgs.kdePackages.kwallet-pam}/libexec/pam_kwallet_init" "wayscriber --daemon" "waypaper --restore" ]; device = [ { name = "wacom-intuos-pro-m-pen"; output = "DP-6"; active_area_size = "224 63"; active_area_position = "0 38.5"; transform = 0; } ]; }; # Extra Config extraConfig = '' submap = resize binde = , l, resizeactive, 30 0 binde = , h, resizeactive, -30 0 binde = , j, resizeactive, 0 30 binde = , k, resizeactive, 0 -30 binde = SHIFT, l, resizeactive, -30 0 binde = SHIFT, h, resizeactive, 30 0 binde = SHIFT, j, resizeactive, 0 -30 binde = SHIFT, k, resizeactive, 0 30 binde = , plus, resizeactive, 20 20 binde = , minus, resizeactive, -20 -20 binde = SHIFT, plus, resizeactive, 0 20 binde = SHIFT, minus, resizeactive, 0 -20 bind = , escape, submap, reset bind = , catchall, submap, reset submap = reset ''; }; }