Skip to content

Typing a shell comman in terminal will open and execute that command in WezTerm

Notifications You must be signed in to change notification settings

abdullahahmed-dev/custom-alfred-wezterm-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Custom Alfred WezTerm Script

AppleScript for WezTerm Alfred integration. Inspired by Vitorgalvao's script for iTerm.

Preview

Aug-31-2024 14-38-20

Setup

  1. Copy the script to your clipboard (see below).
  2. Open Alfred Preferences (call Alfred and press ⌘,).
  3. Navigate to Features → Terminal → Custom.
  4. Set Application to Custom.
  5. Select the text in the box.
  6. Paste the script.
  7. Launch Alfred.
  8. Start with a > and type your command.
  9. Press Enter.
  10. It will open WezTerm and execute your command in a new tab.

Script

on alfred_script(query)
	tell application "wezterm" to activate
	set paneId to do shell script "/Applications/WezTerm.app/Contents/MacOS/wezterm cli spawn"
	set commandList to paragraphs of query
	repeat with command in commandList
		do shell script "echo " & command & " | /Applications/WezTerm.app/Contents/MacOS/wezterm cli send-text --no-paste --pane-id " & paneId
	end repeat
end alfred_script

About

Typing a shell comman in terminal will open and execute that command in WezTerm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published