Can I change the name of the guake tab to show the current command?

Solution 1:

This is a guake (0.4.1) bug. I just see and solve this problem via this bug report though the author say this is not the best method: https://github.com/Guake/guake/issues/205

i've found out that moving the dialog destruction code (guake.py line 983) down after the code that sets the tab label (line 986) actually solves the problem. so the the code that works for me look like this:

    response = dialog.run()
    # dialog.destroy() 

    if response == gtk.RESPONSE_ACCEPT:
        self.selected_tab.set_label(entry.get_text())

    dialog.destroy()

maybe there is some problem with gtk and dialogs, but i haven't found any code changes connected with gtk in the version 0.4.1 diff.

EDIT: guake 0.4.2 can change the tab name correctly

Solution 2:

I am not sure this works for guake, it works for most terminal emulators. You can include an echo on your scripts to change the terminal title:

echo -ne "\033]0;your_title_here\007"

Solution 3:

Bit of a hack, but this will rename the current terminal to whatever you ssh'ed for.

function ssh() {
    guake -r "$@";
    /usr/bin/ssh $@
}

Also if you update your PROMPT_COMMAND, you can have a function to update the terminal name each time. Although this will not work for your ssh problem as it only changes the name after the command has run.

e.g.

export PROMPT_COMMAND=renameTerminal

function renameTerminal() {
    guake -r "$SOMENAME";
}

Solution 4:

When I want to change the tab name in guake, I just right-click the tab name and left-click rename. A pop-up box opens to type the new name into.