falconindy / ponymix

CLI volume control for PulseAudio
MIT License
177 stars 27 forks source link

Can't set default device #46

Closed Izacht13 closed 7 years ago

Izacht13 commented 7 years ago

Why does it require 0 args when the help for the command says "Set default by id", you would think that would mean ponymix set-default <id>.

falconindy commented 7 years ago

Because the id alone as an arg would be ambiguous. What are you changing? The default sink? The default source? This is why it's relegated to a separate flag.

michaelmrose commented 7 years ago

how do you actually change the default with this?

falconindy commented 7 years ago

By doing exactly what I said -- adding a flag to point to the device type that you're changing.

Example:

$ ponymix defaults
sink 0: alsa_output.hw_0_7
  GF106 High Definition Audio Controller
  Avg. Volume: 100%
source 0: alsa_output.hw_0_7.monitor
  Monitor of GF106 High Definition Audio Controller
  Avg. Volume: 100%

$ ponymix list --sink
sink 0: alsa_output.hw_0_7
  GF106 High Definition Audio Controller
  Avg. Volume: 100%
sink 1: alsa_output.pci-0000_03_00.1.hdmi-stereo-extra1
  GF106 High Definition Audio Controller Digital Stereo (HDMI 2)
  Avg. Volume: 100%

$ ponymix set-default --sink -d hdmi

$ ponymix defaults
sink 1: alsa_output.pci-0000_03_00.1.hdmi-stereo-extra1
  GF106 High Definition Audio Controller Digital Stereo (HDMI 2)
  Avg. Volume: 100%
source 0: alsa_output.hw_0_7.monitor
  Monitor of GF106 High Definition Audio Controller
  Avg. Volume: 100%