home: wm: add i3bar

This commit is contained in:
Bruno BELANYI 2021-04-04 19:28:34 +00:00
parent fe9f468e06
commit 1da8177ea2
2 changed files with 53 additions and 0 deletions

View file

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./i3.nix ./i3.nix
./i3bar.nix
]; ];
options.my.home.wm = with lib; { options.my.home.wm = with lib; {

52
home/wm/i3bar.nix Normal file
View file

@ -0,0 +1,52 @@
{ 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 = [
{
block = "music";
buttons = [ "prev" "play" "next" ];
}
{
block = "cpu";
}
{
block = "disk_space";
}
{
block = "net";
format = "{ssid} {ip} {signal_strength}";
}
{
block = "battery";
format = "{percentage}% ({time})";
full_format = "{percentage}%";
}
{
block = "temperature";
}
{
block = "sound";
}
{
block = "time";
format = "%F %T";
}
];
};
};
};
};
}