fix: eww daemon

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-01-12 22:25:35 -03:00
parent 7e79bc2de1
commit 896933bbc3
3 changed files with 26 additions and 20 deletions

View File

@@ -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
];
};
}

View File

@@ -6,4 +6,5 @@
];
theme.accent = "94e2d5";
wm.wallpaper = ../../../static/guz-wallpaper-work.webp;
}

View File

@@ -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;