I3: Difference between revisions

imported from old wiki
adding examples for i3status configuration in home-manager
Line 201: Line 201:
</nowiki>
</nowiki>
}}
}}
=== i3status with home-manager ===
Same as in i3status-rust. Notice: home-manager will not override your existing config, i.e. if the file/folder  <code>~/.config/i3status/config</code>  is present on your system, there won't be any changes after rebuilding.
External resources that can help you with your setup: https://mynixos.com/home-manager/options/xsession.windowManager.i3.config
===== To enable i3status in home-manager and change some basic options: =====
<syntaxhighlight lang="nix" line="1" start="1">
programs.i3status = {
  enable = true;
  general = {
    colors = true;
    color_good = "#98971a";
    color_bad  = "#9d0006";
    interval = 1;
  };
};
</syntaxhighlight>
===== Adding various modules: =====
<syntaxhighlight lang="nix" line="1" start="1">
modules = {
  "disk /" = {
    enable = true;
    position = 1;
    settings = {
      format = "FREE: %free";
    };
  /* Put some of the modules below after this comment */
  };
</syntaxhighlight>
===== Current wireless connection (ethernet is pretty much the same) =====
<syntaxhighlight lang="nix" line="1" start="1">
"wireless <replace-with-interface-name>" = {
  enable = true;
  position = 2;
  settings = {
    format_up = "W: (%quality at %essid) %ip";
    format_down = "W: down";
  };
};
</syntaxhighlight>
===== Battery status =====
<syntaxhighlight lang="nix" line="1" start="1">
"battery 0" = {
  enable = true;
  position = 4;
  settings = {
    format = "BAT: %status %percentage %remaining %emptytime";
    format_down = "No battery";
    status_chr = "CHR";
    status_bat = "";
    status_unk = "?";
    status_full = "FULL";
    path = "/sys/class/power_supply/BAT1/uevent";
    low_threshold = 10;
  };
};
</syntaxhighlight>
=== Disabling default i3status modules: ===
After setting up my config, i3status showed two eth- and wifi's. To disable <code>ethernet _first_</code>  and <code>wireless _first_</code>  just add:<syntaxhighlight lang="nix" line="1" start="1">
"wireless _first_" = {
  enable = false;
};
"ethernet _first_" = {
  enable = false;
};
</syntaxhighlight>