Using KDE here, but there might be a solution that works with other desktops environments too. I often am dealing with many many windows. Most windows contain many tabs (e.g. a Dolphin window with many tabs, or Firefox, Konsole, etc). The window title will change based on my current tab (which for the most part is helpful most of the time), but when working with so many windows I'd like to organize them a bit and be able to manually re-name the window, overriding the the window title that the application gives. I might name one Firefox window "Research" and other Firefox window "Documentation" to be able to easily distinguish between the windows that I've used to organize and group different tabs accordingly.
Ideally I'd be able to click on a window title bar and easily give it a custom name, but I'd settle for a solution that's slightly more cumbersome as long as it works.
I've tried wmctrl -r :SELECT: -T "Research"
but that only works temporarily (the title is reverted when the application changes it, for example when switching tabs).
Best Answer
I had this exact same problem.
So I wrote a shell script that I bound to a hotkey.
When I hit the hotkey, it gets the window id of the currently active window (the one that has focus).
Then it gives you a popup dialog where you enter the title you want that window to have.
Then every time that window changes its name, it changes it back to the title you want.
To use the script, you need:
the
fish
shell(I wrote it in fish rather than bash cuz bash gives me a headache)
kdialog
some way to bind the script to a hotkey
(I use
xbindkeys
, cuz all I had to do to get it to work was add:"[PATH TO SCRIPT]/[NAME OF SCRIPT]" Mod4 + t
(that is, window key + t)
to my
/home/o1/.xbindkeysrc
)Thanks to this dude, who gave me the info on the magic xprop stuff.
(Like, a year ago, and then I never got around to writing the script til today. xD )
P.S. If any newbie finds this answer and doesn't know how to use it, just ask me and I'll walk you through it. ^^
EDIT: I updated it so that you can use it from the command line with the switches
-t
fortitle_i_want
and-w
forwindow_id
.Here's the script:
EDIT: I actually don't use this Fish script anymore;
I rewrote it in Ruby: