Bug 308995 - Support shortened titles like in bespin in all decorations
Summary: Support shortened titles like in bespin in all decorations
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: kdecorations (show other bugs)
Version: git master
Platform: unspecified Other
: NOR wishlist
Target Milestone: 4.10
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 17:50 UTC by Thomas Lübking
Modified: 2014-01-02 01:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lübking 2012-10-25 17:50:42 UTC
https://git.reviewboard.kde.org/r/106896/

Reproducible: Always
Comment 1 Thomas Lübking 2012-11-08 23:51:24 UTC
Git commit 26f069a8254f11816d6f7039d35ebcdb14527569 by Thomas Lübking.
Committed on 16/10/2012 at 22:42.
Pushed by luebking into branch 'master'.

scripted title manipulation / stripping

REVIEW: 106896

M  +7    -3    kwin/bridge.cpp
M  +72   -34   kwin/client.cpp
M  +2    -2    kwin/client.h
M  +1    -0    kwin/data/CMakeLists.txt
A  +104  -0    kwin/data/stripTitle.js
M  +16   -0    kwin/options.cpp
M  +15   -0    kwin/options.h

http://commits.kde.org/kde-workspace/26f069a8254f11816d6f7039d35ebcdb14527569
Comment 2 Christoph Feck 2014-01-02 01:00:34 UTC
Thomas, does KWin support removing the application's name from the window title for specific applications with this commit? See also bug 307355.
Comment 3 Thomas Lübking 2014-01-02 01:51:18 UTC
In principle.

    kwriteconfig --file kwinrc --group Windows --key CondensedTitle true

kicks in /usr/share/apps/kwin/stripTitle.js which will condense all titles and could be shadowed by a copy in ~/.kde/share/apps/kwin/stripTitle.js that adds some selection logics.

Konsole might (will?) require special treatment anyway since the default delimiter is afair a colon, which is also taken as delimiter in the default script, ie. "/home/me : mc" would turn into just "/home/me" and "foreign_host : me" int "foreign_host" (and alternative solution to that could be changing konsole to print "mc in /home/me" and "me@foreign_host", but that's matter of personal preferences.

Just FTR (seems emotional bug over there):
Whatever an client puts into the titlebar is the clients responsibility - KWin does not build the title (except for {enumeration} and @host strings for remote clients ;-) and can not directly control whether the title should contain the applications name or not - the script is heuristically.

PS: yakuake FTW :-P