Comments (10)
Yes, We can incorporate an option in the preferences to allow users to select their default terminal. But for now, we can include a functionality that checks the user's preference. If a preferred terminal is set, the application will open that terminal; otherwise, it will default to the system's default terminal. As we introduce the ability to select the preferred terminal in the future, this functionality will seamlessly align with the new option and adapt accordingly.
from minisim.
Looks like NSWorkspace is commonly used to open terminal in a certain directory. Just by switching iTerm to Terminal we can achieve terminal opened in different directories. NSWorkspace.shared.openFile(filePath, withApplication: "iTerm")
However its not that simple to execute commands. Looks like apple script is the recommended way of doing so. What you could do is create a protocol something like a Terminal
which would have open() method for each terminal: iTerm
, Terminal
, Hyper
etc. that would run those apple scripts and that way we would have a clean architecture with a way of expanding to new ones.
from minisim.
@okwasniewski Shall I work on this
from minisim.
@gokul1099 Sure! Go ahead
from minisim.
@okwasniewski users preferred terminal means, whether the terminal the user set as default terminal or we have to ask the user to select the terminal they prefer to open the logcat
from minisim.
I would keep an option in Preferences with dropdown for iTerm.app
, Terminal.app
and others but I think we can implement it in the next iteration. So firstly let's implement this feature without it (keeping in mind that in the future we will change the terminal we are launching). What do you think?
from minisim.
@okwasniewski hey I need help on this. When I try to open the terminal and run the adb script for opening the logcat the terminal is opened but the adb command is not getting executed and terminal remain empty. I used shellout to with open command
try shellOut(to: "open -a (preferedTermial) --args bash -c(logcatCommand)")
I also tried using Process to execute this command even in that case terminal open up, but the add command is not getting executed. Do you have any idea on this ??
from minisim.
I think the easiest way to achieve this is with AppleScript:
osascript -e 'tell app "Terminal"
do script "adb logcat -v color"
end tell'
Im not sure however how this would work for iTerm
from minisim.
I think the easiest way to achieve this is with AppleScript:
osascript -e 'tell app "Terminal" do script "adb logcat -v color" end tell'
Im not sure however how this would work for iTerm
This is working for Terminal in case of iTerm the script should be like
tell application "Terminal"
set newWindow to (create window with default profile)
tell current session of newWindow
write text "adb -s emulator-5554 logcat -v color"
end tell
end tell
It is like different script for different terminal. Now I also trying this with NSWorkSpace.
from minisim.
@okwasniewski I have made one pull request please check
from minisim.
Related Issues (20)
- Issues with Pixel 7 Emulator
- Create Release Github Action
- New feature: Add UI for changing default terminal
- Incorrect Emulator list parsing HOT 4
- `getDevices` command seems to not work anymore HOT 2
- New Feature: Display connected devices to allow copying name, udid, or pasting to Android device HOT 2
- Rewrite to SwiftUI's MenuBarExtra
- Issue: error after clicking Minisim menu item HOT 2
- New feature: Search input above emulator list to filter them
- New feature: handle case when there is no space in the MenuBar
- Add SwiftLint to codebase HOT 3
- New feature: delete android emulator HOT 2
- Enable `force_unwrapping` SwiftLint rule
- Enable `implicitly_unwrapped_optional` SwiftLint rule
- Enable `no_magic_numbers` SwiftLint rule HOT 2
- Create GitHub Actions pipeline for SwiftLint
- New feature: add check for updates button to the Main menu
- New feature: Indicate that there is available update
- Feat: Connect device via WiFi HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minisim.