nix-configs/modules/desktop/waybar/kmonad.nix

35 lines
780 B
Nix

{
pkgs,
config,
lib,
...
}:
with lib;
mkIf (config.xyno.hardware.kmonad.enable) {
xyno.desktop.waybar.config = {
"custom/kmonad" = {
exec =
(pkgs.writeShellApplication {
name = "kmonad-layer-watcher";
runtimeInputs = [ pkgs.inotify-tools ];
text = ''
cat /tmp/kmonad-layer;
while inotifywait -qq -e modify /tmp/kmonad-layer; do
cat /tmp/kmonad-layer;
done
'';
})
+ "/bin/kmonad-layer-watcher";
restart-interval = 5;
};
modules-left = mkBefore [ "custom/kmonad" ];
};
xyno.desktop.waybar.style = ''
#custom-kmonad {
color: #84929D;
margin-left: 4px;
border-bottom: 3px solid #fbf1c7;
}
'';
}