2

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?

4

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.

  • The link to gconf schema is broken. – whirlwin Oct 7 '16 at 14:09
4

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

  • 1
    You are correct. I haven't used a regular terminal emulator in years. – whirlwin Aug 17 '12 at 7:02
1

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:

https://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

2

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.

4

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
  • 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
  • I'm sorry, I think, it is too old source for current version of guake – Max Vyaznikov Jul 10 '15 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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