Skip to content

Commit

Permalink
feat(proj): version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji4n1ng committed Apr 17, 2019
1 parent e9fbba0 commit fa5fa6c
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 12 deletions.
2 changes: 1 addition & 1 deletion OpenInTerminal/Terminals/TerminalApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class TerminalApp : Terminal {
throw OITError.wrongUrl
}

let terminal = SBApplication(bundleIdentifier: "com.apple.Terminal")! as TerminalApplication
let terminal = SBApplication(bundleIdentifier: TerminalType.terminal.rawValue)! as TerminalApplication

guard let open = terminal.open else {
throw OITError.cannotAccessTerminal
Expand Down
22 changes: 15 additions & 7 deletions README-zh.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# OpenInTerminal

一个可以在终端(iTerm 或 Hyper)中打开当前目录的访达工具栏应用程序。
一个可以在终端([`iTerm`](https://www.iterm2.com/)[`Hyper`](https://github.com/zeit/hyper))中打开当前目录的访达工具栏应用程序。

## 如何使用
## 如何使用 🚀

### 1) 在终端中打开当前目录

Expand All @@ -12,20 +12,28 @@

![run2](./screenshots/run2.gif)

### 3) 其他
### 3) 设置默认终端

如果既没有打开访达窗口,也没有选中文件夹,那么程序将会在 `Terminal` 或者 `iTerm` 里打开 `Home` 目录
在第一次运行应用的时候,你需要选择默认终端

## 如何安装
![selector](/Users/jianing/Program/GitHub/OpenInTerminal/screenshots/selector.png)

当你设置了默认终端之后,选择框将不会再出现。如果你想要重新设置默认终端,请在终端中输入以下命令。然后重新运行应用。

```
defaults remove wang.jianing.OpenInTerminal OIT_TerminalBundleIdentifier
```

## 如何安装 🖥

1.[release](https://github.com/Ji4n1ng/OpenInTerminal/releases) 中下载。
2. 将应用移动到 `应用程序` 文件夹.
3. 右键点击`访达`工具栏,选择`自定义工具栏`。将应用拖到工具栏中
3. 按住 `Cmd` 键,然后将应用拖到访达工具栏中
4. 完成。

> ⚠️ 当您第一次运行应用程序时,macOS 将要求访问 `访达``终端`(或 `iTerm`)的权限。请给予应用程序权限。
![toolbar](./screenshots/toolbar-zh.gif)
![toolbar](./screenshots/toolbar.gif)

### 如果你正在使用深色模式 (Dark Mode)

Expand Down
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@

![run2](./screenshots/run2.gif)

### 3) Other
### 3) Set default terminal

If neither Finder window is opened nor the folder is selected, this app will open `home directory` in `Terminal`, `iTerm` or `Hyper`.
You are asked to set the default terminal to open after first launch.

![selector](./screenshots/selector.png)

The selection box will not appear after you have set the default terminal. If you want to reset the default terminal, please enter the following command in the terminal. Then just run the application again.

```
defaults remove wang.jianing.OpenInTerminal OIT_TerminalBundleIdentifier
```

## How to Install 🖥

1. Download from [release](https://github.com/Ji4n1ng/OpenInTerminal/releases).
2. Move the app into `/Applications`.
3. Right click on the Finder toolbar. Choose `Customize Toolbar`. Drag the app into Finder Toolbar.
3. Hold down the `Cmd` key and drag the app into Finder Toolbar.
4. Done.

> ⚠️ macOS will ask your permissions to access Finder and Terminal (or iTerm) when you run the app for the first time. Please give the application permissions.
> ⚠️ macOS will ask your permissions to access Finder and Terminal (iTerm or Hyper) when you run the app for the first time. Please give the application permissions.
![toolbar](./screenshots/toolbar.gif)

Expand All @@ -51,6 +59,11 @@ xcodebuild

## Changes 🗒

**version 0.2.0**

- Add terminal selector
- Cancel running `clear` command when opening iTerm

**version 0.1.1**

- Support `Hyper`
Expand All @@ -62,6 +75,12 @@ xcodebuild

## Special Thanks to ❤️

### Contributors

- [Camji55](https://github.com/Camji55)

### Reference projects

- [jbtule/cdto](https://github.com/jbtule/cdto)
- [es-kumagai/OpenTerminal](https://github.com/es-kumagai/OpenTerminal)
- [tingraldi/SwiftScripting](https://github.com/tingraldi/SwiftScripting)
Binary file added screenshots/selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/toolbar.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/toolbar2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fa5fa6c

Please sign in to comment.