nix-config/home/wm/i3bar.nix

62 lines
1.3 KiB
Nix
Raw Normal View History

2021-04-04 21:28:34 +02:00
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.wm.i3bar;
2021-04-04 21:28:34 +02:00
in
{
config = lib.mkIf cfg.enable {
2021-04-04 21:28:34 +02:00
home.packages = with pkgs; [
alsaUtils # Used by `sound` block
lm_sensors # Used by `temperature` block
font-awesome # Icon font
2021-04-04 21:28:34 +02:00
];
programs.i3status-rust = {
enable = true;
bars = {
top = {
icons = "awesome5";
blocks = builtins.filter (attr: attr != { }) [
2021-04-04 21:28:34 +02:00
{
block = "music";
buttons = [ "prev" "play" "next" ];
max_width = 50;
hide_when_empty = true;
2021-04-04 21:28:34 +02:00
}
{
block = "cpu";
}
{
block = "disk_space";
}
{
block = "net";
format = "{ssid} {ip} {signal_strength}";
}
2021-05-09 17:45:24 +02:00
{
block = "backlight";
}
2021-04-04 21:28:34 +02:00
{
block = "battery";
format = "{percentage}% ({time})";
full_format = "{percentage}%";
}
{
block = "temperature";
collapsed = false;
2021-04-04 21:28:34 +02:00
}
{
block = "sound";
}
{
block = "time";
format = "%F %T";
}
];
};
};
};
};
}