From dbb7cd367875bc051a07467f8628b3623bf8c3c0 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 8 Jan 2023 13:27:22 -0600 Subject: [PATCH 1/2] fix issue with greetd-config.sh --- installers/arch/scripts/greetd-config.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installers/arch/scripts/greetd-config.sh b/installers/arch/scripts/greetd-config.sh index f6bcff1..a1bb903 100755 --- a/installers/arch/scripts/greetd-config.sh +++ b/installers/arch/scripts/greetd-config.sh @@ -10,6 +10,10 @@ command = \"tuigreet --time --cmd sway\" user = \"greeter\"" sudo mkdir -p /etc/greetd/ -sudo sh -c "echo $GREETD_CONFIG > /etc/greetd/config.toml" + +#TODO may be better way to do this +echo "$GREETD_CONFIG" > ./.config.toml.tmp +sudo cp ./.config.toml.tmp /etc/greetd/config.toml +rm ./.config.toml.tmp sudo systemctl enable greetd.service From cbddc8b676548af308321b3c62bcacfa7b3b5de7 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 8 Jan 2023 13:36:35 -0600 Subject: [PATCH 2/2] add bt-connect.sh script that will repeatedly attempt to connect to a bluetooth device. --- bt-connect.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 bt-connect.sh diff --git a/bt-connect.sh b/bt-connect.sh new file mode 100755 index 0000000..816009f --- /dev/null +++ b/bt-connect.sh @@ -0,0 +1,27 @@ +#!/bin/sh + + +quit() { + QUIT="TRUE" + echo "SIG HANDLED" +} + + +trap 'quit' 2 +trap 'quit' 15 + +[ $# -lt 1 ] && echo "input bluetooth device uuid to repeatedly attempt to connnect to as 1st arg" && exit + +UUID="$1" + +while [ -z "$QUIT" ] +do + IS_CONN="$( bluetoothctl devices Paired | grep "$UUID")" + if [ -z "$IS_CONN" ]; then + bluetoothctl connect "$UUID" + fi + sleep 5 + +done + +echo "SCRIPT CLOSED"