This commit is contained in:
speedie 2023-04-14 12:39:56 +02:00
parent ddad32b432
commit 292121f65e

View file

@ -20,7 +20,7 @@ NOTIFY_DISCONNECT() { SEND_NOTIF " Disconnected" " Disconnected from ${SEL
NOTIFY_REMOVE() { SEND_NOTIF " Removed" " Removed device ${SELDEVICE}!"; }
# Misc functions
LIST_OPTIONS() { SELDEVICE_ACTION="$(printf -- "-- Options --\nConnect\nDisconnect\n-- Toggle --\nPair\nRemove\nTrust\nUntrust\n\nAbout\nExit" | sed "s/-e //g" | $RUNLAUNCHER -g 1 -l 20 -p "What do you want to do with this device?" | awk '{ print $1 }')"; }
LIST_OPTIONS() { SELDEVICE_ACTION="$(printf -- "<b>Options</b>\nConnect\nDisconnect\n<b>Toggle</b>\nPair\nRemove\nTrust\nUntrust\n\nAbout\nExit" | sed "s/-e //g" | $RUNLAUNCHER -g 1 -l 20 -p "What do you want to do with this device?" | awk '{ print $1 }')"; }
ABOUT() { printf -- "speedwm-btctrl\nspmenu bluez frontend\n\nVersion %s\n" "$([ -e "/usr/share/speedwm/speedwm-extras-version" ] && cat /usr/share/speedwm/speedwm-extras-version || printf "1.9")" | $RUNLAUNCHER -l 40 -g 1 -p 'About'; pkill bluetoothctl; exit 0; }
SEND_NOTIF() { [ "$NOTIF_SYSTEM" = "dnote" ] && command -v dnote && [ ! -z "$*" ] && printf "$2\n" | dnote -loc 4 && exit 1 || command -v notify-send && notify-send "$1" "$2" > /dev/null; }