I use LaTeX a lot but I find quite obnoxious all the crappy files it leaves behind when you compile: .aux, .log...
Fortunately TeXMaker has the option "clean" that deletes all of these.
However, I don't like having to remember to click on it every time I'm going to close a document, ie I'd like a button that both closes a document and cleans all that stuff.
Any hint as how to do it? I suppose if I knew how to access the program code I'd be able to do it as I'd just have to put together two options that already exist.