{ pkgs, ... }: { home.packages = with pkgs; [ swww brightnessctl grimblast cliphist polkit_gnome xwaylandvideobridge ]; xdg.portal = { enable = true; extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; configPackages = with pkgs; [ xdg-desktop-portal-hyprland ]; }; wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; settings = { "$scripts" = "${./scripts}"; "$mainMod" = "SUPER"; "$terminal" = "alacritty"; exec-once = [ "emacs --daemon" "swww-daemon" ]; input = { kb_layout = "us,ru"; kb_options = "grp:win_space_toggle"; follow_mouse = 1; touchpad = { natural_scroll = "yes"; disable_while_typing = "no"; }; sensitivity = 0.1; }; general = { gaps_in = 5; gaps_out = 20; border_size = 3; "col.active_border" = "0xFF6e6a86"; "col.inactive_border" = "0xFF363a4f"; layout = "dwindle"; allow_tearing = false; }; decoration = { rounding = 7; drop_shadow = "yes"; shadow_range = 4; shadow_render_power = 3; "col.shadow" = "rgba(1a1a1aee)"; blur = { enabled = true; size = 3; passes = 1; }; }; animations = { enabled = 1; bezier = "overshot,0.13,0.99,0.29,1.1,"; animation = [ "fade,1,4,default" "workspaces,1,4,default,fade" "windows,1,4,overshot,popin 95%" ]; }; # love the "true" variants dwindle = { pseudotile = "yes"; preserve_split = "yes"; }; master.new_is_master = true; gestures.workspace_swipe = "on"; misc.force_default_wallpaper = 1; # windowrulev2 = [ "float, title:^(Firrfox — Sharing Indicator)$" "noborder, title:^(Firefox — Sharing Indicator)$" "rounding 0, title:^(Firefox — Sharing Indicator)$" "float, title:^(firefox)$, title:^(Picture-in-Picture)$" "pin, title:^(firefox)$, title:^(Picture-in-Picture)$" "float, title:^(Save File)$" "pin, title:^(Save File)$" "float, title:^(Torrent Options)$" "pin, title:^(Torrent Options)$" "opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$" "noanim,class:^(xwaylandvideobridge)$" "noinitialfocus,class:^(xwaylandvideobridge)$" "maxsize 1 1,class:^(xwaylandvideobridge)$" "noblur,class:^(xwaylandvideobridge)$" "stayfocused,class:^(kompas.exe)$,title:^(RoamingWindow)$" ]; layerrule = "blur, waybar"; bind = [ "$mainMod, V, togglefloating, " "$mainMod, P, pseudo," "$mainMod, I, togglesplit," "$mainMod, F, fullscreen, 0" "$mainMod, M, fullscreen, 1" "$mainMod SHIFT,F,fakefullscreen" "$mainMod SHIFT, Q, killactive, " "$mainMod SHIFT, E, exit," # Apps "$mainMod, D, exec, killall rofi || rofi -show-icons -show drun" "$mainMod, Q, exec, $terminal" "$mainMod, B, exec, brave --enable-features=TouchpadOverscrollHistoryNavigation" "$mainMod, T, exec, telegram-desktop" "$mainMod, E, exec, emacsclient -c -a emacs" "$mainMod CONTROL, E, exec, emacs" # Screenshooting ", Print, exec, grimblast save screen" "ALT, Print, exec, grimblast save active" "SHIFT, Print, exec, grimblast save area" "CONTROL, Print, exec, grimblast copy screen" "ALT_CONTROL, Print, exec, grimblast copy active" "CONTROL_SHIFT, Print, exec, grimblast copy area " # Volume ",0x1008FF11,exec,wpctl set-volume @DEFAULT_SINK@ 5%-" ",0x1008FF13,exec,wpctl set-volume @DEFAULT_SINK@ 5%+" ",0x1008FF12,exec,wpctl set-mute @DEFAULT_SINK@ toggle" ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle" # Brightness ",XF86MonBrightnessUp,exec,brightnessctl s +5%" ",XF86MonBrightnessDown,exec,brightnessctl s 5%-" # Windows "$mainMod, J, movefocus, d" "$mainMod, K, movefocus, u" "$mainMod, H, movefocus, l" "$mainMod, L, movefocus, r" "SUPER_SHIFT,J,movewindow,d" "SUPER_SHIFT,K,movewindow,u" "SUPER_SHIFT,H,movewindow,l" "SUPER_SHIFT,L,movewindow,r" "$mainMod, S, togglespecialworkspace, magic" "$mainMod SHIFT, S, movetoworkspace, special:magic" "$mainMod, mouse_down, workspace, e+1" "$mainMod, mouse_up, workspace, e-1" ] ++ ( # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} builtins.concatLists (builtins.genList ( x: let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); in [ "$mainMod, ${ws}, workspace, ${toString (x + 1)}" "$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" ] ) 10) ); bindm = [ "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" ]; }; }; programs.swaylock = { enable = true; package = pkgs.swaylock-effects; settings = { indicator-radius = 100; ring-color = "000000ff"; layout-bg-color = "000000ff"; key-hl-color = "e0c69fff"; inside-color = "000000ff"; layout-border-color = "e0c69fff"; line-color = "ffffffff"; separator-color = "000000ff"; ring-ver-color = "000000ff"; line-ver-color = "000000ff"; inside-ver-color = "ffffff00"; text-ver-color = "e0c69fff"; inside-wrong-color = "ffffff00"; text-wrong-color = "e0c69fff"; ring-wrong-color = "762f20ff"; fade-in = 1; }; }; }