home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

Add qtile to xsession.windowManager.

Open taitep opened this issue 1 year ago • 2 comments

Description

Recently got into nixos, and home-manager really seemed cool. Decided to try making a qtile config with it, and i realized that qtile is not a part of home-manager's collection of window managers! Even if it just allows you to maybe give a config.py file, it would be kinda convenient to just do xsession.windowManager.qtile.enable = true and get qtile.

taitep avatar Nov 12 '23 12:11 taitep

I wanted to try this out, but what about something like this (A mock-up of a configuration)

{
   xsession.windowManager.qtile = {
      enable = true;
      # Using a path to symlink to the QTile config.py
      configFile = ./config.py;
      # Using a straight string to put into the QTile config.py
      configFile = ''
         print("Hello world!")
         # Insert QTile script here
      '';
      # Using a package's file to put into the QTile config.py
      configFile = (pkgs.writeText "config.py" ''
         print("Hello world!")
         # Insert QTile script here
      '');
   };
}

Wondering what would, at the end of the day, be more useful for a QTile configuration. I don't use QTile, but I would love to help.

It's worth noting that you can actually do this yourself by using a config similar to this:

{ lib, pkgs, ... }:
{
   # Add qtile to the packages
   home.packages = [ pkgs.qtile ];
   # Set the windowManager command to qtile
   xsession.windowManager.command = "${lib.getExe pkgs.qtile}";
   # Add the config.py file to the config directory
   xdg.configFile."qtile/config.py" = {
      source = ./config.py; # Assumes you have a config.py file in the same directory as this nix file.
      # See xdg.configFile in the home manager options.
   };
}

Noodlez1232 avatar Nov 15 '23 04:11 Noodlez1232

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

stale[bot] avatar Feb 14 '24 00:02 stale[bot]