nix-config/home/wm/i3bar.nix
Bruno BELANYI 971ee359ce home: wm: use explicit 'enable' options
This is so that I can explicitly enable them if I were to use Wayland
and Sway, given that they should be compatible with both environment.

This also means that putting them in `/home/x/` would a misnomer... Will
revisit this if and when I try out Wayland and sway...
2021-05-08 17:14:13 +02:00

60 lines
1.4 KiB
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.home.wm.i3bar;
in
{
config = lib.mkIf cfg.enable {
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 != { }) [
{
block = "music";
buttons = [ "prev" "play" "next" ];
hide_when_empty = true;
}
{
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;
})
{
block = "battery";
format = "{percentage}% ({time})";
full_format = "{percentage}%";
}
{
block = "temperature";
}
{
block = "sound";
}
{
block = "time";
format = "%F %T";
}
];
};
};
};
};
}