Giving Konsole some love

I started to hack in Konsole, and first I was afraid, I was petrified. You know, touching those hardcore apps that are the center of the KDE Software Collection.

I started touching it mostly because some easy to fix bugs weren’t fixed, and as every cool user knows, this is free software. So I could pay for someone to fix my bugs,  or I could download the source code and try to figure out what the hell was wrong with it. I choosed the second approach.

If you have something for me to improve in konsole please poke-me, as I have landed around 25 commits this past week and I plan to continue that.

I would also like to thank my employer for letting me stay late hacking in KDE related software.

32 Responses to “Giving Konsole some love

  • Hello! Konsole is gorgeous – i use it every day already longer than 5 years! Just wanted to ask – is there any class in the project that just implements rendering? In my project I have a socket, which just sends me stdout of another my programm. I display that with disabled QLabel or something. But I want colors, just like in terminal!

    • tcanabrava
      5 months ago

      What you need is Konsole::Part, a library to be used with the KParts framework for embedding the Konsole in other software.

  • Emil Sedgh
    5 months ago

    I had an idea that I think would be super useful.

    Konsole has this feature that detects url’s and allows you to open them using console.

    I was thinking, this should be extended to allow anything to be keyboard-activated like that.

    Probably using a list of regexes (extensible by user).

    So, for example, I personally use a lot of uuid’s. And I have to copy them manually using mouse.

    If I could tell Konsole, _hey, could you keyboar activate this regex as well?:

    /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89AB][0-9a-f]{3}-[0-9a-f]{12}$/i

    And then from then on, Konsole would allow me to copy these using keyboard, that’d be an amazing feature.

  • Emil Sedgh
    5 months ago

    Btw, thank you for working on Konsole. It’s an amazing app. It’s among best KDE apps next to Okular, Kate and Dolphin.

  • Fabien Crespel
    5 months ago

    How about adding a bookmarks sidebar to Konsole? coming from Windows, I’m really missing a good alternative for mRemoteNG on Linux 🙂

    Visually I’d imagine something similar to Kate’s Documents sidebar, with a tree view of bookmark folders and entries, and the ability to double-click them to open them in a new tab. Also, a context menu to edit/rename/delete/etc. and to open a whole folder in tabs.

    I don’t know anything about how Konsole is developed, but from a user’s point of view it looks like everything is already there for bookmarks, just not presented in an efficient way.

    • tcanabrava
      5 months ago

      sorry, I don’t think I understand what you are saying, can you provide me some screenshoots?

      • Fabien Crespel
        5 months ago

        Here is a simple screenshot from mRemoteNG: http://prntscr.com/jwcgmm
        I’m referring to the “Connections” sidebar/panel on the left here, which displays all bookmarks in a tree view and lets you quickly search & connect to any of them.
        Do you think something similar could be achieved on Konsole? on a daily basis this would be very useful when you have dozens or hundreds of servers to choose from.

        • tcanabrava
          5 months ago

          Hm… This seems ~easy~ to do. I’m unsure that it’s a good thing but I’ll give it a try.

        • I’m not quite sure, but maybe what you really want is Konsole/Dolphin integration. Just open up Dolphin and hit …

          • David
            5 months ago

            …and hit F4…
            The F4 was originally spelled as a XHTML tag, so it got stripped by the injection protection, sorry 🙂

          • Fabien Crespel
            5 months ago

            Thanks for the suggestion; I’m already using F4 in Dolphin when I need a quick console that I’ll close soon after. But what I’m missing in Konsole really is the ability to quickly open several terminal tabs with predefined *local* locations (e.g. multiple projects living in different folders) as well as *remote* servers via SSH. Bookmarks already allow me to do both (for SSH, you just need to set “ssh://user@host” in the location field), I just need a better UI to find and select a location/server among these bookmarks.

  • I remember seeing some work at some time in the past to implement dynamic text reflow on resize (like GNOME terminal). Is there any interest in resurrecting that?

    • tcanabrava
      5 months ago

      this is already working for *some* types of text. and I can confirm that the gnome terminal doesn’t work as nice as they preach. (I just recorded a video if you are interested). but yes, we would love to have dynamic text reflow. would you be interested in trying to program that?

  • Ooh, any hope for fixing the weird horizontal line artifacting when using it on a high-dpi oddly-scaled screen? (I tend to have mine set to something between 1.2 to 1.4 or thereabouts, and the random horizontal lines that appear are visually unfortunate—although that may well be a problem on some lower level of the stack than Konsole/Konsole::Part itself.)

  • Nina Ramstad
    5 months ago

    This is cool, thank you! Do your employer happen to use KDE in its business as well?

    • tcanabrava
      5 months ago

      No, it doesn’t use KDE at all (and still, they sponsored akademy last year, and probably next year too), that makes it even more amazing.

  • Michael Abrahams
    5 months ago

    I’d love to have a “clear scrollback” option that really clears everything before the current line. Currently it leaves a page of text behind.

    • tcanabrava
      5 months ago

      We have two options for clear scrollback, the normal and the ‘clear and reset’ – Does Ctrl + Shift + K works for you?

  • That’s really great tcanabrava.

    I do have a feature request/bug to bring to your attention. Konsole used to and now looks like the following two screenshots. Please look at the tab bar.

    Old – https://www.kde.org/announcements/4.10/screenshots/jpg/konsole-top.jpg
    New – https://imgur.com/a/qOxYldY

    * If you opened one tab then it would occupy half the space and leave you half to click up on an open more tabs. If you open two tabs then the space will be divided into three parts two of which will be occupied with tabs and one will be left empty for you to open more tabs. The Konsole tabbar will be divided into total number of tabs open plus one empty one. This made the tab bar look really classy and beautiful.
    * Tab bar’s bottom corners were smooth

    This was a regression but it completely changed the UI. You can see the bug https://bugs.kde.org/show_bug.cgi?id=380879

    • tcanabrava
      5 months ago

      I’m unsure if this is a regression, we also need to maintain visual pairing with other applications and in no other application the size of tabs equals the number of tabs / screen size.
      Also your ‘new’ is wrong – we don’t display a tab at all for only one tab anymore (there’s an option for that).
      The smooth corners is the theme that you are using, change to oxygen and you will have it.

      all that said I’m indeed working on the tabs, not for the thing you are asking me tougth.

  • Emil Sedgh
    5 months ago

    I just added a bug report with an idea I had. I think that’d make Konsole super keyboard friendly.

    https://bugs.kde.org/show_bug.cgi?id=45529

  • Blablabla
    5 months ago

    Hey,

    Glad to hear you’re working on Konsole. Along with the web browser (now Falkon), Konsole is the application I use the most (for my duty as web designer/developer). The new background blur with 5.13 is pretty cool. Thank you so much for that.

    Maybe at some point you’d want to take a look at the “split view” feature requests. I’ve been using tmux anyway, but having such a feature within Konsole would be rad.

    Also, do you know what could I do to implement Konsole Kpart within a plasmoid (a.k.a. “plasma widget”) with QtQuick/QML? I was trying to do that but I couldn’t find any clue. I asked about it on KDE forums but I got no answer (https://forum.kde.org/viewtopic.php?f=305&t=152700). A very little helping hand would be very appreciated 🙂

    • tcanabrava
      5 months ago

      The reason I started working with konsole is to fix the split view, so don’t worry, it’s a really high priority in my todo list.
      About the konsole part in Qml, I know that a few kde hackers are tying that too so what I can say is that *currently* you can’t easily do that, but people from plasma is hacking around it.

  • konsole is good piece of software. Some time ago I found some issue related with restoring session. I mean when is turned on menu as a button in title bar then it is not restored at all, after next running of Plasma session. After closing and run, menu appears, but after restoring session always I see normal menu as a bar. Restoring this kind of menu is another bug as I reported several months ago.
    https://bugs.kde.org/show_bug.cgi?id=384392

    • tcanabrava
      5 months ago

      I read the bug report but I couldn’t really understand what’s about. It’s about the applications menu being *inside* of the application when you wanted it to be in the titlebar?

      • Best before please turn on “Application menu”., so special button (hamburger shape) placed in title bar. This kind of menu is only available for Breeze and Plastik style. I use Breeze. After just run any Qt/KDE application.

        This is not that I want, only this menu should be placed on title bar after session of Plasma is restored like in other applications (unfortunately not every time and because my bug report), for example KWrite, Okular, and others. This never happened (in my tests and usual work with Plasma) that in konsole this menu has been correctly restored when plasma session is restored , but it sometimes happens for KWrite, Okular, Dolphin and other Qt/KDE applications.

  • I really believe konsole should redraw on resize as most other terminals I used.

    Konsole currently behave like this:
    https://cloud.githubusercontent.com/assets/1891109/17207150/6e2a8ba0-54b3-11e6-8e9d-6cd60555cc46.gif

    Where I normally expect it to behave like this:
    https://cloud.githubusercontent.com/assets/1891109/17207137/6327abc0-54b3-11e6-9e5a-d88946e18f10.gif

    Not sure if there is something wrong on my end, if anybody can confirm this it would be great. If this is a bug, it really ought to be fixed

Leave a Reply

Your email address will not be published. Required fields are marked *