Skip to content

Commit

Permalink
[feature]<main>: remove all go files ✨✨
Browse files Browse the repository at this point in the history
  • Loading branch information
o98k-ok committed Sep 18, 2024
1 parent 523b2a4 commit 531bd27
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 92 deletions.
37 changes: 0 additions & 37 deletions entry.go

This file was deleted.

22 changes: 0 additions & 22 deletions entry.py

This file was deleted.

22 changes: 0 additions & 22 deletions get-tabs.scpt

This file was deleted.

5 changes: 0 additions & 5 deletions go.mod

This file was deleted.

6 changes: 0 additions & 6 deletions go.sum

This file was deleted.

25 changes: 25 additions & 0 deletions list.scpt
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
20 changes: 20 additions & 0 deletions switch.scpt
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

0 comments on commit 531bd27

Please sign in to comment.