diff --git a/SXHkD/.config/sxhkd/sxhkdrc b/SXHkD/.config/sxhkd/sxhkdrc index 08da244..09f3913 100644 --- a/SXHkD/.config/sxhkd/sxhkdrc +++ b/SXHkD/.config/sxhkd/sxhkdrc @@ -33,7 +33,10 @@ super + minus $HOME/.local/scripts/act_display "--off"; super + numbersign - $HOME/.local/scripts/bt_connect; + $HOME/.local/scripts/bt_connect connect; + +super + asciitilde + $HOME/.local/scripts/bt_connect disconnect; super + underscore notify-send -u normal "Turning off screentimer"; \ diff --git a/Scripts/.local/scripts/bt_connect b/Scripts/.local/scripts/bt_connect index 1e23053..a103b4c 100755 --- a/Scripts/.local/scripts/bt_connect +++ b/Scripts/.local/scripts/bt_connect @@ -1,4 +1,7 @@ #!/usr/bin/env sh choice=$(bluetoothctl devices | sed 's/Device \([A-Z0-9:]*\) \(.*\)/\2\t\1/g' | dmenu -i -p "Device: " | sed 's/.*\t//') -[ ! -z $choice ] && bluetoothctl connect $choice +if [ ! -z $choice ] +then + bluetoothctl $1 $choice +fi