[Bin] Set default soundcard in autostart
This commit is contained in:
parent
a7db109206
commit
bc7f7e3182
@ -66,10 +66,18 @@ mpc stop &
|
|||||||
xwallpaper --zoom (cat $HOME/.cache/wallpaper) &
|
xwallpaper --zoom (cat $HOME/.cache/wallpaper) &
|
||||||
#+end_example
|
#+end_example
|
||||||
|
|
||||||
|
I also have an external sound card, a Scarlet 2i2 G3, that I would like to use as my default audio output. However, it might not be always connected, hence the following code:
|
||||||
|
#+NAME: default-soundcard
|
||||||
|
#+BEGIN_SRC fish :tangle no
|
||||||
|
set SOUNDCARD "alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y8KJ6NH094EF1C-00.analog-stereo"
|
||||||
|
pactl list short sinks | grep $SOUNDCARD 2&> /dev/null && pactl set-default-sink $SOUNDCARD
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC fish :noweb yes
|
#+BEGIN_SRC fish :noweb yes
|
||||||
set -l PATH $PATH /usr/lib/xfce-polkit
|
set -l PATH $PATH /usr/lib/xfce-polkit
|
||||||
|
|
||||||
<<autostart-gen()>>
|
<<autostart-gen()>>
|
||||||
|
<<default-soundcard>>
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* cli utilities
|
* cli utilities
|
||||||
|
Loading…
Reference in New Issue
Block a user