From 35645b93a6432cbd44e75b4f2e928bb9d4ca71d1 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sat, 6 Jul 2024 03:07:47 -0400 Subject: [PATCH] feat(desktop): wpaperd -> hyprpaper --- flake.lock | 40 +------------------ flake.nix | 10 +---- inputs.nix | 8 ---- .../desktop-environment/home/style.nix | 4 +- modules/desktop/display-manager/astal.nix | 4 +- modules/desktop/home/hyprpaper.nix | 25 ++++++++++++ modules/desktop/home/wpaperd.nix | 18 --------- 7 files changed, 32 insertions(+), 77 deletions(-) create mode 100644 modules/desktop/home/hyprpaper.nix delete mode 100644 modules/desktop/home/wpaperd.nix diff --git a/flake.lock b/flake.lock index bdc62895..dbc68d22 100644 --- a/flake.lock +++ b/flake.lock @@ -2197,8 +2197,7 @@ "subsync": "subsync", "trash-d-src": "trash-d-src", "vimplugin-easytables-src": "vimplugin-easytables-src", - "vimplugin-ts-error-translator-src": "vimplugin-ts-error-translator-src", - "wpaperd": "wpaperd" + "vimplugin-ts-error-translator-src": "vimplugin-ts-error-translator-src" } }, "scss-reset": { @@ -2509,21 +2508,6 @@ "type": "github" } }, - "systems_8": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "trash-d-src": { "flake": false, "locked": { @@ -2657,28 +2641,6 @@ "type": "github" } }, - "wpaperd": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_8" - }, - "locked": { - "lastModified": 1718794850, - "narHash": "sha256-HJX49FVqbRWa3HwN5fVbPVLZ7lvrtni0nuiY2SRwhP4=", - "owner": "danyspin97", - "repo": "wpaperd", - "rev": "d4a9cd8b751bed47bf57a93a7ee63054ba43e63b", - "type": "github" - }, - "original": { - "owner": "danyspin97", - "repo": "wpaperd", - "rev": "d4a9cd8b751bed47bf57a93a7ee63054ba43e63b", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", diff --git a/flake.nix b/flake.nix index 5c4f9e58..fb6cdfcb 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,5 @@ # Do not modify! This file is generated. + { inputs = { Hyprspace = { @@ -350,13 +351,6 @@ repo = "ts-error-translator.nvim"; type = "github"; }; - wpaperd = { - inputs.nixpkgs.follows = "nixpkgs"; - owner = "danyspin97"; - repo = "wpaperd"; - rev = "d4a9cd8b751bed47bf57a93a7ee63054ba43e63b"; - type = "github"; - }; }; outputs = inputs: inputs.flakegen ./flake.in.nix inputs; -} +} \ No newline at end of file diff --git a/inputs.nix b/inputs.nix index e9f8a194..bd6338e4 100644 --- a/inputs.nix +++ b/inputs.nix @@ -161,14 +161,6 @@ let repo = "grim-hyprland"; }; - wpaperd = mkDep { - owner = "danyspin97"; - repo = "wpaperd"; - - # FIXME: latest breaks - rev = "d4a9cd8b751bed47bf57a93a7ee63054ba43e63b"; - }; - discord-overlay = mkDep { owner = "matt1432"; repo = "discord-nightly-overlay"; diff --git a/modules/desktop/desktop-environment/home/style.nix b/modules/desktop/desktop-environment/home/style.nix index 478c97a2..87e16da2 100644 --- a/modules/desktop/desktop-environment/home/style.nix +++ b/modules/desktop/desktop-environment/home/style.nix @@ -3,7 +3,7 @@ in { imports = [ ../../home/theme - ../../home/wpaperd.nix + ../../home/hyprpaper.nix ]; wayland.windowManager.hyprland = { @@ -12,7 +12,7 @@ in { exec-once = [ "hyprctl setcursor Dracula-cursors 24" - "wpaperd -d" + "hyprpaper" ]; windowrule = [ diff --git a/modules/desktop/display-manager/astal.nix b/modules/desktop/display-manager/astal.nix index 22e9b328..12dd64fa 100644 --- a/modules/desktop/display-manager/astal.nix +++ b/modules/desktop/display-manager/astal.nix @@ -26,7 +26,7 @@ in { imports = [ astal.homeManagerModules.default ../home/theme - ../home/wpaperd.nix + ../home/hyprpaper.nix ]; programs.astal.enable = true; @@ -50,7 +50,7 @@ in { '' import { transpileTypeScript } from './js/utils.js'; - Utils.execAsync('wpaperd -d'); + Utils.execAsync('hyprpaper'); export default (await transpileTypeScript('greeter')).default; ''; diff --git a/modules/desktop/home/hyprpaper.nix b/modules/desktop/home/hyprpaper.nix new file mode 100644 index 00000000..9583d38c --- /dev/null +++ b/modules/desktop/home/hyprpaper.nix @@ -0,0 +1,25 @@ +{ + lib, + pkgs, + self, + ... +}: let + wallpaper = toString self.legacyPackages.${pkgs.system}.dracula.wallpaper; +in { + home.packages = with pkgs; [hyprpaper]; + + xdg.configFile."hypr/hyprpaper.conf" = { + text = lib.hm.generators.toHyprconf { + attrs = { + ipc = "on"; + splash = false; + + preload = [wallpaper]; + + wallpaper = [ + ",${wallpaper}" + ]; + }; + }; + }; +} diff --git a/modules/desktop/home/wpaperd.nix b/modules/desktop/home/wpaperd.nix deleted file mode 100644 index 33bd3043..00000000 --- a/modules/desktop/home/wpaperd.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - pkgs, - self, - wpaperd, - ... -}: let - inherit (pkgs.writers) writeTOML; - wpaperdPkg = wpaperd.packages.${pkgs.system}.default; -in { - home.packages = [wpaperdPkg]; - - xdg.configFile."wpaperd/config.toml".source = writeTOML "config.toml" { - default = { - path = toString self.legacyPackages.${pkgs.system}.dracula.wallpaper; - mode = "stretch"; - }; - }; -}