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-10-16 17:59:18 +02:00
|
|
|
dynamic_width = true;
|
2021-04-05 22:38:25 +02:00
|
|
|
hide_when_empty = true;
|
2021-04-04 21:28:34 +02:00
|
|
|
}
|
2021-10-16 17:55:59 +02:00
|
|
|
(lib.optionalAttrs config.my.home.bluetooth.enable {
|
|
|
|
block = "bluetooth";
|
|
|
|
mac = "4C:87:5D:06:40:D9";
|
|
|
|
hide_disconnected = true;
|
|
|
|
format = "Boson {percentage}";
|
|
|
|
})
|
|
|
|
(lib.optionalAttrs config.my.home.bluetooth.enable {
|
|
|
|
block = "bluetooth";
|
|
|
|
mac = "94:DB:56:00:EE:93";
|
|
|
|
hide_disconnected = true;
|
|
|
|
format = "Protons {percentage}";
|
|
|
|
})
|
|
|
|
(lib.optionalAttrs config.my.home.bluetooth.enable {
|
|
|
|
block = "bluetooth";
|
|
|
|
mac = "F7:78:BA:76:52:F7";
|
|
|
|
hide_disconnected = true;
|
|
|
|
format = "MX Ergo {percentage}";
|
|
|
|
})
|
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-05-22 16:23:39 +02:00
|
|
|
invert_icons = true;
|
2021-05-09 17:45:24 +02:00
|
|
|
}
|
2021-04-04 21:28:34 +02:00
|
|
|
{
|
|
|
|
block = "battery";
|
2021-08-31 18:29:02 +02:00
|
|
|
format = "{percentage} ({time})";
|
|
|
|
full_format = "{percentage}";
|
2021-04-04 21:28:34 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|