~scripts
64 itemsDownload ./*

..
ai
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
btctl.sh
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
div2pad
dmenu
esp32-cam-ffmpeg-gst-uvc.sh
ffthumb
fixfnkey.sh
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mic-test-playback.sh
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptsbtctl.sh
841 B• 27•  1 week ago•  DownloadRawClose
1 week ago•  27

{}
#!/bin/bash
#

# 8E:D7:2C:F8:32:6C HW-BT
MAC="8E:D7:2C:F8:32:6C"

IN=$1
if [ -z "$IN" ]; then
    # default
    IN=1
fi

if [ $IN -ge 6 ]; then
    vim /etc/bluetooth/main.conf
elif [ $IN -ge 5 ]; then
    # restart service
    sudo systemctl restart bluetooth
elif [ $IN -ge 2 ]; then
    # disconnect device
    bluetoothctl disconnect $MAC
    if [ $IN -ge 3 ]; then
        # and reset device
        bluetoothctl untrust $MAC
        bluetoothctl remove $MAC
    fi
else
    # IN -eq 1 or default --
    # scan devices;
    bluetoothctl scan on
    # use ctrl-c to stop scan and cont connect
    if [ $IN -le 0 ]; then
        # setup new device
        bluetoothctl pair $MAC
    fi
    #while true; do
        # connect device
        bluetoothctl connect $MAC
    
    #    echo "trying again in 1..."
    #    sleep 1
    #done
fi


Top
©twily.info 2013 - 2025
twily at twily dot info



2 451 032 visits
... ^ v