nix-config/home/wm/i3bar/default.nix

88 lines
2.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; [
2022-09-29 21:58:48 +02:00
alsa-utils # Used by `sound` block
2021-04-04 21:28:34 +02:00
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;
dynamic_width = true;
hide_when_empty = true;
2021-04-04 21:28:34 +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";
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";
collapsed = false;
2021-04-04 21:28:34 +02:00
}
{
block = "sound";
device_kind = "source"; # Microphone status
format = ""; # Only show icon
}
2021-04-04 21:28:34 +02:00
{
block = "sound";
show_volume_when_muted = true;
2021-04-04 21:28:34 +02:00
}
{
block = "time";
format = "%F %T";
}
];
};
};
};
};
}