From f035aa1fe36d7db8c6be0b09101315c17792d313 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Tue, 19 Nov 2024 13:55:47 +0100 Subject: [PATCH] feat(eww): on both computers --- ahrc-laptop/home.nix | 26 +++++------ ahrc-pc/home.nix | 1 + {ahrc-laptop => common}/eww/eww.scss | 0 {ahrc-laptop => common}/eww/eww.yuck | 45 ++++++++++++++++++- .../eww/listen/niri/window-title | 0 .../eww/listen/niri/workspaces | 0 common/home.nix | 6 ++- 7 files changed, 62 insertions(+), 16 deletions(-) rename {ahrc-laptop => common}/eww/eww.scss (100%) rename {ahrc-laptop => common}/eww/eww.yuck (85%) rename {ahrc-laptop => common}/eww/listen/niri/window-title (100%) rename {ahrc-laptop => common}/eww/listen/niri/workspaces (100%) diff --git a/ahrc-laptop/home.nix b/ahrc-laptop/home.nix index 4f0cb17..b9844fa 100644 --- a/ahrc-laptop/home.nix +++ b/ahrc-laptop/home.nix @@ -37,20 +37,18 @@ "Mod+Shift+quotedbl".action = move-column-to-workspace 3; "Mod+Shift+apostrophe".action = move-column-to-workspace 4; }; - spawn-at-startup = [{ - command = [ - "swaybg" - "-i" - "/home/ahurac/.local/share/backgrounds/default.png" - "-m" - "fill" - ]; - }]; - }; - - programs.eww = { - enable = true; - configDir = ./eww; + spawn-at-startup = [ + { + command = [ + "swaybg" + "-i" + "/home/ahurac/.local/share/backgrounds/default.png" + "-m" + "fill" + ]; + } + { command = [ "eww" "open" "dock_ahrc-laptop" ]; } + ]; }; home.file.".local/share/backgrounds/default.png" = { diff --git a/ahrc-pc/home.nix b/ahrc-pc/home.nix index 925aa81..ec95639 100644 --- a/ahrc-pc/home.nix +++ b/ahrc-pc/home.nix @@ -29,5 +29,6 @@ "Mod+Shift+3".action = move-column-to-workspace 3; "Mod+Shift+4".action = move-column-to-workspace 4; }; + spawn-at-startup = [{ command = [ "eww" "open" "dock_ahrc-pc" ]; }]; }; } diff --git a/ahrc-laptop/eww/eww.scss b/common/eww/eww.scss similarity index 100% rename from ahrc-laptop/eww/eww.scss rename to common/eww/eww.scss diff --git a/ahrc-laptop/eww/eww.yuck b/common/eww/eww.yuck similarity index 85% rename from ahrc-laptop/eww/eww.yuck rename to common/eww/eww.yuck index c8b27b1..1e51ac3 100644 --- a/ahrc-laptop/eww/eww.yuck +++ b/common/eww/eww.yuck @@ -135,7 +135,7 @@ ) ) -(defwindow dock +(defwindow dock_ahrc-laptop :monitor 0 :geometry (geometry :x "0" @@ -177,3 +177,46 @@ ) ) ) + +(defwindow dock_ahrc-pc + :monitor 0 + :geometry (geometry + :x "0" + :y "0" + :width "100%" + :height "30px" + :anchor "bottom center" + ) + :stacking "fg" + :exclusive true + + (centerbox + :class "main" + + (box + :class "left" + :halign "start" + :space-evenly false + + (workspaces) + (window-title) + ) + + (box + :class "middle" + :space-evenly false + + (tray) + (time) + (notifications) + ) + + (box + :class "right" + :halign "end" + :space-evenly false + + "" + ) + ) +) diff --git a/ahrc-laptop/eww/listen/niri/window-title b/common/eww/listen/niri/window-title similarity index 100% rename from ahrc-laptop/eww/listen/niri/window-title rename to common/eww/listen/niri/window-title diff --git a/ahrc-laptop/eww/listen/niri/workspaces b/common/eww/listen/niri/workspaces similarity index 100% rename from ahrc-laptop/eww/listen/niri/workspaces rename to common/eww/listen/niri/workspaces diff --git a/common/home.nix b/common/home.nix index dabf79e..a0e28f2 100644 --- a/common/home.nix +++ b/common/home.nix @@ -428,7 +428,6 @@ }; spawn-at-startup = [ { command = [ "eww" "daemon" ]; } - { command = [ "eww" "open" "dock" ]; } ]; }; }; @@ -436,4 +435,9 @@ programs.mpv.enable = true; programs.jq.enable = true; programs.fastfetch.enable = true; + + programs.eww = { + enable = true; + configDir = ./eww; + }; }