2021-04-04 21:28:34 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
2021-04-05 23:27:20 +02:00
|
|
|
cfg = config.my.home.wm.i3bar;
|
2021-04-04 21:28:34 +02:00
|
|
|
in
|
|
|
|
{
|
2021-04-05 23:27:20 +02:00
|
|
|
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
|
2021-05-04 19:16:18 +02:00
|
|
|
font-awesome # Icon font
|
2021-04-04 21:28:34 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
programs.i3status-rust = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
bars = {
|
|
|
|
top = {
|
2021-05-04 19:16:18 +02:00
|
|
|
icons = "awesome5";
|
|
|
|
|
2021-04-05 17:58:15 +02:00
|
|
|
blocks = builtins.filter (attr: attr != { }) [
|
2021-04-04 21:28:34 +02:00
|
|
|
{
|
|
|
|
block = "music";
|
|
|
|
buttons = [ "prev" "play" "next" ];
|
2021-05-03 20:41:03 +02:00
|
|
|
max_width = 50;
|
2021-04-05 22:38:25 +02:00
|
|
|
hide_when_empty = true;
|
2021-04-04 21:28:34 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "cpu";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "disk_space";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "net";
|
|
|
|
format = "{ssid} {ip} {signal_strength}";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "battery";
|
|
|
|
format = "{percentage}% ({time})";
|
|
|
|
full_format = "{percentage}%";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "temperature";
|
2021-05-03 20:23:22 +02:00
|
|
|
collapsed = false;
|
2021-04-04 21:28:34 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "sound";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "time";
|
|
|
|
format = "%F %T";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|