On 12/29/2016 03:57 PM, Jon Solworth wrote:
I'm at Chaos Computer Congress, and Qubes has a table. I got some help from
them with the multimedia buttons for i3. Specifically, I configured the
brightness and sound controls, but not the multimedia player controls because
the player is not in Dom0 (where the i3 exec runs)
To get this working in dom0 install some software:
sudo qubes-dom0-update pulseaudio-utils
sudo qubes-dom0-update xbacklight
Then add the following lines to .config/i3
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5%
#increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5%
#decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # mute
sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen
brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen
brightness
that's it,
Jon
When you know about the dbus interface that media players use, its
pretty easy to control a designated 'media' VM from dom0. In KDE, I went
into System-settings, Shortcuts and defined a new group under Custom.
Then I added entries with commands like:
qvm-run Media 'dbus-send --print-reply
--dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2
org.mpris.MediaPlayer2.Player.Next'
The above will send rhythmbox to the next track. The first argument
after 'dest=' specifies the player program.
There may also be a way to do this by injecting keypresses (or
forwarding them) into VMs; this could have the effect of controlling
whichever player is currently active. Also, I have seen a technique that
looks at the list of interfaces under 'org.mpris.MediaPlayer2.*' and
passes the commands to the first (or last) program it finds.
Chris
--
You received this message because you are subscribed to the Google Groups
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/qubes-users/b67a3082-acee-6cd9-c818-4b2d1c65a43c%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.