Add bluetooth script

This commit is contained in:
Riley Apeldoorn 2023-05-24 11:00:38 +02:00 committed by Riley Apeldoorn
parent 20a6996fbe
commit cc37b14096
2 changed files with 16 additions and 0 deletions

13
script/bt Executable file
View file

@ -0,0 +1,13 @@
case "$1" in
"connect" ) {
x=$(bluetoothctl devices | sk | sd '^Device ' '' | sd ' .+$' '') && {
bluetoothctl connect "$x"
}
};;
"disconnect" ) {
bluetoothctl disconnect
};;
* ) {
echo "unknown command"
};;
esac

View file

@ -60,6 +60,9 @@ in with lib; {
".yaml" = "${fd}/bin/fd -e yaml -e yml";
".yml" = ".yaml";
} // cfg.extraAliases;
bashrcExtra = ''
export PATH=${../../script}:/home/riley/.nix-profile/bin:$PATH
'';
};
# Configure the prompt