From 0a5b884a7ffa80f3d07589c9a52bfbb6f3d4521a Mon Sep 17 00:00:00 2001 From: elwrcl Date: Tue, 2 Jun 2026 16:30:51 +0300 Subject: [PATCH] ups --- modules/home/.DS_Store | Bin 6148 -> 0 bytes modules/home/hypr/default.nix | 11 +++ modules/home/hypr/hyprland/env.nix | 18 ++++ modules/home/hypr/hyprland/execs.nix | 12 +++ modules/home/hypr/hyprland/general.nix | 108 ++++++++++++++++++++ modules/home/hypr/hyprland/keybinds.nix | 126 ++++++++++++++++++++++++ modules/home/hypr/hyprland/rules.nix | 23 +++++ modules/home/hyprland.nix | 16 +-- 8 files changed, 301 insertions(+), 13 deletions(-) delete mode 100755 modules/home/.DS_Store create mode 100755 modules/home/hypr/default.nix create mode 100755 modules/home/hypr/hyprland/env.nix create mode 100755 modules/home/hypr/hyprland/execs.nix create mode 100755 modules/home/hypr/hyprland/general.nix create mode 100755 modules/home/hypr/hyprland/keybinds.nix create mode 100755 modules/home/hypr/hyprland/rules.nix diff --git a/modules/home/.DS_Store b/modules/home/.DS_Store deleted file mode 100755 index 1d7750eafc518342449516ce749ca26054e3410f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKOHRW;41I=xT42#7%bcJRH%P0pV9f<+DH4?;g8GrlF2~?fT!M?hvpq#5q+2A4 zEsfvI*q+I}DB~D_j5qTuU;v=UrYPF!5S{Kc9VO=zqUahoWpzI*s~N|-;9n4Z_6&1W zSYy?C{#V-GK1}Q=86NS1XDpk3a@z8{*!iKv6i-}zNWH+e6}N81_36K$=LXw75$~;t zGpxAR6iYnp+XW-OoZ+`q*ik|S1HnKr5Dffd2AH!|dgqRzgMnZm82Dm9?}waCu}D}u z+SNg2B>*wwvrc#ef>RI^4vYcGCbyF@50!H3kK<{s&DrkQ uRMfB54uyS7#Y9WR9OylAX-2o_+NZrpSUc(}I&a~`_z^HdLInfAz`!TZ1W`W# diff --git a/modules/home/hypr/default.nix b/modules/home/hypr/default.nix new file mode 100755 index 0000000..efaebe3 --- /dev/null +++ b/modules/home/hypr/default.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ + ./hyprland/env.nix + ./hyprland/execs.nix + ./hyprland/general.nix + ./hyprland/rules.nix + ./hyprland/keybinds.nix + ]; +} diff --git a/modules/home/hypr/hyprland/env.nix b/modules/home/hypr/hyprland/env.nix new file mode 100755 index 0000000..5c14385 --- /dev/null +++ b/modules/home/hypr/hyprland/env.nix @@ -0,0 +1,18 @@ +{ ... }: + +{ + wayland.windowManager.hyprland.settings = { + env = [ + "XCURSOR_SIZE,24" + "XCURSOR_THEME,Bibata-Modern-Classic" + "QT_STYLE_OVERRIDE,adwaita-dark" + "GDK_BACKEND,wayland,x11" + "QT_QPA_PLATFORM,wayland;xcb" + "QT_QPA_PLATFORMTHEME,gtk3" + "ELECTRON_OZONE_PLATFORM_HINT,auto" + "TERMINAL,ghostty" + "MESA_GL_VERSION_OVERRIDE,4.6" + "MESA_GLSL_VERSION_OVERRIDE,460" + ]; + }; +} diff --git a/modules/home/hypr/hyprland/execs.nix b/modules/home/hypr/hyprland/execs.nix new file mode 100755 index 0000000..54bfba9 --- /dev/null +++ b/modules/home/hypr/hyprland/execs.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + wayland.windowManager.hyprland.settings = { + exec-once = [ + "noctalia-shell" + "hyprctl setcursor Bibata-Modern-Classic 24" + "wl-paste --type text --watch cliphist store" + "wl-paste --type image --watch cliphist store" + ]; + }; +} diff --git a/modules/home/hypr/hyprland/general.nix b/modules/home/hypr/hyprland/general.nix new file mode 100755 index 0000000..41d1c09 --- /dev/null +++ b/modules/home/hypr/hyprland/general.nix @@ -0,0 +1,108 @@ +{ ... }: + +{ + wayland.windowManager.hyprland.settings = { + monitor = ",preferred,auto,1"; + + general = { + gaps_in = 4; + gaps_out = 5; + border_size = 2; + "col.active_border" = "rgba(ffffffff)"; + "col.inactive_border" = "rgba(ffffff66)"; + resize_on_border = true; + allow_tearing = true; + layout = "scrolling"; + }; + + scrolling = { + column_width = 0.45; + fullscreen_on_one_column = true; + focus_fit_method = 1; + follow_focus = true; + direction = "right"; + }; + + decoration = { + rounding = 0; + rounding_power = 2; + active_opacity = 1.0; + inactive_opacity = 1.0; + dim_inactive = true; + dim_strength = 0.05; + blur = { + enabled = false; + }; + shadow = { + enabled = false; + }; + }; + + input = { + kb_layout = "tr"; + numlock_by_default = true; + repeat_delay = 250; + repeat_rate = 35; + sensitivity = -5; + accel_profile = "adaptive"; + follow_mouse = 1; + #force_no_accel = true; + touchpad = { + natural_scroll = true; + disable_while_typing = true; + clickfinger_behavior = true; + scroll_factor = 0.5; + }; + }; + + gestures = { + workspace_swipe_distance = 700; + workspace_swipe_cancel_ratio = 0.2; + workspace_swipe_min_speed_to_force = 5; + workspace_swipe_direction_lock = true; + workspace_swipe_create_new = true; + }; + + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + mouse_move_enables_dpms = true; + key_press_enables_dpms = true; + animate_manual_resizes = false; + focus_on_activate = false; + }; + + bezier = [ + "omniDecel, 0.05, 0.9, 0.1, 1" + "omniAccel, 0.3, 0, 0.8, 0.15" + "omniSmooth, 0.25, 0.1, 0.25, 1" + "omniOvershoot, 0.16, 1, 0.3, 1" + "menu_decel, 0.1, 1, 0, 1" + "menu_accel, 0.52, 0.03, 0.72, 0.08" + ]; + + animation = [ + "windowsIn, 1, 6, omniOvershoot, popin 86%" + "windowsOut, 1, 5, omniAccel, popin 92%" + "windowsMove, 1, 6, omniDecel, slide" + "fadeIn, 1, 5, omniDecel" + "fadeOut, 1, 4, omniAccel" + "border, 1, 10, omniSmooth" + "layersIn, 1, 5, omniDecel, popin 92%" + "layersOut, 1, 4, omniAccel, popin 94%" + "fadeLayersIn, 1, 3, omniDecel" + "fadeLayersOut, 1, 3, omniAccel" + "workspaces, 1, 8, omniDecel, slide" + "specialWorkspaceIn, 1, 5, omniDecel, slidevert" + "specialWorkspaceOut, 1, 4, omniAccel, slidevert" + ]; + + device = [ + { + name = "hp--inc-hyperx-cloud-alpha-s-consumer-control"; + enabled = false; + } + ]; + + }; +} diff --git a/modules/home/hypr/hyprland/keybinds.nix b/modules/home/hypr/hyprland/keybinds.nix new file mode 100755 index 0000000..9996cf4 --- /dev/null +++ b/modules/home/hypr/hyprland/keybinds.nix @@ -0,0 +1,126 @@ +{ ... }: + +let + ipc = "noctalia-shell ipc call"; +in +{ + wayland.windowManager.hyprland.settings = { + "$mainMod" = "SUPER"; + + bindr = [ + "$mainMod, SUPER_L, exec, ${ipc} launcher toggle" + ]; + + bind = [ + # workspace + "CTRL $mainMod, right, layoutmsg, focus r" + "CTRL $mainMod, left, layoutmsg, focus l" + "CTRL $mainMod, down, workspace, r+1" + "CTRL $mainMod, up, workspace, r-1" + "CTRL $mainMod SHIFT, right, layoutmsg, movewindowto r" + "CTRL $mainMod SHIFT, left, layoutmsg, movewindowto l" + "CTRL $mainMod SHIFT, down, movetoworkspace, r+1" + "CTRL $mainMod SHIFT, up, movetoworkspace, r-1" + "$mainMod, R, layoutmsg, colresize +conf" + "$mainMod, C, layoutmsg, center" + "$mainMod SHIFT, R, layoutmsg, colresize 0.7" + + # interface + "$mainMod, P, exec, ${ipc} bar toggle" + "CTRL ALT, Delete, exec, ${ipc} sessionMenu toggle" + # plugins + "$mainMod SHIFT, S, exec, ${ipc} plugin:screen-shot-and-record screenshot" + "$mainMod SHIFT, Z, exec, ${ipc} plugin:screen-shot-and-record search" + "$mainMod SHIFT, X, exec, ${ipc} plugin:screen-shot-and-record ocr" + "$mainMod SHIFT, C, exec, ${ipc} plugin:music panel" + # launchers + "$mainMod, Return, exec, ghostty" + "$mainMod, W, exec, zen-beta" + "$mainMod, E, exec, nemo" + "$mainMod, Z, exec, zeditor" + "$mainMod ALT, V, exec, pavucontrol" + "$mainMod SHIFT, V, exec, ${ipc} launcher clipboard" + "$mainMod SHIFT, L, exec, ${ipc} lockScreen lock" + "CTRL SHIFT, Escape, exec, ghostty -e sudo btop" + + # window management + "$mainMod, Q, killactive" + "$mainMod ALT, SPACE, togglefloating" + "$mainMod, F, fullscreen, 0" + "$mainMod, D, fullscreen, 1" + "$mainMod ALT, P, pin" + + # focus windows + "$mainMod, left, layoutmsg, move -col" + "$mainMod, right, layoutmsg, move +col" + "$mainMod, up, movefocus, u" + "$mainMod, down, movefocus, d" + + "$mainMod SHIFT, left, layoutmsg, movewindowto l" + "$mainMod SHIFT, right, layoutmsg, movewindowto r" + "$mainMod SHIFT, up, movewindow, u" + "$mainMod SHIFT, down, movewindow, d" + + # workspace navigation + "$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" + + # move windows to workspace + "$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" + + # special workspaces + "$mainMod, S, togglespecialworkspace" + "$mainMod ALT, S, movetoworkspacesilent, special" + + # mouse workspace navigation + "$mainMod, mouse_up, workspace, +1" + "$mainMod, mouse_down, workspace, -1" + + # media keys + "$mainMod SHIFT, N, exec, playerctl next" + "$mainMod SHIFT, B, exec, playerctl previous" + "$mainMod SHIFT, P, exec, playerctl play-pause" + ]; + + # mouse binds + bindm = [ + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + + # volume and brightness binds + bindel = [ + ", XF86AudioRaiseVolume, exec, ${ipc} volume increase" + ", XF86AudioLowerVolume, exec, ${ipc} volume decrease" + ", XF86MonBrightnessUp, exec, ${ipc} brightness increase" + ", XF86MonBrightnessDown, exec, ${ipc} brightness decrease" + ]; + + # volume and media keys + bindl = [ + ", XF86AudioMute, exec, ${ipc} volume muteOutput" + ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle" + ", XF86AudioNext, exec, playerctl next" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPause, exec, playerctl play-pause" + ]; + }; +} diff --git a/modules/home/hypr/hyprland/rules.nix b/modules/home/hypr/hyprland/rules.nix new file mode 100755 index 0000000..c86eb86 --- /dev/null +++ b/modules/home/hypr/hyprland/rules.nix @@ -0,0 +1,23 @@ +{ ... }: + +{ + wayland.windowManager.hyprland.settings = { + windowrule = [ + "float on, match:title ^(Open File)(.*)$" + "center on, match:title ^(Open File)(.*)$" + "float on, match:title ^(Save As)(.*)$" + "center on, match:title ^(Save As)(.*)$" + "float on, match:title ^(File Upload)(.*)$" + "center on, match:title ^(File Upload)(.*)$" + "float on, match:class ^(pavucontrol)$" + "center on, match:class ^(pavucontrol)$" + "size 45% 45%, match:class ^(pavucontrol)$" + "float on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" + "pin on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" + "keep_aspect_ratio on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" + "immediate on, match:class ^(steam_app).*" + "float on, match:class ^(steam)$" + "float off, match:class ^(steam)$, match:title ^(Steam)$" + ]; + }; +} diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index e09cb60..a7d1347 100755 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -1,28 +1,18 @@ { pkgs, inputs, - config, ... }: { + imports = [ ./hypr/default.nix ]; + wayland.windowManager.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + configType = "hyprlang"; xwayland.enable = true; systemd.enable = false; systemd.variables = [ "-all" ]; - extraConfig = '' - source = /home/elars/.config/copdots/config/hypr/hyprland.conf - ''; }; - - xdg.configFile."waybar".source = - config.lib.file.mkOutOfStoreSymlink "/home/elars/.config/copdots/config/waybar"; - xdg.configFile."rofi".source = - config.lib.file.mkOutOfStoreSymlink "/home/elars/.config/copdots/config/rofi"; - xdg.configFile."cava".source = - config.lib.file.mkOutOfStoreSymlink "/home/elars/.config/copdots/config/cava"; - xdg.configFile."eww".source = - config.lib.file.mkOutOfStoreSymlink "/home/elars/.config/copdots/config/eww"; }