From 55991c13cbd6b9cd477f49bcc2db1adeb4a44f23 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 17 Sep 2026 07:38:45 +0100 Subject: [PATCH] Moved some raycast scripts to standard scripts Signed-off-by: Marcus Noble --- home/.bin/clear-notifications | 12 ++++++++++++ home/.bin/litractl | 2 ++ home/.bin/toggle-microphone | 21 +++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100755 home/.bin/clear-notifications create mode 100755 home/.bin/toggle-microphone diff --git a/home/.bin/clear-notifications b/home/.bin/clear-notifications new file mode 100755 index 0000000..a597a6e --- /dev/null +++ b/home/.bin/clear-notifications @@ -0,0 +1,12 @@ +#!/usr/bin/osascript + +tell application "BetterTouchTool" + trigger_action "{ BTTPredefinedActionType: 122}" -- Toggle Notification Center (Open) + trigger_action "{ BTTPredefinedActionType: 289}" -- Clear notifications +end tell + +delay 1 + +tell application "BetterTouchTool" + trigger_action "{ BTTPredefinedActionType: 122}" -- Toggle Notification Center (Close) +end tell diff --git a/home/.bin/litractl b/home/.bin/litractl index 19b4d3c..5f77af4 100755 --- a/home/.bin/litractl +++ b/home/.bin/litractl @@ -32,9 +32,11 @@ done if [[ "${POS_ARGS[0]}" == "on" ]]; then italic "Turning Litra Glow on... " + osascript -e 'display notification "Turning Litra Glow on... " with title "Litra Glow"' hidapitester --vidpid 046D/C900 --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01 &>/dev/null elif [[ "${POS_ARGS[0]}" == "off" ]]; then italic "Turning Litra Glow off... " + osascript -e 'display notification "Turning Litra Glow off... " with title "Litra Glow"' hidapitester --vidpid 046D/C900 --open --length 20 --send-output 0x11,0xff,0x04,0x1c &>/dev/null else print_usage diff --git a/home/.bin/toggle-microphone b/home/.bin/toggle-microphone new file mode 100755 index 0000000..9e3f106 --- /dev/null +++ b/home/.bin/toggle-microphone @@ -0,0 +1,21 @@ +#!/usr/bin/osascript + +on getMicrophoneVolume() + input volume of (get volume settings) +end getMicrophoneVolume +on disableMicrophone() + set volume input volume 0 + log "Microphone turned off 🔴" + display notification "Microphone turned off 🔴" with title "🎙️ Microphone" +end disableMicrophone +on enableMicrophone() + set volume input volume 100 + log "Microphone turned on 🟢" + display notification "Microphone turned on 🟢" with title "🎙️ Microphone" +end enableMicrophone + +if getMicrophoneVolume() is greater than 0 then + disableMicrophone() +else + enableMicrophone() +end if