Created
December 20, 2017 22:46
-
-
Save janstuemmel/c391aa1b092f8bb0b188ec247f298a2e to your computer and use it in GitHub Desktop.
openbox keyboard media keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<!-- config ... --> | |
<keyboard> | |
<!-- in section keyboard add following: --> | |
<keybind key="XF86AudioLowerVolume"> | |
<action name="Execute"><execute>amixer -q sset Master 3%-</execute></action> | |
</keybind> | |
<keybind key="XF86AudioRaiseVolume"> | |
<action name="Execute"><execute>amixer -q sset Master 3%+</execute></action> | |
</keybind> | |
<keybind key="XF86AudioMute"> | |
<action name="Execute"><execute>amixer -q -D pulse sset Master toggle</execute></action> | |
</keybind> | |
<keybind key="XF86AudioPlay"> | |
<action name="Execute"><execute>dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause</execute></action> | |
</keybind> | |
</keyboard> | |
</openbox_config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pulseaudio alternative
Play/Pause, Next, Previous
If you want to use your play/next/prev keys with ALL your MPRIS compatible media software, you can use a client like playerctl to send these commands :
Screen brightness
If on a laptop, you can control the lcd brightness with light using :
First find your backlight device with
then use what you found in your command instead of 'intel_backlight' :