mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
23 lines
383 B
Nix
23 lines
383 B
Nix
{
|
|
writeShellApplication,
|
|
fzf,
|
|
pulseaudio,
|
|
jq,
|
|
...
|
|
}:
|
|
writeShellApplication {
|
|
name = "custom-changeAudioOutput";
|
|
runtimeInputs = [
|
|
fzf
|
|
pulseaudio
|
|
jq
|
|
];
|
|
text = ''
|
|
select=$(pactl -f json list sinks | jq -r '.[].name' | fzf)
|
|
if [[ -n "$select" ]]; then
|
|
pactl set-default-sink "$select"
|
|
fi
|
|
pkill -f "kitty.*Select audio output"
|
|
'';
|
|
}
|