diff --git a/nodes/hosts/common/home/jay/home.nix b/nodes/hosts/common/home/jay/home.nix index cfbd470..ce81d5c 100644 --- a/nodes/hosts/common/home/jay/home.nix +++ b/nodes/hosts/common/home/jay/home.nix @@ -11,6 +11,7 @@ ./programs/alacritty.nix ./programs/bash.nix ./programs/git.nix + ./programs/hyprland.nix ./programs/hyprlock.nix ./programs/lazygit.nix ./programs/oh-my-posh.nix @@ -204,241 +205,5 @@ # }; }; }; - - wayland.windowManager.hyprland = { - # Allow home-manager to configure hyprland - enable = true; - xwayland.enable = true; - systemd.enable = true; - - plugins = [ - #pkgs.hyprlandPlugins.hyprtrails - #pkgs.hyprlandPlugins.hyprbars - #inputs.hyprland-plugins.packages."${pkgs.system}".hyprtrails - #inputs.hypr-darkwindow.packages.${pkgs.system}.Hypr-DarkWindow - ]; - - settings = { - "$terminal" = "alacritty"; - "$filemanager" = "dolphin"; - "$menu" = "rofi -show drun -show-icons"; - - "$mainMod" = "SUPER"; - - bind = [ - "$mainMod, Q, exec, $terminal" - "$mainMod, C, killactive," - "$mainMod, M, exit," - "$mainMod, E, exec, $fileManager" - "$mainMod, F, togglefloating," - "$mainMod, R, exec, $menu" - "$mainMod, P, pseudo" - "$mainMod, J, togglesplit" - "$mainMod, l, exec, hyprlock" - - # "$mainMod, V, exec, cliphist list | rofi -dmenu | cliphost decode | wl-copy" - "$mainMod, V, exec, $terminal --class clipse -e 'clipse'" - - "$mainMod, left, movefocus, l" - "$mainMod, right, movefocus, r" - "$mainMod, up, movefocus, u" - "$mainMod, down, movefocus, d" - - "$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" - - "$mainMod SHIFT, Q, exec, hdrop --floating --gap 60 --width 50 $terminal --class alacritty" - - "$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" - - "$mainMod SHIFT, right, resizeactive, 10 0" - "$mainMod SHIFT, left, resizeactive, -10 0" - "$mainMod SHIFT, up, resizeactive, 0 -10" - "$mainMod SHIFT, down, resizeactive, 0 10" - - "$mainMod, S, exec, hyprshot -zm region --clipboard-only" - "$mainMod SHIFT, S, exec, hyprshot -zm region" - - "$mainMod, F9, exec, playerctl previous" - "$mainMod, F10, exec, playerctl play-pause" - "$mainMod, F11, exec, playerctl next" - - #"$mainMod, S, togglespecialworkspace, magic" - #"$mainMod SHIFT, S, movetoworkspace, special:magic" - ]; - - bindm = [ - "$mainMod, mouse:272, movewindow" - "$mainMod, mouse:273, resizewindow" - ]; - - bindel = [ - ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" - ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ",XF86MonBrightnessUp, exec, brightnessctl s 10%+" - ",XF86MonBrightnessDown, exec, brightnessctl s 10%-" - ]; - - bindl = [ - " , XF86AudioNext, exec, playerctl next" - " , XF86AudioPause, exec, playerctl play-pause" - " , XF86AudioPlay, exec, playerctl play-pause" - " , XF86AudioPrev, exec, playerctl previous" - ]; - - env = [ - "XCURSOR_SIZE,24" - "HYPRCURSOR_SIZE,24" - "LIBVA_DRIVER_NAME,nvidia" - "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "ELECTRON_OZONE_PLATFORM_HINT,auto" - "NVD_BACKEND,direct" - ]; - - general = { - layout = "dwindle"; - gaps_in = 5; - gaps_out = 20; - border_size = 2; - #"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; - #"col.inactive_border" = "rgba(595959aa)"; - - - allow_tearing = true; - resize_on_border = true; - }; - - misc = { - enable_anr_dialog = false; - vrr = 0; - # anr_missed_pings = 3; - disable_hyprland_logo = true; - }; - - debug = { - full_cm_proto = true; - }; - - decoration = { - rounding = 10; - rounding_power = 2; - active_opacity = 1.0; - inactive_opacity = 1.0; - blur = { - enabled = false; - vibrancy = 0.1696; - - passes = 1; - size = 3; - }; - shadow = { - enabled = true; - range = 4; - render_power = 3; - #color = "rgba(1a1a1aee)"; - }; - }; - - animations = { - enabled = true; - - 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" - ]; - }; - - #"plugin:borders-plus-plus" = { - # add_borders = 1; # 0 - 9 - - # you can add up to 9 borders - #"col.border_1" = "rgb(ffffff)"; - #"col.border_2" = "rgb(2222ff)"; - - # -1 means "default" as in the one defined in general:border_size - # border_size_1 = 10; - # border_size_2 = -1; - - # makes outer edges match rounding of the parent. Turn on / off to better understand. Default = on. - # natural_rounding = "yes"; - #}; - - #"plugin:hyprbars" = { - # enable = true; - #}; - - # Execute on startup. - exec-once = [ - # "systemctl --user start hyprpolkitagent" - "steam --disable-gpu-compositing" # nvidia pls let me have nice things - #"vesktop" - "legcord" - # "[workspace 9 silent] ELECTRON_OZONE_PLATFORM_HINT=x11 1password" # fix for promts not showing up anymore - "zen-twilight" - # "${pkgs.xorg.xhost}/bin/xhost +" - #"${pkgs.waybar}/bin/waybar &" - #"${pkgs.dunst}/bin/dunst &" - "clipse -listen" - "streamcontroller" - #"session-desktop" - #"wl-clipboard-history -t" - #"wl-paste --watch cliphist store" - #"rm $HOME/.cache/cliphist/db" - #"hyprpanel &" - ]; - - windowrulev2 = [ - "workspace 1 silent, class:^(zen-twilight)$" - "workspace 2 silent, class:^(steam)$" - "workspace 3 silent, class:^(legcord)$" - "workspace 4 silent, class:^(com.core447.StreamController)$" - "float,class:(clipse)$" - "size 622 652,class:(clipse)$" - ]; - - }; - }; - } diff --git a/nodes/hosts/common/home/jay/programs/hyprland.nix b/nodes/hosts/common/home/jay/programs/hyprland.nix new file mode 100644 index 0000000..99ea379 --- /dev/null +++ b/nodes/hosts/common/home/jay/programs/hyprland.nix @@ -0,0 +1,235 @@ +{ pkgs, ...}: { + wayland.windowManager.hyprland = { + # Allow home-manager to configure hyprland + enable = true; + xwayland.enable = true; + systemd.enable = true; + + plugins = [ + #pkgs.hyprlandPlugins.hyprtrails + #pkgs.hyprlandPlugins.hyprbars + #inputs.hyprland-plugins.packages."${pkgs.system}".hyprtrails + #inputs.hypr-darkwindow.packages.${pkgs.system}.Hypr-DarkWindow + ]; + + settings = { + "$terminal" = "alacritty"; + "$filemanager" = "dolphin"; + "$menu" = "rofi -show drun -show-icons"; + + "$mainMod" = "SUPER"; + + bind = [ + "$mainMod, Q, exec, $terminal" + "$mainMod, C, killactive," + "$mainMod, M, exit," + "$mainMod, E, exec, $fileManager" + "$mainMod, F, togglefloating," + "$mainMod, R, exec, $menu" + "$mainMod, P, pseudo" + "$mainMod, J, togglesplit" + "$mainMod, l, exec, hyprlock" + + # "$mainMod, V, exec, cliphist list | rofi -dmenu | cliphost decode | wl-copy" + "$mainMod, V, exec, $terminal --class clipse -e 'clipse'" + + "$mainMod, left, movefocus, l" + "$mainMod, right, movefocus, r" + "$mainMod, up, movefocus, u" + "$mainMod, down, movefocus, d" + + "$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" + + "$mainMod SHIFT, Q, exec, hdrop --floating --gap 60 --width 50 $terminal --class alacritty" + + "$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" + + "$mainMod SHIFT, right, resizeactive, 10 0" + "$mainMod SHIFT, left, resizeactive, -10 0" + "$mainMod SHIFT, up, resizeactive, 0 -10" + "$mainMod SHIFT, down, resizeactive, 0 10" + + "$mainMod, S, exec, hyprshot -zm region --clipboard-only" + "$mainMod SHIFT, S, exec, hyprshot -zm region" + + "$mainMod, F9, exec, playerctl previous" + "$mainMod, F10, exec, playerctl play-pause" + "$mainMod, F11, exec, playerctl next" + + #"$mainMod, S, togglespecialworkspace, magic" + #"$mainMod SHIFT, S, movetoworkspace, special:magic" + ]; + + bindm = [ + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + + bindel = [ + ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" + ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ",XF86MonBrightnessUp, exec, brightnessctl s 10%+" + ",XF86MonBrightnessDown, exec, brightnessctl s 10%-" + ]; + + bindl = [ + " , XF86AudioNext, exec, playerctl next" + " , XF86AudioPause, exec, playerctl play-pause" + " , XF86AudioPlay, exec, playerctl play-pause" + " , XF86AudioPrev, exec, playerctl previous" + ]; + + env = [ + "XCURSOR_SIZE,24" + "HYPRCURSOR_SIZE,24" + "LIBVA_DRIVER_NAME,nvidia" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + "ELECTRON_OZONE_PLATFORM_HINT,auto" + "NVD_BACKEND,direct" + ]; + + general = { + layout = "dwindle"; + gaps_in = 5; + gaps_out = 20; + border_size = 2; + #"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + #"col.inactive_border" = "rgba(595959aa)"; + + + allow_tearing = true; + resize_on_border = true; + }; + + misc = { + enable_anr_dialog = false; + vrr = 0; + # anr_missed_pings = 3; + disable_hyprland_logo = true; + }; + + debug = { + full_cm_proto = true; + }; + + decoration = { + rounding = 10; + rounding_power = 2; + active_opacity = 1.0; + inactive_opacity = 1.0; + blur = { + enabled = false; + vibrancy = 0.1696; + + passes = 1; + size = 3; + }; + shadow = { + enabled = true; + range = 4; + render_power = 3; + #color = "rgba(1a1a1aee)"; + }; + }; + + animations = { + enabled = true; + + 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" + ]; + }; + + #"plugin:borders-plus-plus" = { + # add_borders = 1; # 0 - 9 + + # you can add up to 9 borders + #"col.border_1" = "rgb(ffffff)"; + #"col.border_2" = "rgb(2222ff)"; + + # -1 means "default" as in the one defined in general:border_size + # border_size_1 = 10; + # border_size_2 = -1; + + # makes outer edges match rounding of the parent. Turn on / off to better understand. Default = on. + # natural_rounding = "yes"; + #}; + + #"plugin:hyprbars" = { + # enable = true; + #}; + + # Execute on startup. + exec-once = [ + # "systemctl --user start hyprpolkitagent" + "steam --disable-gpu-compositing" # nvidia pls let me have nice things + #"vesktop" + "legcord" + # "[workspace 9 silent] ELECTRON_OZONE_PLATFORM_HINT=x11 1password" # fix for promts not showing up anymore + "zen-twilight" + # "${pkgs.xorg.xhost}/bin/xhost +" + #"${pkgs.waybar}/bin/waybar &" + #"${pkgs.dunst}/bin/dunst &" + "clipse -listen" + #"streamcontroller" + #"session-desktop" + #"wl-clipboard-history -t" + #"wl-paste --watch cliphist store" + #"rm $HOME/.cache/cliphist/db" + #"hyprpanel &" + ]; + + windowrulev2 = [ + "workspace 1 silent, class:^(zen-twilight)$" + "workspace 2 silent, class:^(steam)$" + "workspace 3 silent, class:^(legcord)$" + "workspace 4 silent, class:^(com.core447.StreamController)$" + "float,class:(clipse)$" + "size 622 652,class:(clipse)$" + ]; + }; + }; +}