This commit is contained in:
熊潇 2025-08-16 21:50:47 +08:00
parent e8f28f72d9
commit 4fc054522b
7 changed files with 127 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Close All Finder Windows
# @raycast.mode silent
# @raycast.packageName System
# Optional parameters:
# @raycast.icon 🗂️
# Documentation:
# @raycast.description Closes all open Finder windows.
tell application "Finder"
close every window
end tell

View File

@ -0,0 +1,18 @@
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Minimize All Windows
# @raycast.mode silent
# Optional parameters:
# @raycast.icon images/minimize-window.png
# @raycast.packageName System
# Documentation:
# @raycast.author Ernest Ojeh
# @raycast.authorURL https://github.com/namzo
# @raycast.description This script minimizes all windows of currently running apps
tell application "System Events"
keystroke "hm" using {command down, option down}
end tell

View File

@ -0,0 +1,15 @@
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Shut Down
# @raycast.mode silent
# @raycast.packageName System
# Optional parameters:
# @raycast.icon 🛌
# Documentation:
# @raycast.description Shuts down computer.
tell application "Finder" to shut down

18
sh/kill-process.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Kill Running Process
# @raycast.mode silent
# @raycast.packageName System
#
# Optional parameters:
# @raycast.icon ⚠️
# @raycast.argument1 { "type": "text", "placeholder": "process name" }
# Documentation:
# @raycast.description Force kill a running process
# @raycast.author Gustavo Santana
# @raycast.authorURL https://github.com/gumadeiras
pkill -9 "$1"

21
sh/open-image-from-clipboard.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Dependency: `brew install pngpaste coreutils`
# pngpaste required to grab image from clipboard
# coreutils required to create temp file with suffix
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open Image
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 📋
# @raycast.packageName Clipboard
# Documentation:
# @raycast.description Open Image from Clipboard in Preview for OCR or other purposes.
# @raycast.author xxchan
# @raycast.authorURL https://github.com/xxchan
tempfile=$(gmktemp --suffix=.png) && pngpaste $tempfile && open $tempfile

19
sh/restart-dock.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Restart the Dock
# @raycast.mode silent
# @raycast.packageName System
# Optional parameters:
# @raycast.icon 💀
# @raycast.author Jordi Clement
# @raycast.authorURL https://github.com/jordicl
# Documentation:
# @raycast.description Restart the Dock
killall Dock
echo "Restarted the Dock"

19
sh/restart-finder.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Restart the Finder
# @raycast.mode silent
# @raycast.packageName System
# Optional parameters:
# @raycast.icon 💀
# @raycast.author Jordi Clement
# @raycast.authorURL https://github.com/jordicl
# Documentation:
# @raycast.description Restart the Finder
killall Finder
echo "Restarted the Finder"