diff options
| author | BossCode45 <boss@tehbox.org> | 2025-05-09 11:27:42 +1200 |
|---|---|---|
| committer | BossCode45 <boss@tehbox.org> | 2025-05-09 11:30:29 +1200 |
| commit | 7072cf1bdf2b8e4183ccb0247d8c5fa266ae315f (patch) | |
| tree | cde5b9785060504e680b0e1acc468849dfd6145c /home-manager/hyprland | |
| parent | cd74ab83ed8215dfc87e538395ee9af56a56c893 (diff) | |
| download | nixos-configuration-7072cf1bdf2b8e4183ccb0247d8c5fa266ae315f.tar.gz nixos-configuration-7072cf1bdf2b8e4183ccb0247d8c5fa266ae315f.zip | |
Initial commit
Diffstat (limited to 'home-manager/hyprland')
| -rw-r--r-- | home-manager/hyprland/default.nix | 148 | ||||
| -rw-r--r-- | home-manager/hyprland/default.nix~ | 95 | ||||
| -rw-r--r-- | home-manager/hyprland/hyprlock.conf | 41 |
3 files changed, 284 insertions, 0 deletions
diff --git a/home-manager/hyprland/default.nix b/home-manager/hyprland/default.nix new file mode 100644 index 0000000..9355113 --- /dev/null +++ b/home-manager/hyprland/default.nix @@ -0,0 +1,148 @@ +{ + pkgs, + lib, + inputs, + ... +}: +{ + imports = [ + ../rofi + ../kitty + ../waybar + ../hyprpaper + ]; + + home.file.".config/hypr/hyprlock.conf".source = ./hyprlock.conf; + + wayland.windowManager.hyprland= { + enable = true; + xwayland.enable = true; + systemd.variables = ["--all"]; + settings = { + "$mod" = "SUPER"; + exec-once = [ + "waybar" + "xss-lock --transfer-sleep-lock -- hyprlock" + "nm-applet" + "hyprpaper" + ]; + bind = + [ + "$mod, C, exec, firefox" + ", Print, exec, grimblast copy area" + "$mod, D, exec, rofi -i -show drun -disable-history" + "$mod Shift, E, exit" + "$mod, Return, exec, kitty" + "$mod, T, togglesplit" + "$mod Control, left, workspace, m-1" + "$mod Control, h, workspace, m-1" + "$mod Control, right, workspace, m+1" + "$mod Control, l, workspace, m+1" + "$mod, x, exec, hyprlock" + "$mod Shift, x, exec, hyprlock" + "$mod Shift, x, exec, systemctl suspend" + "$mod Shift, MINUS, exec, emacsclient -c" + "ALT, Tab, focusmonitor, +1" + "$mod, G, exec, bash /home/boss/bin/rofi-passmenu" + ", XF86AudioRaiseVolume, exec, pamixer -i 5" + ", XF86AudioLowerVolume, exec, pamixer -d 5" + "$mod Shift, Q, killactive" + "$mod, F, fullscreen" + "$mod Shift, space, togglefloating" + "$mod, mouse:272, movewindow" + ", XF86AudioPlay, exec, playerctl play-pause" + "$mod, bracketleft, exec, playerctl -p firefox play-pause" + "$mod, bracketright, exec, playerctl -p spotify play-pause" + "$mod Shift, S, exec spectacle -r" + ] + ++ ( + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + builtins.concatLists (builtins.genList ( + x: let + key = let + c = (x + 1) / 10; + in toString (x + 1 - (c * 10)); + in [ + "$mod, ${key}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${key}, movetoworkspace, ${toString (x + 1)}" + (lib.mkIf (x < 5) + "$mod Control, ${key}, workspace, ${toString (x + 6)}" + ) + "$mod Control, ${key}, workspace, ${toString (x + 1)}" + ] + ) + 10) + ) + ++ ( + builtins.map ( + x: "$mod, ${ builtins.elemAt x 0}, movefocus, ${builtins.elemAt x 1}\nbind=$mod Shift, ${builtins.elemAt x 0}, movewindow, ${builtins.elemAt x 1}" + ) + [ + ["h" "l"] + ["left" "l"] + ["j" "d"] + ["down" "d"] + ["k" "u"] + ["up" "u"] + ["l" "r"] + ["right" "r"] + ] + ); + monitor = + [ + "eDP-1, highrr, 0x0, 1" + "HDMI-A-1, highrr, 1920x0, 1" + ]; + workspace = + (builtins.genList + (x : "${toString (x + 1)},monitor:eDP-1") + 5 + ) + ++ (builtins.genList + (x : "${toString (x + 6)},monitor:HDMI-A-1") + 5 + ); + + + input = { + touchpad.natural_scroll = true; + #touchpad.scroll_factor = 0.5; + accel_profile = "flat"; + follow_mouse = true; + #sensitivity = 0.00; + }; + decoration = { + rounding = 10; + drop_shadow = false; + }; + animation = [ + "workspaces,1,5,easeOutQuint,slide" + ]; + bezier = [ + "easeInOutCubic,0.65,0,0.35,1" + "easeOutQuint,0.22,1,0.36,1" + ]; + general = { + "col.inactive_border" = "rgb(2f2e43)"; + "col.active_border" = "rgb(ab47bc)"; + border_size = 2; + gaps_in = 6; + gaps_out = 12; + }; + windowrulev2 = [ + "opacity 0.8 override 0.8 override, title:Spotify$" + ]; + }; + }; + + home.packages = with pkgs; [ + ydotool + xss-lock + pamixer + grimblast + playerctl + libsForQt5.spectacle + inputs.hyprlock.packages.${system}.hyprlock + ]; +} diff --git a/home-manager/hyprland/default.nix~ b/home-manager/hyprland/default.nix~ new file mode 100644 index 0000000..569d7ff --- /dev/null +++ b/home-manager/hyprland/default.nix~ @@ -0,0 +1,95 @@ +{ + pkgs, + ... +}: +{ + imports = [ + ../rofi + ../kitty + ../waybar + ]; + + wayland.windowManager.hyprland= { + enable = true; + xwayland.enable = true; + settings = { + "$mod" = "SUPER"; + exec-once = [ + "waybar" + "xss-lock --transfer-sleep-lock -- swaylock" + ]; + bind = + [ + "$mod, C, exec, firefox" + #", Print, exec, grimblast copy area" + "$mod, D, exec, rofi -i -show drun -disable-history" + "$mod Shift, E, exit" + "$mod, Return, exec, kitty" + "$mod, T, togglesplit" + "$mod Control, left, workspace, m-1" + "$mod Control, h, workspace, m-1" + "$mod Control, right, workspace, m+1" + "$mod Control, l, workspace, m+1" + "$mod, x, exec, swaylock" + "$mod Shift, x, exec, swaylock" + "$mod Shift, x, exec, systemctl suspend" + "$mod Shift, MINUS, exec, emacsclient -c" + ] + ++ ( + # 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 [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) + 10) + ) + ++ ( + builtins.map ( + x: "$mod, ${ builtins.elemAt x 0}, movefocus, ${builtins.elemAt x 1}\nbind=$mod Shift, ${builtins.elemAt x 0}, movewindow, ${builtins.elemAt x 1}" + ) + [ + ["h" "l"] + ["left" "l"] + ["j" "d"] + ["down" "d"] + ["k" "u"] + ["up" "u"] + ["l" "r"] + ["right" "r"] + ] + ); + monitor = + [ + "eDP-1, 1920x1080, 0x0, 1" + "HDMI-A-1, 1920x1080, 1920x0, 1" + ]; + input = { + touchpad.natural_scroll = true; + #touchpad.scroll_factor = 0.5; + accel_profile = "flat"; + follow_mouse = true; + #sensitivity = 0.00; + }; + decoration.rounding = 10; + animation = [ + "workspaces,1,5,easeOutQuint,slide" + ]; + bezier = [ + "easeInOutCubic,0.65,0,0.35,1" + "easeOutQuint,0.22,1,0.36,1" + ]; + }; + }; + + home.packages = with pkgs; [ + swaylock + ]; +} diff --git a/home-manager/hyprland/hyprlock.conf b/home-manager/hyprland/hyprlock.conf new file mode 100644 index 0000000..dc2bc93 --- /dev/null +++ b/home-manager/hyprland/hyprlock.conf @@ -0,0 +1,41 @@ +background { + path = /home/boss/Wallpapers/lockscreen.png + blur_passes = 0 +} +input-field { + size = 200, 50 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false + dots_rounding = -1 # -1 default circle, -2 follow input-field rounding + outer_color = rgb(151515) + inner_color = rgb(200, 200, 200) + font_color = rgb(10, 10, 10) + fade_on_empty = true + fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. + placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty. + hide_input = false + rounding = -1 # -1 means complete rounding (circle/oval) + check_color = rgb(204, 136, 34) + fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color + fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty + fail_transition = 300 # transition time in ms between normal outer_color and fail_color + capslock_color = -1 + numlock_color = -1 + bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) + invert_numlock = false # change color if numlock is off + swap_font_color = false # see below + + position = 0, -20 + halign = center + valign = center +} +label { + text = $TIME + text_align = center + color = rgb(50, 50, 50) + position = 0, 200 + halign = center + valign = center +}
\ No newline at end of file |
