mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Install a .desktop file and an application icon on Linux

Open MadFishTheOne opened this issue 13 years ago • 10 comments

For file associations mostly. This needs to be done upstream. See also: https://bugs.archlinux.org/task/36826

MadFishTheOne avatar Sep 14 '13 13:09 MadFishTheOne

I'm not against it.

So, does anyone have a .desktop file we could use?

ghost avatar Sep 14 '13 13:09 ghost

mpv-git package in AUR currently ships a .desktop file. It can be used as a starting point.

MadFishTheOne avatar Sep 14 '13 14:09 MadFishTheOne

See mpv-desktop-file branch. It also attempts to install the icons. (Note that we have higher quality icons somewhere, but not in git. I don't think we have a svg version of the icon.)

Please test.

ghost avatar Sep 15 '13 00:09 ghost

Oh, and this desktop file is from the arch package without modifications. Anyone knows who wrote the .desktop file so I can properly attribute it? It's probably Rudolf Polzer, but I'm not sure.

ghost avatar Sep 15 '13 00:09 ghost

Tested the branch. Seems to work, although:

  1. Why did you make it use "Terminal=true"? Especially with --really-quiet, that makes absolutely no sense (just an empty terminal window). And since the whole point of .desktop file is to make it nicer to use from GUI applications (file managers), displaying terminal window is probably not something we want to do. I suggest making it "Terminal=false", as it was in original .desktop file.
  2. GNOME applications (nautilus, gnome-shell) don't seem to display an application icon correctly. Not sure why. From my knowledge, that should've worked fine. And it actually does work in KDE's dolphin, for example (when browsing /usr/share/applications).

MadFishTheOne avatar Sep 15 '13 10:09 MadFishTheOne

I just know I am not. I did some final edits, but the original one came from one of the comments on the AUR package. I wouldn't be surprised if it originates from mplayer's or mplayer2's. Am 15.09.2013 02:39 schrieb "wm4" [email protected]:

Oh, and this desktop file is from the arch package without modifications. Anyone knows who wrote the .desktop file so I can properly attribute it? It's probably Rudolf Polzer, but I'm not sure.

— Reply to this email directly or view it on GitHubhttps://github.com/mpv-player/mpv/issues/233#issuecomment-24461951 .

divVerent avatar Sep 15 '13 10:09 divVerent

  1. Why did you make it use "Terminal=true"? Especially with --really-quiet, that makes absolutely no sense (just an empty terminal window).

Running without terminal doesn't make much sense for files with no video. mpv would run in the background, with no possibility to control it, other than killing it explicitly via command line unix tools. I didn't think about the --really-quiet bit.

Eventually, I want to add a --force-window option, which would show a window even in audio-only mode, but that's still a bit away.

I can turn the terminal off for now, but I think it's very far from ideal. mpv is just not a GUI application.

GNOME applications (nautilus, gnome-shell) don't seem to display an application icon correctly.

I have no idea either. Maybe GNOME expects certain icon sizes, or requires a config file of some sorts? Can you investigate this further? I don't really want to install GNOME just for testing icons.

I just know I am not. I did some final edits, but the original one came from one of the comments on the AUR package. I wouldn't be surprised if it originates from mplayer's or mplayer2's.

I first compared to mplayer's .desktop file, and they looked quite different. But comparing it with mplayer2's .desktop file shows that the MimeType field was only slightly edited, so it's most likely based on mplayer2's. A bit strange that the mplayer and mplayer2 files are so different, yet mplayer2 still assumes gmplayer, which was removed ages ago from mplayer2.

ghost avatar Sep 15 '13 16:09 ghost

I investigated more the GNOME case, and apparently it was a matter of executing gtk-update-icon-cache as root. So it works after all.

Regarding terminal window, since (most likely) most people use mpv as a video player (since audio player typically requires a library view, playlists, etc.), I would suggest optimizing this case (i.e. invoking mpv from GUI file manager) for video, where terminal window is rather unnecessary. And then later maybe we'll have a window even for audio-only stuff.

MadFishTheOne avatar Sep 15 '13 18:09 MadFishTheOne

Merged with modifications.

I won't add it to the current release, though.

ghost avatar Sep 15 '13 19:09 ghost

Eventually, I want to add a --force-window option, which would show a window even in audio-only mode, but that's still a bit away.

Please consider display lyrics in the window, if 'lrc' file found. 'lrc' is a plain-text file format, similar to 'srt' subtitle here's an example:

[ar:Bobby Vinton]
[ti:Sealed with a Kiss]
[al:Sealed with a Kiss]

[00:15.03]Though we gotta say goodbye for the summer
[00:23.03]Baby, I promise you this
[00:26.97][02:20.71]I'll send you all my love
[00:30.91][00:53.33][02:24.65]Every day in a letter
[00:36.20][00:58.40][02:29.60][02:34.83][02:40.27][02:46.00]Sealed with a kiss
[00:37.85][02:09.45]Yes, it's gonna be a cold lonely summer
[00:45.22][02:16.77]But I'll fill the emptiness
[00:49.41]I'll send you all my dreams
[01:02.08]I'll see you in the sunlight
[01:07.76]I'll hear your voice everywhere
[01:13.20]I'll run to tenderly hold you
[01:18.77]But baby, you won't be there
[01:22.51]I don't wanna say goodbye for the summer
[01:30.27]Knowing the love we'll miss
[01:34.08]So let us make a pledge
[01:36.95]To meet in September
[01:42.33]And seal it with a kiss
[01:47.80]

More information in wikipedia: http://en.wikipedia.org/wiki/LRC_(file_format)

Screenshots: ( Google Image ) https://www.google.com/search?tbm=isch&q=minilyric

badluckyman avatar Sep 16 '13 11:09 badluckyman