Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I recently installed an update to Guake that sets the tab names to <user>@<computer-name>/path/to/current/directory/.

This is rather annyoing when a single tab takes up all the space because of extreme nesting, for example in a Java project (parent-module/sub-module/src/main/java/no/whirlwin/sample_app/domain/wares/interfaces).

Earlier the names were something like tab:0, tab:1 or so, which was perfect.

Now I have to manually rename each and every new tab I open, which is a pain in the a...wk.

Other than downgrading to an earlier version, is it possible to change the default tab names?

share|improve this question
add comment

5 Answers

up vote 4 down vote accepted

Looks like you need to turn use_vte_titles off (set to false) in the gconf schema for guake. Otherwise you can hack custom strings or behaviour in by changing the on_terminal_title_changed function or code higher up the call stack, since it is not called consistently. It can be found in the main guake file.

share|improve this answer
add comment

It's not a problem of Guake, it is how your terminal title is setup. The new version of Guake respects terminal title from the shell. I bet that you are also getting same long title in Gnome Terminal. Check how to configure terminal title from your shell: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

share|improve this answer
    
You are correct. I haven't used a regular terminal emulator in years. –  whirlwin Aug 17 '12 at 7:02
add comment

Or edit like this:

$ vim `which guake`

find the 1000 line and change this:

    self.tabs.get_children()[page].set_label(vte.get_window_title())

on this:

    if self.tabs.get_children()[page].get_label().find('!') != 0:
        self.tabs.get_children()[page].set_label(vte.get_window_title())
    else:
        return

And now you can rename your tabs permanently by adding '!' before name, like:

!PROD
!backend
!PENTAGON ROOTED
share|improve this answer
    
doesn't work for me : could you explain how is self.tabs.get_children()[page].get_label() saved between tab closures, or anything ? –  Nikana Reklawyks Oct 4 '13 at 21:31
add comment

Following up on Alexandar's reply: The following two questions show how to configure a "very short" prompt shortener, which will be also respected by Guake:

http://stackoverflow.com/q/3497885/946850

Abbreviated current directory in shell prompt?

I use a "not so short" shortener for myself, my .bashrc contains the following:

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='PS1X=$(pwd | sed -r "s-^$HOME/--;s-^$HOME-~-;s-^(.[^/]*)/.*/-\1/.../-")'
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}"'$PS1X'"\a\]$PS1"
    ;;
*)
    ;;
esac

Only the first and the last path component is shown, like the following:

$HOME -> ~

$HOME/some/deep/sub/dir -> some/.../dir

/usr/local/deeply/inside/there -> /usr/.../there

share|improve this answer
add comment

In retrospect, I found that the easiest way is by running:

gconftool-2 --set /apps/guake/general/use_vte_titles --type boolean false

from the command line.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.