From 896933bbc3e7406cfbde779bb2328a5ce8590c60 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Fri, 12 Jan 2024 22:25:35 -0300 Subject: [PATCH] fix: eww daemon --- hosts/desktop/wm.nix | 25 +++++++++++++++++++ hosts/desktop/work/home.nix | 1 + modules/home-manager/programs/eww/default.nix | 20 --------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/hosts/desktop/wm.nix b/hosts/desktop/wm.nix index b35910e..220a44f 100644 --- a/hosts/desktop/wm.nix +++ b/hosts/desktop/wm.nix @@ -2,6 +2,23 @@ let cfg = config.wm; + wm-boot = pkgs.writeShellScriptBin "wm-boot" '' + eww="${pkgs.eww-wayland}/bin/eww" + + if [[ "$($eww ping)" -ne "pong" ]]; then + $eww daemon + fi + $eww close-all + $eww open bar + $eww open bar-2 + $eww reload + + ''; + wm-update = pkgs.writeShellScriptBin "wm-update" '' + eww="${pkgs.eww-wayland}/bin/eww" + + $eww reload + ''; in { imports = [ @@ -15,6 +32,13 @@ in hyprland.enable = true; + hyprland.exec = [ + "${wm-boot}/bin/wm-boot" + ]; + home.activation = { + wm-update = "${wm-update}/bin/wm-update"; + }; + hyprland.monitors = [ { name = "monitor1"; @@ -58,3 +82,4 @@ in ]; }; } + diff --git a/hosts/desktop/work/home.nix b/hosts/desktop/work/home.nix index 76d1b12..f96f3cf 100644 --- a/hosts/desktop/work/home.nix +++ b/hosts/desktop/work/home.nix @@ -6,4 +6,5 @@ ]; theme.accent = "94e2d5"; + wm.wallpaper = ../../../static/guz-wallpaper-work.webp; } diff --git a/modules/home-manager/programs/eww/default.nix b/modules/home-manager/programs/eww/default.nix index 4f8e10e..fb3b6fa 100644 --- a/modules/home-manager/programs/eww/default.nix +++ b/modules/home-manager/programs/eww/default.nix @@ -57,23 +57,6 @@ let echo $rain fi ''; - - eww-boot = pkgs.writeShellScriptBin "eww-boot" '' - eww="${pkgs.eww-wayland}/bin/eww" - - ping="$($eww ping)" - if [[ "$ping" == "pong" ]]; then - $eww reload - $eww close-all - else - $eww daemon - $eww close-all - fi - - $eww open bar - $eww open bar-2 - - ''; in { imports = [ ]; @@ -85,9 +68,6 @@ in home.packages = with pkgs; [ eww-wayland ]; - home.activation = { - eww-boot = "${eww-boot}/bin/eww-boot"; - }; home.file."${ewwDir}/eww.yuck".source = ./eww.yuck; home.file."${ewwDir}/eww.scss".source = ./eww.scss;