Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneUp ⬆️

給 macOS Finder 工具列加一顆「回上一層目錄」按鈕。

Finder 內建其實有 ⌘↑ 快速鍵可以回上一層,但沒有對應的工具列按鈕。 OneUp 就是那顆按鈕:一個迷你 AppleScript app,點一下就把最前面的 Finder 視窗導航到上一層資料夾。

安裝

git clone https://github.com/GarfieldHuang/OneUp.git
cd OneUp
./build.sh
cp -R OneUp.app /Applications/

然後:

  1. 開啟 Finder,前往「應用程式」資料夾
  2. 按住 ⌘,把 OneUp.app 拖到 Finder 視窗上方的工具列,出現綠色 ➕ 時放開
  3. 點按鈕即可回上一層。第一次點擊時 macOS 會詢問「OneUp 想要控制 Finder」,按允許

原理

核心只有幾行 AppleScript(oneup.applescript):

tell application "Finder"
    set target of front Finder window to (container of currentTarget)
end tell

已在最上層(例如磁碟根目錄)時按下不會報錯,靜默忽略。

移除

把工具列上的按鈕 ⌘拖出即可移除;app 本體刪掉 /Applications/OneUp.app

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages