@liangshen/alfred-iterm
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -9,26 +9,1 @@ import { run } from "@apple-jxa/node"; | ||
}, name); | ||
// | ||
// // on alfred_script(q) | ||
// // | ||
// // set msg to "" | ||
// // tell application "Tunnelblick" | ||
// // set configs to get name of configurations | ||
// // if q is in configs then | ||
// // set s to get state of first configuration where name = q | ||
// // if s is equal to "CONNECTED" then | ||
// // if disconnect q then | ||
// // else | ||
// // return "Could not disconnect from: " & q | ||
// // end if | ||
// // else | ||
// // if connect q then | ||
// // else | ||
// // return "Could not connect to: " & q | ||
// // end if | ||
// // end if | ||
// // else | ||
// // return "There is no VPN named: " & q | ||
// // end if | ||
// // end tell | ||
// // | ||
// // end alfred_script |
import alfred from "@liangshen/alfred"; | ||
import plist from 'bplist-parser'; | ||
import os from 'os'; | ||
import iterm from "@liangshen/iterm"; | ||
// await run(() => { | ||
@@ -8,5 +7,4 @@ // let application = Application('ITerm'); | ||
// }) | ||
var obj = await plist.parseFile(`${os.homedir()}/Library/Preferences/com.googlecode.iterm2.plist`); | ||
alfred.log(JSON.stringify(obj), null, 4); | ||
const iterms = obj[0]['New Bookmarks'].map((i) => ({ | ||
const preferences = iterm.getPreferencesSync(); | ||
const items = preferences['New Bookmarks'].map(i => ({ | ||
title: i.Name, | ||
@@ -17,3 +15,3 @@ subtitle: i.Tags.join(','), | ||
alfred.output({ | ||
items: iterms | ||
items | ||
}, ["title", "subtitle"]); | ||
@@ -20,0 +18,0 @@ // const configurations = await run(() => { |
{ | ||
"name": "@liangshen/alfred-iterm", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Alfred workflow for iTerm", | ||
@@ -36,4 +36,4 @@ "type": "module", | ||
"@liangshen/alfred": "^1.1.20", | ||
"bplist-parser": "^0.3.2" | ||
"@liangshen/iterm": "^1.0.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
14228
55
+ Added@liangshen/iterm@^1.0.3
+ Added@liangshen/iterm@1.0.3(transitive)
+ Added@liangshen/mac-software@1.0.1(transitive)
- Removedbplist-parser@^0.3.2