diff --git a/home/wm/default.nix b/home/wm/default.nix index 10f86a4..b8eec93 100644 --- a/home/wm/default.nix +++ b/home/wm/default.nix @@ -2,6 +2,7 @@ { imports = [ ./i3.nix + ./i3bar.nix ]; options.my.home.wm = with lib; { diff --git a/home/wm/i3bar.nix b/home/wm/i3bar.nix new file mode 100644 index 0000000..80cc252 --- /dev/null +++ b/home/wm/i3bar.nix @@ -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"; + } + ]; + }; + }; + }; + }; +}