audio: script added shortcut

This commit is contained in:
2026-05-17 22:34:30 +02:00
parent 7e4627c5c0
commit 1996eeb777
4 changed files with 25 additions and 22 deletions
+5 -4
View File
@@ -1,7 +1,7 @@
{
writeShellApplication,
fzf,
pactl,
pulseaudio,
jq,
...
}:
@@ -9,13 +9,14 @@ writeShellApplication {
name = "custom-changeAudioOutput";
runtimeInputs = [
fzf
pactl
pulseaudio
jq
];
text = ''
$select=pactl -f json list sinks | jq -r '.[].name' | fzf
select=$(pactl -f json list sinks | jq -r '.[].name' | fzf)
if [[ -n "$select" ]]; then
pactl set-default-sink $select
pactl set-default-sink "$select"
fi
'';
}