Agree with James's questions. No reason for it to work but crash on restart.
As for where to put custom classes, it's really up to you. If it's small, it's fine for it to be in the config file. If not, put it in a file that's in your python path and import it. The simplest thing would be to create a file in the same folder as config.py. Let's say it's called mylayout.py then, in your config file, just do "from mylayout import MyLayout". On Sunday, 17 October 2021 at 06:27:57 UTC+1 [email protected] wrote: > What does the log file report? > > And what do you mean by "it works" but on restart it crashes? > > On Sat, Oct 16, 2021, 21:21 Stephen Paul Weber <[email protected]> wrote: > >> If I define a custom layout in config.py like so: >> >> class MyLayout(layout.Columns): >> def add_column(self, prepend=False): >> layout.Columns.add_column(self, prepend) >> >> then it works, but when I restart qtile it always crashes. Where should I >> prefer to put this so it will work better? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "qtile-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/qtile-dev/a9881a74-af90-4e36-bc06-ff039d0a282dn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/qtile-dev/a9881a74-af90-4e36-bc06-ff039d0a282dn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/095a01dd-3efe-4e08-ad14-5b7886578b3cn%40googlegroups.com.
