mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-07-03 00:31:22 -07:00
commands to change audio device
This commit is contained in:
parent
33fbf6214b
commit
0f5d7dbf86
@ -215,6 +215,8 @@ in {
|
||||
} // generate_custom_keybindings {
|
||||
"Bass" = { binding = "<Super><Control>b"; command = "sv -9"; name = "Set Subwoofer to -9dB"; };
|
||||
"Treble" = { binding = "<Super><Control>t"; command = "sv -20"; name = "Set Subwoofer to -20dB"; };
|
||||
"Living" = { binding = "<Super><Control>l"; command = "ss Dragon"; name = "Set Audio to Living Room"; };
|
||||
"Desk" = { binding = "<Super><Control>d"; command = "ss Starship"; name = "Set Audio to Desk"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -26,8 +26,10 @@ in {
|
||||
o = "C-M-9";
|
||||
};
|
||||
util = {
|
||||
b = "C-M-b";
|
||||
t = "C-M-t";
|
||||
b = "C-M-b"; # Set subwoofer to -9dB
|
||||
t = "C-M-t"; # Set subwoofer to -20dB
|
||||
l = "C-M-l"; # Set audio source to living room speakers
|
||||
d = "C-M-d"; # Set audio source to desk speakers/headphones
|
||||
};
|
||||
alt = {
|
||||
h = "left";
|
||||
|
@ -15,6 +15,11 @@ in {
|
||||
#!/bin/sh
|
||||
pySVS 54:B7:E5:57:1A:7B --volume=A | grep -oP "(?<=VOLUME': )-?\\d+" > /tmp/svs
|
||||
'')
|
||||
(pkgs.writeScriptBin "ss" ''
|
||||
#!/bin/sh
|
||||
sink=$(wpctl status | awk '/Audio/{flag=1} /Video/{flag=0} flag' | awk '/Sinks:/{flag=1; next} /Sources:/{flag=0} flag' | grep -E "$1" | awk '{for(i=1;i<=NF;i++) if ($i ~ /^[0-9]+\.$/) { print int($i); exit }}')
|
||||
wpctl set-default "$sink"
|
||||
'')
|
||||
];
|
||||
services.usbmuxd.enable = true; # for iOS mounting as storage
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user