nix-dotfiles/snippets/i3blocks.nix
vorboyvo a5349ca647 Did A BUNCH of semantic refactoring.
Added i3blocks config; not active.
2024-12-04 12:53:29 -05:00

46 lines
1.1 KiB
Nix

{ pkgs, lib, config, ... }:
rec {
programs.i3blocks = {
enable = true;
bars = {
top = {
# The title block
title = {
interval = "persist";
command = "ls";
};
};
bottom = {
time = {
command = "date +%r";
interval = 1;
};
# Make sure this block comes after the time block
date = lib.hm.dag.entryAfter [ "time" ] {
command = "date +%d";
interval = 5;
};
# And this block after the example block
example = lib.hm.dag.entryAfter [ "date" ] {
command = "echo hi $(date +%s)";
interval = 3;
};
};
};
};
wayland.windowManager.sway.config.bars = [
{
statusCommand = "${pkgs.lib.getExe config.programs.i3blocks.package}"; # -c ${config.xdg.}";
position = "top";
fonts = config.wayland.windowManager.sway.config.fonts;
}
{
statusCommand = "${pkgs.lib.getExe config.programs.i3blocks.package} -c bottom";
position = "bottom";
fonts = config.wayland.windowManager.sway.config.fonts;
}
];
}