Git Product home page Git Product logo

Comments (4)

Taiko2k avatar Taiko2k commented on August 25, 2024

I used to hook key input directly from the X server. But I didn't get the feeling this was a great way of doing things. GNOME and KDE are both providing media player control themselves now. So I removed that functionality to clean up some dependencies.

Unfortunately it means media keys won't work out the box on other desktop environments. But you can add the shortcuts manually in XFCE. If you go to Settings Manager > Keyboard > Application Shortcuts

You can set the following commands, and bind them to any shortuct/key:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.tauon /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.tauon /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.tauon /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.tauon /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

BTW I just found a bug that conflicts with this causing it to not work sometimes, Ill need to fix that, but you can work around it by making sure the notifications setting is disabled in Tauon, go to Menu > Settings... > View > Show track notifications

from tauon.

Taiko2k avatar Taiko2k commented on August 25, 2024

I don't think ill add native support for this back. It mainly comes down to:

  • Adds extra code and dependencies. Desktop environments are generally moving away from X, and no longer the 'correct' way to do things for the Linux desktop.
  • Finding, detecting and whitelisting which DE/WM supports what is complicated.
  • Hooking the X server is a small security concern, it would mean all keyboard input would be passing through the media player, I'm not sure users would want this.
  • The previous library I was using for this has a conflicting license.

from tauon.

 avatar commented on August 25, 2024

Using the dbus-send commands works fine.

Thanks for the great music player 👍

from tauon.

Taiko2k avatar Taiko2k commented on August 25, 2024

Thanks for the kind words. And apologies I haven't provided more of an ideal solution here.

from tauon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.