Unwanted space at the bottom in Konsole's window

When i run btop in Konsole, this is how it look like:

How to get rid of this extra space at the bottom that is marked by the red rectangle ?

I tried several things but couldn’t remove it. This is also the case when running the normal Konsole without btop. The prompt stops just before that extra rectangle, meaning that the prompt does not stick at the very bottom of the Konsole’s window.

This is the normal Konsole showing the extra space at the bottom that needs to be removed:

It’s in the settings of that particular profile. If you go to settings>scrolling, untick ‘Highlight the lines coming into view’. If you want more, as in a horizontal like layout, you’ll need to disable scrollbar of course.
Before:

After:

Btop:

1 Like

I am not talking about the vertical scrolling bar, the issue here is an extra space at the bottom of the screen, not a scrolling bar at all, just some extra horizontal space at the bottom.

Also i tried what you said and restarted Konsole, also tried hiding the scrollbar, but the horizontal space is still there.

Yeah well…dunno what to tell you. Maybe try another theme. Set scrollback to none. Can’t reproduce it really.

Could you try to set the margin to 0 in your current profile? Current profile>looks>miscellanious>margin

Yea i did it, i tried nearly everything and it didn’t work. Setting the margin to 0 just gives a small space 1px at the left. I think the developer of Konsole will definitely know what is this part and how to remove it. Thanks a lot for help.

I don’t get it. I exaggerated the margins in the two screenshots. First to 15, second to 0.


1 Like

@dzon would you mind, to tell us about your desktop and how to create this one?

In this topic? In short, lightly app style, klassy decorations( no titlebar), custom plasma,icons: either breeze/RC chameleon or custom colored with script, conky, custom color-scheme, custom konsole stuff… Sounds custom allover but actually it’s quite standard. Other than that, some apps run in gtk override ( myeah, custom gtk theme) and kvantum override ( o dear…custom kvantum theme) and some ( like gwenview) require a custom color scheme in their config. Screenshots above are just standard konsole, itsy bitsy darker breeze theme and btop. A load of scripts and enhanced desktop functionality…but that’s it.

But, regarding the topic, if all fails what I mentioned before, could you unlock your konsole panels and check if the session bar isn’t “stuck” at the bottom?

What do you mean by “unlock your konsole panels” ?
What is the session bar ?
How to check if it isn’t “stuck” at the bottom ?

If you don’t see any toolbars (I think its the default configuration), you acn show them by right clicking on the empty area besides the menu, and select one of the toolbars:

Then you can right click an empty area in a toolbar to be able to unlock the toolbars:

image

You need to unlock toolbars to move them around. On my configuration the session toolbar is at the top.

1 Like

Yep. As Guss pointed out, unlock those bars on a right click. At that point you can start dragging stuff around.

After taking the screenshots I played with the toolbars to see if I can repro the issue according to what @dzon said, and now I think I figured it out - and its not about the toolbars or any configuration option.

Its about the text size.

Konsole is a graphical application that draws its UI in pixels, but its content are rows of fixed size monotype text, that always need to fit an exact number of text rows and columns in the display - there’s no scrolling half rows from the top of the screen (definitely not when you’re showing a curses TUI).

When the Konsole’s window’s pixel size fits a multiple of the character size pretty well, you get a nice neat display:

But when the window size doesn’t match up with non-fractional integer number of rows - something has to give: Konsole needs to pad the internal text grid display somehow, so you get this annoying space at the bottom:

If the size of Konsole when you maximize it doesn’t match the text grid size well, I don’t think there’s anything you can do :person_shrugging: You can try to play with the font size - but it will never fit perfectly.

If you take a look at the initial screenshot, it’s clearly not the konsole window itself, but a window gui. As in a toolbar for example.

Can you show the output of:

printf 'Size in pixels of char grid: \e[14t'; sleep 1; 
printf '\nSize of each cell: \e[16t'; sleep 1; 
printf '\nLines and columns: \e[18t'; sleep 1; 
printf '\nTotal size of terminal widget in pixels: '; 
qdbus --literal $KONSOLE_DBUS_SERVICE /konsole/MainWindow_1 org.qtproject.Qt.QWidget.size

You’ll get something like the following:

Size in pixels of char grid: ^[[4;476;880t
Size of each cell: ^[[6;17;8t
Lines and columns: ^[[8;28;110t
Total size of terminal widget in pixels: [Variant: [Argument: (ii) 904, 478]]

If you subtract the height in the first line (2nd number) from the height in the last line (last number) minus whatever margin is configured in profile settings, the remainder is the dead space at the bottom.

I have the session toolbar hidden, i removed it to have more space:

But still, that little horizontal space at the bottom exists. You can clearly see it after the last prompt.

It’s just the reminder of space in the window, where you can’t fit another line of text. What do you expect that should happen with that?

Actually i think you are right, i have tried resizing the Konsole window vertically when running btop inside, the extra space at the bottom decreases at certain heights and increases at others. I think it’s a text height problem like you said.

It’s not logical for the characters of the text line to stretch vertically to fit the screen, so an extra space is not used cuz no line will fit there.