--caption parameter used in KDE in Kubuntu 11.04

0

I right now installed Konquest in Kubuntu 11.04 and I noticed the item konquest --caption "%c" in Application Launcher.

  1. Why is the caption overridden using --caption instead of taking the default one? Are there any useful reasons?
  2. I tried but failed to find out if there are any more placeholders like %c for the caption and if yes, which. So far, it seems to be a feature of all KDE applications, as it is listed in --help-kde for each program.

Shi

Posted 2011-08-09T14:21:12.647

Reputation: 659

Answers

1

According to my research, it seems like --caption "%c" means "use the caption from the shortcut (.desktop etc.) as the application's window title."

One reason to use this may be to change the title according to locale, and the other one is to let user change it.


I added the list of those placeholders.
Click the question icon in Properties for one of .desktop Launchers, and then the Command field to get it.

  • %f - a single file name
  • %F - a list of files; use for applications that can open several local files at once
  • %u - a single URL
  • %U - a list of URLs
  • %d - the directory of the file to open
  • %D - a list of directories
  • %i - the icon
  • %m - the mini-icon
  • %c - the caption

Oleh Prypin

Posted 2011-08-09T14:21:12.647

Reputation: 825

The standard currently is there: https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables (Note: Links may evaporate in 1 nanosecond)

– Tino – 2017-08-11T10:11:52.543

Where did you get the information regarding %c from? Are there more placeholders like that? – Shi – 2011-08-10T15:30:41.897

@Shi: I noticed that when changing shortcuts' titles. And yes, there seem to be more of them. Default Dolphin launch command is dolphin %i -caption "%c" %u – Oleh Prypin – 2011-08-10T17:39:02.260

I was more hoping of a nice list available somewhere in the KDE documentation, or maybe the source code file of the application which actually "fills" the placeholders with values. – Shi – 2011-08-10T20:12:37.950

@Shi: Added the list. Now I'm hoping for some rep ;) – Oleh Prypin – 2011-08-10T21:52:24.067

And where did you get the list from? In Wikipedia terms: http://en.wikipedia.org/wiki/Wikipedia:Citation_needed%E2%80%A6 :)

– Shi – 2011-08-11T21:49:30.233

1

When trying to get Subtitle Composer not to include the file name (with path) in the app name, I found out that --caption "%k" sets the app caption to the title of its desktop entry.

So my Subtitle Composer app window now has the plain simple caption "subtitlecomposer", which already fits nicely into the XBar widget :)

Silvestr

Posted 2011-08-09T14:21:12.647

Reputation: 11