From cac798065c7f7f4410d90ad20d20e33ebabf219e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Thu, 12 Jun 2025 11:18:37 +0200 Subject: [PATCH] Switch magicman to uwsm --- home/hyprland/hyprland_magicman.nix | 81 +++++++++++++++++++++++++++-- home/hyprland/waybar/default.nix | 2 +- hosts/magicman/configuration.nix | 1 + 3 files changed, 78 insertions(+), 6 deletions(-) diff --git a/home/hyprland/hyprland_magicman.nix b/home/hyprland/hyprland_magicman.nix index 8d54746..6d929fd 100644 --- a/home/hyprland/hyprland_magicman.nix +++ b/home/hyprland/hyprland_magicman.nix @@ -4,10 +4,6 @@ ... }: { - imports = [ - ./hyprlock.nix - ./hypridle.nix - ]; options.hyprland.enable = lib.mkEnableOption "Hyprland"; config = { home.packages = with pkgs; [ @@ -26,6 +22,82 @@ libsForQt5.qt5ct ]; + services.hyprpaper = { + enable = true; + settings = { + splash = false; + }; + }; + + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "${pkgs.hyprlock}/bin/hyprlock"; + before_sleep_cmd = "${pkgs.hyprlock}/bin/hyprlock"; + ignore_dbus_inhibit = false; + }; + listener = { + timeout = 240; + on-timeout = "${pkgs.hyprlock}/bin/hyprlock"; + }; + }; + }; + + programs.hyprlock = { + enable = true; + settings = { + background = [ + { + monitor = ""; + path = "screenshot"; + color = "rgba(17, 17, 17, 1.0)"; + blur_passes = 3; + contrast = 0.8916; + brightness = 0.8172; + vibrancy = 0.1696; + vibrancy_darkness = 0.0; + } + ]; + + general = { + grace = 0; + }; + + input-field = [ + { + size = "250, 60"; + outline_thickness = 2; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + outer_color = "rgba(0, 0, 0, 0)"; + inner_color = "rgba(0, 0, 0, 0.5)"; + font_color = "rgb(200, 200, 200)"; + fade_on_empty = false; + font_family = "JetBrains Mono Nerd Font Mono"; + placeholder_text = "Input Password..."; + hide_input = false; + position = "0, -120"; + halign = "center"; + valign = "center"; + } + ]; + + label = [ + { + text = "cmd[update:2000] echo \"$(date +\"%b %d %H:%M\")\""; + color = "rgba(255, 255, 255, 0.6)"; + font_size = 120; + font_family = "JetBrains Mono Nerd Font Mono ExtraBold"; + position = "0, -300"; + halign = "center"; + valign = "top"; + } + ]; + }; + }; + wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; @@ -148,7 +220,6 @@ ]; exec-once = [ - "waybar" ]; }; }; diff --git a/home/hyprland/waybar/default.nix b/home/hyprland/waybar/default.nix index 9126a7b..9cc8880 100644 --- a/home/hyprland/waybar/default.nix +++ b/home/hyprland/waybar/default.nix @@ -45,7 +45,7 @@ in programs.waybar = { enable = true; systemd = { - enable = false; # disable it,autostart it in hyprland conf + enable = true; # disable it,autostart it in hyprland conf target = "graphical-session.target"; }; style = '' diff --git a/hosts/magicman/configuration.nix b/hosts/magicman/configuration.nix index a351b1d..1627f4a 100644 --- a/hosts/magicman/configuration.nix +++ b/hosts/magicman/configuration.nix @@ -88,6 +88,7 @@ }; programs.hyprland = { enable = true; + withUWSM = true; xwayland.enable = true; portalPackage = pkgs.xdg-desktop-portal-hyprland; };