From cc37b14096ed81c10e502deb5c27c33266676fad Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Wed, 24 May 2023 11:00:38 +0200 Subject: [PATCH] Add bluetooth script --- script/bt | 13 +++++++++++++ shared/home/bash.nix | 3 +++ 2 files changed, 16 insertions(+) create mode 100755 script/bt diff --git a/script/bt b/script/bt new file mode 100755 index 0000000..9b96106 --- /dev/null +++ b/script/bt @@ -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 \ No newline at end of file diff --git a/shared/home/bash.nix b/shared/home/bash.nix index 204d218..791e975 100644 --- a/shared/home/bash.nix +++ b/shared/home/bash.nix @@ -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