flyingpie / windows-terminal-quake

Enable Quake-style dropdown for (almost) any application.
https://wtq.flyingpie.nl
MIT License
598 stars 39 forks source link

Allow preserving window size & centering #5

Closed jamietre closed 5 years ago

jamietre commented 5 years ago

Hey! Thanks for this. I love the quake too, but I like my terminals to persist their size (rather than consuming the whole screen) and be centered, so I did a little work to support that in your application.

Since this is a bit more complicated I did some refactoring to make it easier to deal with. Also, I know next to nothing about using the window API (basically followed your examples), so consider this pull request "hmm, here's a thought, take it or leave it, this code is probably garbage." But it seems to work and I thought others might like this addition.

If you like the idea/refactor and want to merge it -- or suggest changes -- awesome. If not totally fine too. I hope this whole necessity is fairly short lived and the feature becomes mainlined :)

The things that are different are:

Thanks again. Neat app, I can finally be happy without ConEmu.

flyingpie commented 5 years ago

@jamietre Hey! Thank you for your kind words, nice to know the tool is being useful :)

Your change sounds like an awesome addition, I mainly have one question, could this be made "by convention". You mention it's currently a cli argument, but would it still work if the app simply remembers clicking "maximize" and "restore down"?

That way, we wouldn't need semi-obscure arguments and such. Alternatively, maybe we could expand the tray icon with an option to do this.

What are you thoughts on this?

jamietre commented 5 years ago

@flyingpie that seems like a great idea. I think it does that already; maybe the CLI argument isn't necessary. My thinking was that users who want it maximized might like to persist that between sessions (e.g. in their shortcut or however they launch this) and I didn't want to create any persistent configuration. Partially because I was trying to keep it simple and partially because I don't know what the right way to do that would be since my windows app skills are nearly nonexistent.

So I will totally defer to you on what you think the best approach here is and am happy to make changes.

jamietre commented 5 years ago

Hey, I'm going to remove this for now, I keep making little changes so I think it's largely becoming a thing that just suits my needs. But feel free to ping me if you want to discuss collaborating, though i suspect we won't need it before long!

flyingpie commented 5 years ago

Hey @jamietre I've looked a couple times at your code, and like you mentioned, it's gotten to be quite a lot :) That said, I think it does a bunch of useful stuff, so I will try to bring over those to this repo. I'll make sure to credit you :)