Resources/README-Lite.md
English | <a href="./README-Lite-zh.md">δΈζ</a> | <a href="./README-Lite-de.md">Deutsch</a>
</div>brew install --cask openinterminal-lite
brew install --cask openineditor-lite
/Applications folder, hold down the Cmd key and drag the app into Finder Toolbar.<div> </div>β οΈ 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.
/Applications.Cmd key and drag the app into Finder Toolbar.Open-source projects cannot live long without your help. If you like OpenInTerminal, please consider supporting this project by becoming a sponsor. Your user icon or company logo shows up on the README with a link to your home page.
Become a sponsor through GitHub Sponsors π.
| PayPal | AliPay | WeChat Pay |
|---|---|---|
| paypal.me/ji4ning |
You are asked to set the default terminal (or editor) to open after first launch.
<div> </div>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.
# For OpenInTerminal-Lite:
defaults remove wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal
# For OpenInEditor-Lite:
defaults remove wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor
Set the following app as the default app to open:
| App | Command |
|---|---|
| Alacritty | defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal Alacritty |
| kitty | defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal kitty |
| TextEdit | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor TextEdit |
| VSCodium | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor VSCodium |
| BBEdit | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor BBEdit |
| Visual Studio Code - Insiders | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor Visual\ Studio\ Code\ -\ Insiders |
| TextMate | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor TextMate |
| CotEditor | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor CotEditor |
| MacVim | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor MacVim |
| Typora | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor Typora |
| Neovim | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor neovim |
| Nova | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor Nova |
| Cursor | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor Cursor |
| AppCode | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor AppCode |
| CLion | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor CLion |
| GoLand | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor GoLand |
| IntelliJ IDEA | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor IntelliJ\ IDEA |
| PhpStorm | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor PhpStorm |
| PyCharm | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor PyCharm |
| RubyMine | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor RubyMine |
| WebStorm | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor WebStorm |
| Android Studio | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor Android\ Studio |
In particular, if you want to use a custom application as the default, then you can also use this command. Take GitHub Desktop as an example.
defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal GitHub\ Desktop
If you select Neovim as your editor, the app will use Kitty as the default terminal. To switch to a different terminal (supported options: Alacritty, WezTerm, and Kitty), update the configuration with the following command. Adjust the Neovim path (/opt/homebrew/bin/nvim in this example) to match your installation:
defaults write wang.jianing.app.OpenInEditor-Lite NeovimCommand "open -na Alacritty --args -e /opt/homebrew/bin/nvim PATH"
Other terminal configurations:
// kitty:
"open -na kitty --args /opt/homebrew/bin/nvim PATH"
// WezTerm:
"open -na wezterm --args start /opt/homebrew/bin/nvim PATH"
// Alacritty:
"open -na Alacritty --args -e /opt/homebrew/bin/nvim PATH"
The default launch behavior for kitty is to open a new instance for each command, like the following:
open -na kitty --args --single-instance --instance-group 1 --directory
If you want to customize this behavior, you can run the following command in your terminal. Make sure to replace the open command as what you want:
defaults write wang.jianing.app.OpenInTerminal-Lite KittyCommand "open -na kitty --args --single-instance --instance-group 1 --directory"
I provided several icons along with the app in the release page.
<div> </div>You can right click on the app and select Get Info. Drag the icon to cover the default icon.
This procedure is particularly useful for those using the automatic dark/light mode switching feature of macOS.
/Applications folder, or by using Homebrew:brew install --cask hammerspoon
brew install fileicon
Create the ~/.hammerspoon/Icons folder and put the icons there
Create the ~/.hammerspoon/init.lua file (if it doesn't already exist) and add the following code:
local function setOpenInEditorLiteIcon(dark)
-- Change the path in case of a different install location
local appPath = "/Applications/OpenInEditor-Lite.app"
-- Change the type accordingly to the icon you want to use (editor, atom, sublime, vscode)
local iconType = "editor"
local iconsFolder = hs.fs.currentDir() .. "/Icons"
local theme = dark and "dark" or "light"
hs.execute('fileicon set "' .. appPath .. '" "' .. iconsFolder .. "/icon_" .. iconType .. "_" .. theme .. '.icns"', true)
end
local function setOpenInTerminalLiteIcon(dark)
-- Change the path in case of a different install location
local appPath = "/Applications/OpenInTerminal-Lite.app"
-- Change the type accordingly to the icon you want to use (terminal, iterm, hyper)
local iconType = "terminal"
local iconsFolder = hs.fs.currentDir() .. "/Icons"
local theme = dark and "dark" or "light"
hs.execute('fileicon set "' .. appPath .. '" "' .. iconsFolder .. "/icon_" .. iconType .. "_" .. theme .. '.icns"', true)
end
local function updateIcons()
darkMode = (hs.settings.get("AppleInterfaceStyle") == "Dark")
setOpenInEditorLiteIcon(darkMode)
setOpenInTerminalLiteIcon(darkMode)
end
updateIcons()
hs.settings.watchKey("dark_mode", "AppleInterfaceStyle", function()
updateIcons()
end)
You can now reload the config file (or restart hammerspoon) and you're done! The icons should automatically update when switching from light to dark mode and vice versa. Don't forget to check the "Launch Hammerspoon at login" option.
When you are using iTerm, you can set a default to open a new tab or window. The default is to open a new window.
# Open a new Tab
defaults write com.googlecode.iterm2 OpenFileInNewWindows -bool false
# Open a new Window
defaults write com.googlecode.iterm2 OpenFileInNewWindows -bool true
All the contributors who have helped with the development of OpenInTerminal-Lite.