Return to

Qtile Window Manager Development and debuging

I have been playing with and ricing Qtile and i was wondering if there was an appropriate way to debug code. I am getting tired of testing changes only to have to reboot in a different desktop environment and revert to a previous Kind of lost in the configuring the official method:

I know it Awesome WM, it displays errors and reverts to a default if I screw up the rc.lua. Is there a appropriate sandbox where i can test builds in a similar fashion Awesome? Should i just switch from vim to VScode?

Why do you have to reboot? You can’t just simply exit qtile or switch tty and kill it? Are you launching it with startx qtile, or using a dm?

Not sure about qtile, but i3, sway, jwm and I think openbox too, all have shortcut keys or menus to reload / re-read the configuration file. Does qtile lack something like that?

Killing and reloading Qtile will just open the bad config. I could tty and rename my altered config to and it will reload a safe default. Not too helpful for testing though. Qtile is started from the dm.

Qtile does have a reload config shortcut however, this along with all other shortcuts no longer work if the config file has any issues. I would have to revert the changes and reload Qtile from the terminal . I just reboot into gnome and make the changes there because I’m lazy.

I would rather have a way to test my configuration that doesn’t involve constantly reloading Qtile with no indication of what the error is.

No idea if qtile has a config check, some WMs have that. In any case, I think it would be faster for you to have a tty ready (ctrl+alt+f5 for example) where you are logged in, to add / remove qtile config lines, or just move / restore working qtile configs, then switch tty back to the usual (depends on the distro) and press the qtile reload shortcut. That’s how I’d do it (fortunately, sway refuses to load if the config has issues).

That depends on you, but vim is definitely helpful to learn, especially if you ever need to debug stuff on the command line. Having such a powerful editor at hand in a tty or ssh session can save you a lot of time. You can still use vscode if you prefer it, use whatever you feel comfortable, but keep in mind some tools are better than others in some regards and weaker in others. Be open minded about them.

Didn’t take too long to get something that works.

1 Like