Menu

#619 Squirrel should set better window title

SQuirreL
open
nobody
None
medium
2025-02-15
2025-01-29
No

I've been playing around with tiling window managers on Linux. One of the interesting things about them is that they can implement tabbed applications. This is interesting because instead of each app having different and inconsistent tab mechanisms, if the window manager handles that, then you get a consistent user experience across apps. So for example, it's possible to disable tabs in Firefox, and force it to open a new window for each "tab", and let the window manager do the tabs. Similarly, you can let the window manager handle terminal tabs. and so forth. It can group together all your terminals, all your browser tabs, in the way you configure, and you get the same hot keys, and the same window manager keys to find what you are looking for.

Which brings us to SquirrelSql. At a minimum it would be nice if whichever tab you are on in Squirrel was reflected in the window title. So I believe you can do a Frame.setTitle() whenever a tab is clicked. That way, the database alias you are connected to is in the window title, then the window manager will be able to show a sensible tab name, and other window manager operations will be able to show you a sensible name of which squirrel instance is which.

Also, I realise this is a little bit of a big ask, but it would be great if there was an option to disable the tab bar in Squirrelsql. So if you click on an alias, it would set the window title, but not show you a tab with the window title. I would see the alias title in the window's title. If I want a new tab, I have a WM function to start a new Squirrelsql. If I click on a different alias, ideally it would close the old database connection, and show me the new database connection. So only one connection per squirrel instance, no tabs.

I guess you could even go the whole hog, and have an option to open new window frames for every alias you click, but that might be asking too much already.

But the smallest part of the request would be just having the alias in the window title.

Discussion

  • Gerd Wagner

    Gerd Wagner - 2025-02-09

    The following has been implemented and will be available in future versions and snapshots:

    Excerpt from change log:

    https://sourceforge.net/p/squirrel-sql/feature-requests/619/
    SQuirreL's main frame title is configurable,
    see menu File --> Global Preferences --> tab General on the lower right.

    Another option that may be of use is moving Session tabs to their own window using the button on the left of a Session's tab.

     
    • Chris Bitmead

      Chris Bitmead - 2025-02-11

      @gerdwagner Wow, you're a star again as always, patiently reading and coding what we put here.

      Now that I know that the results tab can be popped out to a new window, I'm wanting to ask again what I did before... make a settings option to always pop it out...

      Bug report: If you pop out the results, and then close the tab with the " x ", you are left in a weird state, just a grey box and a "Session" menu. I tried "Reconnect" in the session menu, but that doesn't do anything after you enter the weird state.

      Which brings me back to suggesting the tab bar doesn't make sense popped out, especially if the database is shown in the title.

      That would be 90% there. The last bit would be that the window manager tab mechanism has it's own " + " button, which one wants to program to an action that makes a new window. So you know when you launch firefox.exe it doesn't really create a new firefox, it just tells an existing firefox to open a new window (I believe).

      That can be quite fiddly to program, but I think http://www.jgroups.org/tutorial4/ JGroups is something that can do that easily in Java by communicating with any existing instance. So if there was a squirrel command line option that opens a new window in an existing running squirrel (if one exists), that would be great.

      The trouble is I guess, when you pop out a window, it lacks the Alias side tab, so you can't do the connection after popping out a window. If you added the Alias side tab to the popped out windows, that would also solve the above bug report of having an empty grey box you can't recover from, as well what I want, which is opening a window externally that you can then connect from.

       
  • Gerd Wagner

    Gerd Wagner - 2025-02-15

    Concerning

    Bug report: If you pop out the results, and then close the tab with the " x ", you are left in a weird state, just a grey box and a "Session" menu. I tried "Reconnect" in the session menu, but that doesn't do anything after you enter the weird state.

    This behavior is intended. It allows to drag tabs from other windows into the empty window.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.