diff --git a/Droidnix/assets/hyprland/conf/animations.conf b/Droidnix/assets/hyprland/conf/animations.conf new file mode 100644 index 000000000..69f58ee96 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/animations.conf @@ -0,0 +1,12 @@ +# ./assets/conf/desktop/hypr/animations.conf + +animations { + enabled = yes + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} diff --git a/Droidnix/assets/hyprland/conf/behaviour.conf b/Droidnix/assets/hyprland/conf/behaviour.conf new file mode 100644 index 000000000..4650682a3 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/behaviour.conf @@ -0,0 +1,33 @@ +# Keyboard and mouse settings +input { + kb_layout = us + kb_options = ctrl:nocaps + sensitivity = -0.5 + accel_profile = adaptive + scroll_factor = 0.5 +} + +# Scrolling modifier settings +input { + scroll_main_mod = alt + scroll_main_mod_invert = no + scroll_per_border = yes +} + +# Touchpad settings (applies to all touchpads) +input:touchpad:* { + natural_scroll = yes + scroll_factor = 0.5 +} + +# Focus settings +focus { + follow_mouse = yes + new_windows = smart +} + +# Miscellaneous settings +misc { + resize_step = 10 10 + anim_resize_friction = 0.1 +} diff --git a/Droidnix/assets/hyprland/conf/exec-once.conf b/Droidnix/assets/hyprland/conf/exec-once.conf new file mode 100755 index 000000000..7d1c17501 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/exec-once.conf @@ -0,0 +1,5 @@ +exec-once = dbus-update-activation-environment --systemd --all +exec-once = uwsm app -- waybar +exec-once = hypridle +exec-once = hyprpolkitagent +exec-once = systemd-run --user --scope --unit=elephant elephant diff --git a/Droidnix/assets/hyprland/conf/hypridle.conf b/Droidnix/assets/hyprland/conf/hypridle.conf new file mode 100644 index 000000000..fa196fd52 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/hypridle.conf @@ -0,0 +1,16 @@ +general { + lock_cmd = hyprlock + after_sleep_cmd = hyprctl dispatch dpms on + ignore_dbus_inhibit = false +} + +listener { + timeout = 600 + on-timeout = hyprlock +} + +listener { + timeout = 900 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} diff --git a/Droidnix/assets/hyprland/conf/hyprland.conf b/Droidnix/assets/hyprland/conf/hyprland.conf new file mode 100644 index 000000000..8d3f567ad --- /dev/null +++ b/Droidnix/assets/hyprland/conf/hyprland.conf @@ -0,0 +1,23 @@ +source = ./variables.conf +# source = ./behaviour.conf +# source = ./layout.conf +source = ./animations.conf +source = ./layer-rules.conf +# source = ./window-rules.conf +source = ./monitor-rules.conf +# source = ./workspace-rules.conf +source = ./bindings.conf + +source = ./exec-once.conf + +general { + gaps_in = 2 + gaps_out = 4 + border_size = 2 + # Gradient syntax: color color angle (e.g. 45deg). :contentReference[oaicite:5]{index=5} + col.active_border = $blue $green 45deg + col.inactive_border = $inactive + layout = scrolling + resize_on_border = true + extend_border_grab_area = 20 # Makes it easier to "grab" the edge +} diff --git a/Droidnix/assets/hyprland/conf/hyprlock.conf b/Droidnix/assets/hyprland/conf/hyprlock.conf new file mode 100644 index 000000000..c7fdcd37b --- /dev/null +++ b/Droidnix/assets/hyprland/conf/hyprlock.conf @@ -0,0 +1,32 @@ +# ~/.config/hypr/hyprlock.conf + +general { + grace = 2 + ignore_empty_input = true +} + +background { + path = ~/.config/hypr/lock.png + blur_passes = 2 + blur_size = 6 +} + +input-field { + size = 320, 60 + outline_thickness = 2 + dots_size = 0.25 + dots_spacing = 0.20 + fade_on_empty = true + placeholder_text = "Password" + position = 0, -120 + halign = center + valign = center +} + +label { + text = $TIME + font_size = 72 + position = 0, 120 + halign = center + valign = center +} diff --git a/Droidnix/assets/hyprland/conf/layer-rules.conf b/Droidnix/assets/hyprland/conf/layer-rules.conf new file mode 100644 index 000000000..c590692e0 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/layer-rules.conf @@ -0,0 +1,6 @@ +layerrule = blur on, ignore_alpha 1, match:namespace waybar +layerrule = xray 1, match:namespace waybar +layerrule = blur on, ignore_alpha 1, match:namespace walker +layerrule = xray 1, match:namespace walker +layerrule = blur on, ignore_alpha 1, match:namespace swaync-control-center +layerrule = blur on, ignore_alpha 1, match:namespace swaync-notification-window diff --git a/Droidnix/assets/hyprland/conf/layout.conf b/Droidnix/assets/hyprland/conf/layout.conf new file mode 100644 index 000000000..82e343c62 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/layout.conf @@ -0,0 +1,24 @@ +general { + gaps_in = 2 + gaps_out = 4 + border_size = 2 + col.active_border = rgba($blue) rgba($green) 45deg + col.inactive_border = rgba($inactive) + layout = dwindle + resize_on_border = yes + border_grab_modifier = 20 + disable_hyprland_logo = no # Use 'no' instead of 'false' + focus_on_activate = yes +} + +decoration { + rounding = 5 + blur = yes + blur_size = 8 + blur_passes = 3 + blur_new_optimizations = yes + blur_exclude = fullscreen + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 +} diff --git a/Droidnix/assets/hyprland/conf/monitor-rules.conf b/Droidnix/assets/hyprland/conf/monitor-rules.conf new file mode 100644 index 000000000..07dc23982 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/monitor-rules.conf @@ -0,0 +1,2 @@ +# Default portable monitor rule +monitor=DP-1,3840x1080@144,1920x0,1 diff --git a/Droidnix/assets/hyprland/conf/variables.conf b/Droidnix/assets/hyprland/conf/variables.conf new file mode 100644 index 000000000..d6e340d0c --- /dev/null +++ b/Droidnix/assets/hyprland/conf/variables.conf @@ -0,0 +1,6 @@ +# Colors (Hyprland "col" values commonly use rgba(aarrggbb)-style hex) +# See Hyprland variable / type docs for color formats & bools. :contentReference[oaicite:2]{index=2} +$base = rgba(1e1e2eff) +$inactive = rgba(595959aa) +$blue = rgba(33ccffee) +$green = rgba(00ff99ee) diff --git a/Droidnix/assets/hyprland/conf/window-rules.conf b/Droidnix/assets/hyprland/conf/window-rules.conf new file mode 100644 index 000000000..18859cab9 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/window-rules.conf @@ -0,0 +1,10 @@ +# Floating and centering nm-connection-editor +windowrule = float, nm-connection-editor +windowrule = move center, nm-connection-editor +windowrule = size 900 700, nm-connection-editor + +# Center all new windows by default +windowrule = center, ^(.*) + +# Example: Float specific apps (uncomment to use) +# windowrule = float, ^(pavucontrol)$ diff --git a/Droidnix/assets/hyprland/conf/workspace-rules.conf b/Droidnix/assets/hyprland/conf/workspace-rules.conf new file mode 100644 index 000000000..53bd7ee63 --- /dev/null +++ b/Droidnix/assets/hyprland/conf/workspace-rules.conf @@ -0,0 +1,30 @@ +# Workspace definitions (modern syntax) +workspace = 1 +workspace = 2 +workspace = 3 +workspace = 4 +workspace = 5 + +# Auto-launch apps on specific workspaces (use `exec` with `workspace` rule) +exec-once = kitty, workspace 1 +exec-once = flatpak run app.betterbird.zen, workspace 2 +exec-once = zen, workspace 3 + +# Force a specific layout for a workspace +workspace 1, layout:dwindle +workspace 2, layout:master +workspace 3, layout:msg + +# Set workspace persistence +workspace 1, persistent:true +workspace 2, persistent:true + +# Move specific apps to workspaces automatically +windowrule = move workspace 1, ^(kitty)$ +windowrule = move workspace 2, ^(zen)$ +windowrule = move workspace 3, ^(libreoffice)$ + +# Workspace behavior +workspace { + cycle_move_empty = no +} diff --git a/Droidnix/generated/hyprland/hyprland.nix b/Droidnix/generated/hyprland/hyprland.nix index 5e38f592c..740fb9a34 100644 --- a/Droidnix/generated/hyprland/hyprland.nix +++ b/Droidnix/generated/hyprland/hyprland.nix @@ -1,4 +1,15 @@ -{ config, pkgs, lib, user, inputs, flakeRoot,... }: +{ + config, + pkgs, + lib, + user, + inputs, + flakeRoot, + ... +}: +let + hyprlandConf = builtins.readFile (flakeRoot + "/assets/hyprland/conf/hyprland.conf"); +in { # Nix settings to use Hyprland's cache for packages nix.settings = { @@ -15,9 +26,6 @@ # Hyprland-specific Home Manager configurations home-manager.users.${user.username} = { - wayland.windowManager.hyprland = { - enable = true; - settings = { }; - }; + xdg.configFile."hypr/hyprland.conf".text = hyprlandConf; }; }