-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature]<main>: remove all go files ✨✨
- Loading branch information
Showing
7 changed files
with
45 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/osascript | ||
|
||
set json_items to {} | ||
|
||
tell application "iTerm" | ||
set session_names to {} | ||
repeat with w in windows | ||
repeat with t in tabs of w | ||
repeat with s in sessions of t | ||
copy name of s to end of session_names | ||
end repeat | ||
end repeat | ||
end repeat | ||
|
||
repeat with n in session_names | ||
set end of json_items to "{\"title\":\"" & n & "\", \"arg\":\"" & n & "\"}," | ||
end repeat | ||
end tell | ||
|
||
|
||
set json_output to text 1 thru -2 of (items of json_items as string) | ||
|
||
set json_output to "{\"items\": [" & json_output & "]}" | ||
|
||
return json_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/osascript | ||
|
||
set the_query to "{query}" | ||
tell application "iTerm" | ||
activate | ||
repeat with w in windows | ||
repeat with t in tabs of w | ||
repeat with s in sessions of t | ||
set the_name to the name of s | ||
if the_name = the_query then | ||
log the_name | ||
select w | ||
select t | ||
select s | ||
return | ||
end if | ||
end repeat | ||
end repeat | ||
end repeat | ||
end tell |