Wednesday, 18 July 2018

kde - Stop music playback when I lock the screen


Is it possible to run xmms2 stop when I lock the screen with Ctrl+Alt+L?



Answer



Should be.


The desktop-agnostic way is:



  • install xbindkeys

  • create a script that runs your "xmms" command plus "xscreensaver -l" or "kdescreensaver --lock"

  • create a ~/.xbindkeysrc

  • make xbindkeys run at startup


Assuming your script is in /usr/local/bin/lockandstop, ~/.xbindkeysrc should contain:


"/usr/local/bin/lockandstop"
Control + Alt + l

or perhaps


"/usr/local/bin/lockandstop"
Mod4 + l

depending on what xmodmap prints.


But maybe the KDE Control Panel offers an easier way under the keyboard shortcuts section.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...