nerowet.blogg.se

Open terminal from finder
Open terminal from finder




open terminal from finder

To prevent two windows from opening when you click the toolbar launch icon when iTerm2 is not already running, set iTerm2's Preferences -> General -> Startup to Only Restore Hotkey Window for the Window restoration policy.Let’s say I’m in the Finder, I open a folder and I want to open it in the Terminal.Then do ⌘ i to iTermOpenHereScript.app file, select the application icon in the top left corner of the window and ⌘ v. To replace the generic Automator app icon with the iTerm2 icon, ⌘ i on the actual iTerm.app file in /Applications, select the application icon in the top left corner of the window and ⌘ c. Right click on the spot on the toolbar and select Icon Only.Note that the first time you launch there may be a security popup saying iTermOpenHereScript wants access. Drag and drop iTermOpenHereScript.app onto the Finder Toolbar while holding down the ⌥ ⌘ keys to place a toolbar launch icon.Save if Automator tries to save to iCloud drive, better to save locally - save as iTermOpenHereScript.app to the Desktop and then move it to ~/Library/Services.

open terminal from finder

  • Run Automator, File -> New and choose Application.
  • To make an Automator App that can reside on the Finder Toolbar to open an iTerm2 window at the current focused working Folder: the current working Folder of a focused Finder window - via Finder Toolbar icon If there are no Finder windows open in any other Spaces, it will default to the user's home directory. If the current Desktop does not have any Finder windows, it's a bit indeterministic, but a working directory from a Finder window in other Space is used.

    open terminal from finder

    The Desktop having focus isn't really the intended use case, but for completeness, if it's the Desktop that has focus the working directory of its last focused still-open Finder window is used. This is only active when a Finder window (or the Desktop itself) has focus (and ignores any selected Finder Folders). To make windows open a bit faster, in iTerm2's Preferences -> General -> Closing uncheck Quit when all windows are closed.To prevent two windows from opening when you use the keyboard Shortcut when iTerm2 is not already running, set iTerm2's Preferences -> General -> Startup to Only Restore Hotkey Window for the Window restoration policy.

    open terminal from finder

    Check iTermOpenHereScript and Add Shortcut (e.g. Add the keyboard shortcut under System Preferences -> Keyboard -> Shortcuts -> Services under the General section.Save if Automator tries to save to iCloud drive, better to save locally - save as iTermOpenHereScript.workflow to the Desktop and then move it to ~/Library/Services.Paste the script from AppleScript section below.Workflow receives Automatic (Nothing) in any application.Click Library -> Utilities and double click Run AppleScript.Run Automator, File -> New and choose Quick Action.the current working Folder of a focused Finder window - via keyboard shortcut This is only active when a Folder is currently selected in a Finder window that has focus. But also make sure the keyboard Shortcut is unique and not already assigned somewhere else. Note that sometimes macOS doesn't register a new keyboard Shortcut assignment immediately and may even require an OS restart to get it working. You just have to check it and Add Shortcut (e.g. Starting sometime with iTerm2 version 3.x, it puts New iTerm2 Window Here in System Preferences -> Keyboard -> Shortcuts -> Services under the Files and Folders section. To Launch an iTerm2 Window at: a selected Folder in a focused Finder window - via keyboard shortcut The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+. (Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)






    Open terminal from finder