2025-03-23 12:44:10 +11:00
|
|
|
{ config, lib, pkgs, ... }:
|
2025-03-15 20:20:13 +11:00
|
|
|
let
|
2025-03-23 13:29:25 +11:00
|
|
|
inherit (lib) boolToString defaultTo;
|
2025-03-15 20:20:13 +11:00
|
|
|
res = pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
|
pname = "eww-wayland-config";
|
|
|
|
|
version = "1.0.0";
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
installPhase = ''
|
2025-03-23 00:32:41 +11:00
|
|
|
cp -r ${../../res/eww} $out
|
2025-03-23 12:36:07 +11:00
|
|
|
|
|
|
|
|
substituteInPlace $out/eww.yuck \
|
2025-03-23 12:44:10 +11:00
|
|
|
--replace-fail "_BAT_ENABLED_" "${boolToString (config.me.batteryDevice != null)}" \
|
2025-03-23 13:29:25 +11:00
|
|
|
--replace-fail "_BAT_PATH_" "${defaultTo "" config.me.batteryDevice}" \
|
2025-03-23 12:44:10 +11:00
|
|
|
--replace-fail "_BT_ENABLED_" "${boolToString config.me.hasBluetooth}" \
|
|
|
|
|
--replace-fail "_WIFI_ENABLED_" "${boolToString config.me.hasWifi}"
|
2025-03-23 12:36:07 +11:00
|
|
|
|
2025-03-15 20:20:13 +11:00
|
|
|
substituteInPlace $out/eww.scss \
|
2025-03-23 12:36:07 +11:00
|
|
|
--replace-fail "EWW_BACKGROUND" "${config.catppuccin.hexcolors.crust}" \
|
|
|
|
|
--replace-fail "EWW_TEXT" "${config.catppuccin.hexcolors.text}" \
|
|
|
|
|
--replace-fail "EWW_ACCENT" "${config.catppuccin.hexcolors.${config.catppuccin.accent}}"
|
2025-03-15 20:20:13 +11:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
in {
|
2026-05-31 02:15:37 +10:00
|
|
|
home.packages = with pkgs; [ iw socat ];
|
2024-01-17 15:33:46 +07:00
|
|
|
programs.eww = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2026-05-30 01:57:08 +10:00
|
|
|
xdg.configFile."eww".source = res;
|
2024-01-17 15:33:46 +07:00
|
|
|
}
|