Add kitty theming

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-23 20:46:43 +03:00
parent 3d503fd1c2
commit bedf27aa5f
9 changed files with 271 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
{ user ? throw "user argument is required" }: { config, pkgs, ... }:
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
let
hmConfig = config.home-manager.users."${user.name}";
@@ -10,24 +10,30 @@ in
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
};
theme.extraConfig = let name = "theme-swww"; in
wayland.windowManager.hyprland.initExtraConfig = let name = "init-swww"; in
"${pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [
coreutils-full
swww
];
text = ''
if ! pgrep -x "swww-daemon" > /dev/null; then
swww-daemon &> /tmp/swww.log &
fi
inherit name;
runtimeInputs = with pkgs; [ swww ];
text = ''
swww-daemon &> /tmp/swww.log
'';
}}/bin/${name} &";
while ! swww query &> /dev/null; do
sleep 0.1
done
theme.extraConfig = let name = "theme-swww"; in
lib.mkAfter "${pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [
coreutils-full
procps
swww
];
text = ''
while ! swww query &> /dev/null; do
sleep 0.1
done
swww img "${hmConfig.theme.configDir}/wallpaper"
'';
}}/bin/${name}";
swww img "${hmConfig.theme.configDir}/wallpaper"
'';
}}/bin/${name} &";
};
}