Taiko2k / Tauon

The music player of today! :city_sunrise:
https://tauonmusicbox.rocks
GNU General Public License v3.0
1.64k stars 65 forks source link

"Open Folder" action should highlight song #574

Open demeralde opened 2 years ago

demeralde commented 2 years ago

If I click on a song and open its folder, as a user I expect it to the highlight the song. Otherwise I have to manually search for it once the folder opens.

I also think it should be renamed to "Open In Folder".

Solarunit commented 2 years ago

Song highlighting would be nice I think. "Open Folder" is good too.

Taiko2k commented 2 years ago

While I think its a good idea, unfortunately this more or less isn't supported by existing Linux desktop tools.

da2x commented 2 years ago

While I think its a good idea, unfortunately this more or less isn't supported by existing Linux desktop tools.

Sure it is. Tons of other programs does this. You can open Nautilus and Dolphin with --select file-path. Windows Explorer uses /select.

xdg-open can’t handle this, though. Pseudo code:

if 'nautilus' in `xdg-mime query default inode/directory`.lower():
  `nautilus --select $file`
else if 'dolphin' in `xdg-mime query default inode/directory`.lower():
  `dolphin --select $file`
else
  `xdg-open $directory`
end

No idea how this would work in a Flatpak sandbox.

All of this being said, there’s probably a desktop portal or DBus call to do this.

Taiko2k commented 2 years ago

@da2x looks like you're right, ill revisit this when I have time