Score:1

How to show title of gitk instance in application switcher?

us flag
JJD

I usually have multiple instances of Gitk open while working on projects. When I switch between Gitk windows I cannot see which Gitk instance belongs to which project, though.

GitK in application switcher

The project title is written in the header of the window once have it in foreground.

Is it possible to show the window title in the application switcher?

vanadium avatar
cn flag
How do you manage to have these instances have separate icons on the launcher? Typically, different instances would appear under the same icon, and then you could cycle between the windows with Alt+Key_above_tab, which shows a thumbnail and the window title.
Score:2
pl flag

Check if using <Super>+<Tab> instead of <Alt>+<Tab> is useful for you.

If so, that can be configured in Settings -> Keyboard Shortcuts (Switch windows vs. Switch applications).

enter image description here

Besides, a couple of possibly useful links, which may even be interesting as replacement features from what you have in mind:

  1. https://extensions.gnome.org/extension/302/windowoverlay-icons/
  2. https://github.com/daniellandau/switcher
Robert Riedl avatar
us flag
it's *Settings->Devices->Keyboard* but otherwise this should work for OP
sancho.s ReinstateMonicaCellio avatar
pl flag
@RobertRiedl - That's how I see it, see EDITed answer.
Robert Riedl avatar
us flag
huh, seems to depend on the Ubuntu version ? anyway, your screenshot made it quite clear
us flag
JJD
"Switch windows" actually shows the project name. Thanks. The only drawback is that it only shows the gitk windows of the **current** virtual desktop while "Switch applications" shows all gitk windows of **all** desktops. Do you know how to change this?
sancho.s ReinstateMonicaCellio avatar
pl flag
@JJD - No, I don't know. I guess that would be actually defeating the (main) purpose of having virtual desktops.
Score:1
mm flag

Since gitk is a friendly wish (Tcl/Tk) program, we can utilize wish's options to do what you want manually. There might be a way to edit /usr/bin/gitk to do exactly what you want, but I have found an alternative.

Method:

cd ./dir-with-git-repo/
wish /usr/bin/gitk -name "Manual Name"

Result:

Application Switcher now shows gitk icon instance with "Manual Name" as application name.

Alt Method:

Edit /usr/bin/gitk line 3:

exec wish "$0" -- "$@"

to

exec wish "$0" -name "$@" -- "$@"

Alt Result:

"$ gitk" shows -- for gitk application name "$ gitk branchname" shows branchname for gitk application name in switcher.

us flag
JJD
`gitk <branchname>` works. Thanks. But I mostly start `gitk --all > /dev/null 2>&1 &`. It would be useful if in this case the name of the repository is shown.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.