I3: Difference between revisions

From NixOS Wiki
imported>LinArcX
mNo edit summary
imported>Pstn
m Added some comments about effects of i3.extraPackages.
Line 19: Line 19:
       enable = true;
       enable = true;
       extraPackages = with pkgs; [
       extraPackages = with pkgs; [
         dmenu
         dmenu #application launcher most people use
         i3status
         i3status # gives you the default i3 status bar
         i3lock
         i3lock #default i3 screen locker
         i3blocks
         i3blocks #if you are planning on using i3blocks over i3status
     ];
     ];
     };
     };

Revision as of 13:53, 10 March 2019

i3 is a tiling window manager for X.

Enabling

To use i3 set services.xserver.windowManager.i3.enable to true. For example:

/etc/nixos/configuration.nix
{ config, pkgs, callPackage, ... }: {
  ...
  services.xserver = {
    enable = true;

    desktopManager = {
      default = "none";
      xterm.enable = false;
    };

    windowManager.i3 = {
      enable = true;
      extraPackages = with pkgs; [
        dmenu #application launcher most people use
        i3status # gives you the default i3 status bar
        i3lock #default i3 screen locker
        i3blocks #if you are planning on using i3blocks over i3status
     ];
    };
  };
  ...
}

With a desktop manager

i3 is a window manager and does not provide "cosmetic" services like managing multiple monitor configuration or media keys. This is what is usually delegated to a desktop manager. To use xfce as a desktop manager on top of i3, see Xfce#Using_as_a_desktop_manager_and_not_a_window_manager.

I3-gaps fork

To use i3-gaps fork, the following line should be added to the configuration.nix:

services.xserver.windowManager.i3.package = pkgs.i3-gaps;

DConf

If your settings aren't being saved for some applications (gtk3 applications, firefox), like the size of file selection windows, or the size of the save dialog, you will need to enable dconf:

/etc/nixos/configuration.nix
  programs.dconf.enable = true;
  services.dbus.packages = [ pkgs.gnome3.dconf ];

Lxappearance

To change the icon and themes you can install lxappearance:

/etc/nixos/configuration.nix
environment.systemPackages = with pkgs; [
    #---- i3
    lxappearance
    ...
]

Wallpaper

If ~/.background-image exists then it will be displayed as a wallpaper. Options services.xserver.desktopManager.wallpaper.combineScreens and .mode control exactly how it is displayed.