Skip to content

Instantly share code, notes, and snippets.

@mxmilkiib
Last active October 8, 2023 17:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxmilkiib/6d6dfc9ed8fa68f8724c34a4b0c6ee96 to your computer and use it in GitHub Desktop.
Save mxmilkiib/6d6dfc9ed8fa68f8724c34a4b0c6ee96 to your computer and use it in GitHub Desktop.
A desktop entry to allow Linux users to open a directory containing audio files in mpv whilst pausing then unpause any Firefox media playing upon opening and exit. Requires: playerctl, Firefox Mpris integration extension, and ZSH as the current shell. Also sets the volume to 80%, starts at 30 second in, and sets an unobtrusive window size https:…
[Desktop Entry]
NoDisplay=1
Exec=bash -c 'playerctl pause -p firefox; mpv --geometry=600x300 --volume=80 --start=30 --player-operation-mode=pseudo-gui --script-opts=autoload-disabled=yes -- %U/**/*.{flac,mp3,oga,ogg,vobis,opus,aac,m4a,wav,mod,med,it,xm,s3m} %U/*.{flac,mp3,oga,ogg,vobis,opus,aac,m4a,wav,mod,med,it,xm,s3m} ; playerctl play-pause -p firefox'
MimeType=inode/directory
Name=mpv (mpris ⏯)
Icon=mpv
Type=Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment