Merge lp:~asac/bamf/match-apps-by-startup-wm-class into lp:bamf/0.4
Status: | Rejected |
---|---|
Rejected by: | Andrea Cimitan |
Proposed branch: | lp:~asac/bamf/match-apps-by-startup-wm-class |
Merge into: | lp:bamf/0.4 |
Diff against target: |
99 lines (+42/-16) 1 file modified
src/bamf-matcher.c (+42/-16) |
To merge this branch: | bzr merge lp:~asac/bamf/match-apps-by-startup-wm-class |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity Team | Pending | ||
Review via email: mp+44410@code.launchpad.net |
Description of the change
Unmerged revisions
- 368. By Alexander Sack
-
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}{'StartupWMCl ass'} ? "\tBAMF_ WM_CLASS: :$$d{$f} {'StartupWMClas s'}" : "" } }' /usr/share/ applications/ *.desktop > /path/to/bamf.index
as you might see i extended the dumb .index format by adding an optional column for the WM class ... using a token "BAMF_WM_ CLASS:: ${wmclass} " to make it easier to recognize it.
Also I moved to GKeyFile API for parsing the .desktop file because the GAppInfo thing doesn't export StartupWMClass= info.