Merge branch 'master' of github.com:ahub2/my-scripts

master
Alex 2023-01-21 16:21:18 -06:00
commit ab09fc074f
2 changed files with 32 additions and 1 deletions

27
bt-connect.sh Executable file
View File

@ -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"

View File

@ -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