-
Committer:
Alexander Sack
-
Date:
2010-12-09 00:18:34 UTC
-
Revision ID:
asac@linaro.org-20101209001834-qqulogg0ok3vlyww
add support for StartupWMClass to match window_class for more cases
* extend .index file format to allow the final column to optionally have a BAMF_WM_CLASS::StartupWMClass field
* prefer StartupWMClass as desktop_id if available and only fall back to .desktop filename as heuristic
-> example of affected apps are firefox dailes that have special WM_CLASS/codename aka Minefield instead of Firefox-4.0 etc.
Note: new perl magic to generate bamf.index is:
perl -ne '/^(.*?)=(.*)/; $$d{$ARGV}{$1} = $2; END { for $f (keys %$d) { printf "%s\t%s%s\n", $f =~ m{.*/([^/]+)$}, $$d{$f}{'Exec'},$$d{$f}{'StartupWMClass'} ? "\tBAMF_WM_CLASS::$$d{$f}{'StartupWMClass'}" : "" } }' /usr/share/applications/*.desktop > /path/to/bamf.index