Qtile: Difference between revisions

From NixOS Wiki
imported>Wisehh
No edit summary
Jooooscha (talk | contribs)
mNo edit summary
 
(6 intermediate revisions by 5 users not shown)
Line 3: Line 3:
== Enabling ==
== Enabling ==


To enable Qtile as your windowManager, set: <code>services.xserver.windowManager.qtile.enable</code> to <code>true</code>. For example:
To enable Qtile as your window manager, set <code>services.xserver.windowManager.qtile.enable = true</code>. For example:


{{file|/etc/nixos/configuration.nix|nix|
{{file|/etc/nixos/configuration.nix|nix|}}
<nowiki>
<syntaxhighlight lang="nix">
{ config, pkgs, ... }:
{
  ...
   services.xserver.windowManager.qtile.enable = true;
   services.xserver.windowManager.qtile.enable = true;
  ...
}
}
</syntaxhighlight>To start Qtile on Wayland from your display manager (sddm, lightdm, etc) you have to add a Desktop Entry to your config like this.{{file|/etc/nixos/qtile.nix|nix|}}
<syntaxHighlight lang=nix>
{ config, pkgs, lib, ... }:


</nowiki>
{
}}
  nixpkgs.overlays = [
  (self: super: {
    qtile-unwrapped = super.qtile-unwrapped.overrideAttrs(_: rec {
      postInstall = let
        qtileSession = ''
        [Desktop Entry]
        Name=Qtile Wayland
        Comment=Qtile on Wayland
        Exec=qtile start -b wayland
        Type=Application
        '';
        in
        ''
      mkdir -p $out/share/wayland-sessions
      echo "${qtileSession}" > $out/share/wayland-sessions/qtile.desktop
      '';
      passthru.providedSessions = [ "qtile" ];
    });
  })
];
 
services.xserver.displayManager.sessionPackages = [ pkgs.qtile-unwrapped ];
}
</syntaxHighlight>


== Warning ==
== Warning ==
The installation of Qtile leads to several of its dependencies being leaked in the user's PATH. This prevents the user from running a custom installation of python3 as Qtile will shadow the systemPackages in the PATH with its own python3. For more information see: [https://github.com/NixOS/nixpkgs/issues/171972 Kitty leaks packages into system environment (Additional context)]
The installation of Qtile leads to several of its dependencies being leaked in the user's PATH. This prevents the user from running a custom installation of python3 as Qtile will shadow the systemPackages in the PATH with its own python3. For more information see: [https://github.com/NixOS/nixpkgs/issues/186243 Cannot use Globally Defined Python Environment While Inside Qtile] and [https://github.com/NixOS/nixpkgs/issues/171972 Kitty leaks packages into system environment (Additional context)]


[[Category:Window managers]]
[[Category:Window managers]]
[[Category:Applications]]
[[Category:Applications]]

Latest revision as of 17:45, 1 June 2024

Qtile is a full-featured, hackable tiling window manager written and configured in Python.

Enabling

To enable Qtile as your window manager, set services.xserver.windowManager.qtile.enable = true. For example:

/etc/nixos/configuration.nix
{
  services.xserver.windowManager.qtile.enable = true;
}

To start Qtile on Wayland from your display manager (sddm, lightdm, etc) you have to add a Desktop Entry to your config like this.

/etc/nixos/qtile.nix
{ config, pkgs, lib, ... }:

{
  nixpkgs.overlays = [
  (self: super: {
    qtile-unwrapped = super.qtile-unwrapped.overrideAttrs(_: rec {
      postInstall = let
        qtileSession = ''
        [Desktop Entry]
        Name=Qtile Wayland
        Comment=Qtile on Wayland
        Exec=qtile start -b wayland
        Type=Application
        '';
        in
        ''
      mkdir -p $out/share/wayland-sessions
      echo "${qtileSession}" > $out/share/wayland-sessions/qtile.desktop
      '';
      passthru.providedSessions = [ "qtile" ];
    });
  })
];

services.xserver.displayManager.sessionPackages = [ pkgs.qtile-unwrapped ];
}

Warning

The installation of Qtile leads to several of its dependencies being leaked in the user's PATH. This prevents the user from running a custom installation of python3 as Qtile will shadow the systemPackages in the PATH with its own python3. For more information see: Cannot use Globally Defined Python Environment While Inside Qtile and Kitty leaks packages into system environment (Additional context)