Ticket #164 (reopened enhancement)

Opened 2 years ago

Last modified 5 months ago

Better tab titling

Reported by: qense Owned by: somebody
Priority: Fix available Milestone:
Component: guake Version: 0.4.2
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 18 months ago.
Patch which implements tab naming based on terminal title
window-title.patch Download (2.2 KB) - added by br0ziliy 5 months ago.
Sets GtkWindow? title according to current tab name. SHould be applied AFTER vte-titles.patch

Change History

Changed 2 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 22 months ago by phragment

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

Changed 20 months ago by lincoln

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

Changed 18 months 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 18 months ago by estragib

  • priority changed from trivial to major

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

Changed 18 months 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 18 months ago by ulidtko

Patch which implements tab naming based on terminal title

Changed 17 months 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 17 months ago by pingou

  • priority changed from major to Fix available

Changed 14 months 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 5 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 5 months ago by br0ziliy

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

Note: See TracTickets for help on using tickets.