Ticket #164 (closed enhancement: fixed)

Opened 4 years ago

Last modified 11 months ago

Better tab titling

Reported by: qense Owned by: somebody
Priority: major Milestone:
Component: guake Version:
Keywords: tabs Cc: ulidtko@…

Description

As reported by Sridhar Dhanapalan on Launchpad: "When a new tab is opened in Guake, it is given the title "Terminal x", where x is a number that ascends with each new tab.

I open and close terminal tabs all the time, but I only keep a few open at once. Since the number only ascends, the numbers on the tabs can get quite high.

My proposal is when a new tab is opened, Guake uses the lowest number that isn't used (which would be a tab that has been closed).

For example:

1. I open 5 tabs in succession - they are automatically named "Terminal 1", "Terminal 2", "Terminal 3", "Terminal 4", "Terminal 5" 2. I close Terminal 2 3. I then open a new tab

Expected behaviour: The new tab is named "Terminal 2" since that number is free.

Actual behaviour: The new tab is named "Terminal 6"."

The original report can be found at  https://bugs.launchpad.net/ubuntu/+source/guake/+bug/400079

Attachments

vte-titles.patch Download (2.6 KB) - added by ulidtko 3 years ago.
Patch which implements tab naming based on terminal title
window-title.patch Download (2.2 KB) - added by br0ziliy 21 months ago.
Sets GtkWindow? title according to current tab name. SHould be applied AFTER vte-titles.patch

Change History

Changed 4 years ago by pingou

I actually think we should get rid of the number and just show the shell prompt as do gnome-terminal.

Changed 3 years ago by phragment

Personally I would be confused by the proposed numbering scheme. +1 for shell prompt

Changed 3 years ago by lincoln

hehe, this number scheme is really a bad idea, I'll work to get the shell prompt stuff working :D

Changed 3 years ago by estragib

  • type changed from defect to enhancement
  • summary changed from Tab numbering in Guake keeps ascending to Better tab titling

If you do, please note that gnome-terminal shows the dynamic "window" title (see  http://tldp.org/HOWTO/Xterm-Title-3.html#ss3.1), not the shell prompt.

Since this works as it is (and not everyone uses tabs), I'll change this to enhancement and hope I don't step on anyone's toes.

Changed 3 years ago by estragib

  • priority changed from trivial to major

Tickets #100 and #195 are duplicates of this one.

Changed 3 years ago by ulidtko

  • cc ulidtko@… added

Hey, this is pretty good idea! I would really like very much such a feature; and so i implemented it myself :) Attaching the patch, works great so far.

Techically, this is as simple as adding a signal handler in a few lines. I've also added gconf boolean key which optionally disables the feature, but i have no idea about where in UI it can be represented. So UI still needs to be complemented with a checkbox.

Changed 3 years ago by ulidtko

Patch which implements tab naming based on terminal title

Changed 3 years ago by faffi

Applied the patch and very glad to say it works just as expected. You have to reload the gconf schema for guake after applying the patch, this can be done by either restarting GDM or the way I did it was to re-install the schema file.

gconftool-2 --install-schema-file=/usr/share/gconf/schemas/guake.schemas

Changed 3 years ago by pingou

  • priority changed from major to Fix available

Changed 3 years ago by lincoln

  • status changed from new to closed
  • resolution set to fixed

Very well done ulidtko!

Thank you for your nice patch. I've just found something that made me think. After applying and testing it, I saw that every time the window title is changed, the tab label is changes. Even if user rename the tab.

I don't think it's a great deal to fix this nor to just let thing like this. It's just to document this behavior here. Anyone complains with it?

I'll push the change to our repo and close this bug. If someone complains, please reopen this bug or open another one :)

Cheers,

Changed 21 months ago by br0ziliy

  • status changed from closed to reopened
  • version set to 0.4.2
  • resolution fixed deleted

Hi,

reopening this ticket and submitting another "naming" patch - this time it changes GtkWindow? title to the terminal name. It's useful feature for those, who use automatic time-tracking utilities like  arbtt. The patch is not ideal, but it works :)

Changed 21 months ago by br0ziliy

Sets GtkWindow? title according to current tab name. SHould be applied AFTER vte-titles.patch

Changed 12 months ago by gualo

  • priority changed from Fix available to major
  • version 0.4.2 deleted

This was a great improvement, but it would be better if a scrollable tab bar is implemented (http://guake.org/ticket/65) when a process sets a very long tab title, and also if some sort of flag can be set to disable the auto re-naming of a given tab, or a logic that if I manually change the tab title, then auto-renaming is disabled by default on that tab.

Thanks!

Changed 11 months ago by lincoln

  • status changed from reopened to closed
  • resolution set to fixed

So, the main problem raised by this ticket was already fixed. All the other things, like scrolling the tab bar are being addressed by other tickets. So, I'm closing this ticket. Thank you guys :D

Note: See TracTickets for help on using tickets.