aboutsummaryrefslogtreecommitdiff
path: root/modules/i3status.nix
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-03-22 17:17:28 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-03-22 17:17:28 -0400
commited93ebb6ee7b2259802673dcdc5c86246bedab4e (patch)
tree5bbdbd17c158e906b65e49c9d9fa255fcc5ea348 /modules/i3status.nix
parent19f764780c12c1e0ee13998e980c64acf7dc9b0e (diff)
downloadhome-ed93ebb6ee7b2259802673dcdc5c86246bedab4e.tar.gz
i3bar
Diffstat (limited to 'modules/i3status.nix')
-rw-r--r--modules/i3status.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/modules/i3status.nix b/modules/i3status.nix
new file mode 100644
index 0000000..d796943
--- /dev/null
+++ b/modules/i3status.nix
@@ -0,0 +1,74 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.modules.i3status;
+in
+{
+ options.modules.i3status = {
+ enable = lib.mkEnableOption "i3status";
+ battery = lib.mkEnableOption "battery module";
+ wireless = lib.mkOption {
+ type = lib.types.bool;
+ description = "enable wifi module";
+ default = true;
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ home.packages = with pkgs; [
+ ];
+ programs.i3status = {
+ enable = true;
+ enableDefault = false;
+ general = {
+ colors = true;
+ color_good = "#cacaca";
+ color_degraded = "#aca98a";
+ color_bad = "#ac8a8c";
+ interval = 60;
+ separator = " ";
+ };
+ modules = {
+ "volume master" = {
+ position = 1;
+ settings = {
+ format = " %volume";
+ format_muted = "";
+ device = "default";
+# mixer = "Master";
+# mixer_idx = 0;
+ };
+ };
+ "wireless _first_" = {
+ enable = cfg.wireless;
+ position = 3;
+ settings = {
+ format_up = "%quality";
+ format_down = "󰖪";
+ };
+ };
+ "ethernet _first_" = {
+ position = 2;
+ enable = !cfg.wireless;
+ };
+ # i have some laptops that use bat1
+ "battery all" = {
+ position = 4;
+ enable = cfg.battery;
+ settings = {
+ format = "%status %percentage";
+ format_percentage = "%.00f%s";
+ status_chr = "󱐋";
+ status_bat = "";
+ status_idle = "󱐋";
+ };
+ };
+ "tztime local" = {
+ position = 10;
+ settings = {
+ format = " %-I:%M %P";
+ };
+ };
+ };
+ };
+ };
+}