Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script for open a iterm window with a specific profile #938

Merged
merged 3 commits into from
May 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions commands/apps/iterm/iterm-open-profile-in-new-window.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/osascript

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open iterm2 profile
# @raycast.mode silent

# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "Placeholder" }
# @raycast.packageName Open_iterm2_profile

# Documentation:
# @raycast.author sunrisewestern
# @raycast.authorURL https://github.com/sunrisewestern

on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running

on run {argv}
set iTermRunning to is_running("iTerm2")
tell application "iTerm"
activate
if not (iTermRunning) then
delay 0.5
close the current window
end if
create window with profile argv
end tell
end run