nix-config/home/wm/i3bar.nix

59 lines
1.4 KiB
Nix
Raw Normal View History

2021-04-04 21:28:34 +02:00
{ config, lib, pkgs, ... }:
let
isEnabled = config.my.home.wm.windowManager == "i3";
in
{
config = lib.mkIf isEnabled {
home.packages = with pkgs; [
alsaUtils # Used by `sound` block
lm_sensors # Used by `temperature` block
];
programs.i3status-rust = {
enable = true;
bars = {
top = {
blocks = builtins.filter (attr: attr != { }) [
2021-04-04 21:28:34 +02:00
{
block = "music";
buttons = [ "prev" "play" "next" ];
}
{
block = "cpu";
}
{
block = "disk_space";
}
{
block = "net";
format = "{ssid} {ip} {signal_strength}";
}
(lib.optionalAttrs (config.my.home.gammastep.enable) {
block = "hueshift";
hue_shifter = "gammastep";
step = 100;
click_temp = config.my.home.gammastep.temperature.day;
})
2021-04-04 21:28:34 +02:00
{
block = "battery";
format = "{percentage}% ({time})";
full_format = "{percentage}%";
}
{
block = "temperature";
}
{
block = "sound";
}
{
block = "time";
format = "%F %T";
}
];
};
};
};
};
}