home: i3bar: setup blocks

This commit is contained in:
Antoine Martin 2021-04-19 22:54:20 +02:00
parent f3313d39a6
commit 39c6f6db3a

View file

@ -3,10 +3,12 @@ let
isEnabled = config.my.home.x.enable; isEnabled = config.my.home.x.enable;
in in
{ {
config = lib.mkIf isEnabled { config = lib.mkIf isEnabled {
home.packages = with pkgs; [ home.packages = with pkgs; [
alsaUtils # Used by `sound` block iw # Used by `net` block
lm_sensors # Used by `temperature` block lm_sensors # Used by `temperature` block
font-awesome-ttf
]; ];
programs.i3status-rust = { programs.i3status-rust = {
@ -15,6 +17,52 @@ in
bars = { bars = {
top = { top = {
theme = "solarized-light"; theme = "solarized-light";
icons = "awesome5";
blocks = [
{
block = "disk_space";
path = "/";
alias = "/";
info_type = "available";
unit = "GB";
interval = 60;
warning = 20.0;
alert = 10.0;
}
{
block = "cpu";
interval = 1;
}
{
block = "temperature";
collapsed = false;
interval = 10;
format = "{max}°";
# FIXME: specific to my AMD Ryzen CPU. Make this depend on
# hostname or something else
chip = "k10temp-pci-*";
inputs = [ "Tccd1" ];
}
{
block = "networkmanager";
primary_only = true;
}
{
block = "sound";
driver = "pulseaudio";
}
# {
# block = "notify";
# }
{
block = "time";
interval = 5;
format = "%a %d/%m %T";
locale = "fr_FR";
timezone = "Europe/Paris";
}
];
}; };
}; };
}; };