Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about a couple of features #459

Open
marcusbritanicus opened this issue Dec 20, 2021 · 1 comment
Open

Questions about a couple of features #459

marcusbritanicus opened this issue Dec 20, 2021 · 1 comment

Comments

@marcusbritanicus
Copy link
Contributor

First of all, thank you for building this project. It's great to have a pure qt term widget. I have used qtermwidget in a few projects (DesQ Term, NewBreeze, coreterminal) and the experience has been enriching.

I have a couple of questions regarding a few features.

  • Check if a process in running: I have noticed that qterminal does not inform the user that command is running in it (apart from the shell) while losing it. That is to say, if we start qterminal (and my shell program is bash), and then type python in the bash prompt, there is no way (that I know of) to query is something is running when closing qterminal. I remember that some gtk-based terminal manage to do this (if it's important, I can earch and leave a link here).

Question 1a: Is there some way (currently) we can know if a command/program in running in qtermwidget?
Question 1b: If not, what would it take to implement this feature? If it's possible, and someone gives me a rough sketch of how this can be accomplished, I'm willing to do the necessary changes and open a PR.

  • Grid size of the termwidget: When we resize qtermwidget, it promtply displays the grid size (rows x columns).

Question 2a: I have not noticed any API to formally query the grid-size. Is there an API to do so?
Question 2b: Is it possible to add this to the qterminal API? (I'm willing to open a PR if someone guides me)
Question 2c: In some gtk-based terminals, it's possible to set the starting size of the terminal in terms of the grid size. in other words, is it possible to map the grid-size to pixel size of the widget? This would be a great feature to have: coreterminal issue 20

@outpaddling
Copy link

outpaddling commented Dec 20, 2021

If you look at coreterminal issue 20, you'll see a patch I created for coreterminal to precisely set the initial windows size based on grid size of 80x30. Unfortunately, this was my debut as a QT developer and it will be a while before I have time to build on those skills. Hopefully someday...

It would be great to push this funcitonality down to a library and also use it to snap to grid size during resizes, as GTK terminals do. This has always been a minor annoyance of mine with QT-based terminals including konsole, qterminal, and coreterminal. It looks messy, especially with curses/twintk based TUIs. Attaching 2 screen shots to demonstrate how it looks when the window size is not an exact multiple of the font size and when it is.

bad-fit
good-fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants