Qtile: Difference between revisions

Gurjaka (talk | contribs)
Samu (talk | contribs)
Added information regarding testing. Removed duplicate code at the top of the page. Small grammar changes.
 
Line 2: Line 2:
== Setup ==
== Setup ==


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


{{file|/etc/nixos/configuration.nix|nix|}}
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
{
services.xserver.windowManager.qtile.enable = true;
  services.xserver.windowManager.qtile.enable = true;
}
</syntaxhighlight>
</syntaxhighlight>
{{Note|The Qtile package creates desktop files for both X11 and Wayland, to use one of the backends choose the right session in your display manager.}}
{{Note|The Qtile package creates desktop files for both X11 and Wayland, to use one of the backends choose the right session in your display manager.}}
Line 31: Line 28:
</syntaxhighlight>
</syntaxhighlight>


or, if you have a directory containing multiple python files:
Or, if you have a directory containing multiple python files:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 154: Line 151:
</syntaxhighlight>
</syntaxhighlight>


This flake can also be tested with a vm:
This flake can also be tested with a virtual machine:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
sudo nixos-rebuild build-vm --flake .#demo
sudo nixos-rebuild build-vm --flake .#demo
</syntaxhighlight>
</syntaxhighlight>


Gives you a script to run that runs Qemu to test your config. For this to work you have to set a user with a password.
This gives you a script to run that runs Qemu to test your config. For this to work you have to set a user with a password.
 
To hack on Qtile with Nix, simply run <code>nix develop</code> in a checkout of the Qtile repository. In the development shell, there are a few useful commands:
 
* <code>qtile-run-tests-wayland</code>: Run all Wayland tests.
* <code>qtile-run-tests-x11</code>: Run all X11 tests.


{{Note|1=For a detailed walkthrough on setting up Qtile with flakes—from basic installation to package overrides, see [https://gurjaka.codeberg.page/blog.html?post=qtile-flake Gurjaka's Qtile Flake Guide].}}
{{Note|1=For a detailed walkthrough on setting up Qtile with flakes—from basic installation to package overrides, see [https://gurjaka.codeberg.page/blog.html?post=qtile-flake Gurjaka's Qtile Flake Guide].}}
Line 165: Line 167:
== Credits ==
== Credits ==
* Based on the official [https://docs.qtile.org/en/latest/manual/install/nixos.html# Qtile Documentation].
* Based on the official [https://docs.qtile.org/en/latest/manual/install/nixos.html# Qtile Documentation].
* Wayland details from [https://gist.github.com/jwijenbergh/48da1a8f4c4a56d122407c4d009bc81f Gist by Jwijenbergh]
* Wayland details from [https://gist.github.com/jwijenbergh/48da1a8f4c4a56d122407c4d009bc81f Gist by Jwijenbergh].
* Flake config details from [https://gurjaka.codeberg.page/blog.html?post=qtile-flake Gurjaka's Qtile Flake Guide].
* NixOS implementation details maintained by the community.
* NixOS implementation details maintained by the community.


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