mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
audio: add script to fzf change audio output
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#media-session.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.callPackage ../../modules/scripts/changeAudioOutput.nix {})
|
||||
kdePackages.okular
|
||||
kdePackages.dolphin
|
||||
pulseaudio # sound server
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
fzf,
|
||||
pactl,
|
||||
jq,
|
||||
...
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "custom-changeAudioOutput";
|
||||
runtimeInputs = [
|
||||
fzf
|
||||
pactl
|
||||
jq
|
||||
];
|
||||
text = ''
|
||||
$select=pactl -f json list sinks | jq -r '.[].name' | fzf
|
||||
if [[ -n "$select" ]]; then
|
||||
pactl set-default-sink $select
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user