How to manipulate OSX Lion desktop spaces in Terminal - macos

I'm specifically hoping to find out if there is a way to create a new Mission Control desktop space using the Terminal, or even using Automator.
My apologies if this is a trivial question. I'm fairly new to using the Terminal and I've been googling things having to do with Terminal manipulation of desktop spaces/Mission Control to no avail.

Related

On macOS how can I open a gui .app hidden or off screen?

I have a cross platform need to open a gui application programmatically, but keep it hidden from the user. Effectively, I want a command line driven interface to act as a wrapper over this gui app, and insulate the end user from seeing or interacting with it. The program is from a third party, I did not write it, and I can't edit it.
I can do this one way or another on Windows, on Linux, and (in theory) on older versions of Mac, but not the most recent ones. On Windows, I can use the native api ShellEx with a hide window parameter. It's very easy and straight forward. In Linux, I can can render a gui app to a virtual frame buffer (using xvfb).
On macOS, the open command has a --hide and --background option, but they don't have any effect (at least on this app...)
I tried changing the plist file and found that LSUIElement will hide the app from the docker, but it still shows up on the screen. LSUIPresentationMode=4 or 3 OUGHT to work for exactly this, but apparently that doesn't do anything anymore as of a few os versions ago...
I tried the approach of moving the .app off of the screen with AppleScript. That works, but you have to manually grant permissions for such a thing to occur via System Preferences. In prior versions of Mac, those permissions could be twiddled on the fly via sqlLite (so long as you had sudo rights), but now they blocked that too. You can only pull that off apparently through a process of disabling "SIP" and forcing a reboot. That is totally outside the realm of what I want.
I've tried using the xvfb approach on Mac (jumping through hoops to acquire the binary they use to include stock, and now dropped), but I'm not having luck with that. I don't think it's possible to direct a mac .app to another display is it? A .app does not render on X11 by it's nature right?
What other clever ways might there be to hide a third party app on a mac? (and that still works in most recent os versions!)

How to add custom keyboard shortcut for terminal in apple macbook pro

I don't think there is any pre-defined keyboard shortcut for opening terminal in macbook pro. I am about to start bash so really need to call up terminal fast. Can't use spotlight every time & then write Terminal their and call it. I just bought mac so i am getting familiar with all the custom keyboard shortcuts. I searched a lot on google but i couldn't find a way to add shortcut. I was using Linux Distro's before. Adding terminal shortcut is pretty easy in linux. In some distro's its predefined with ctrl+T key. Please let me know the easy way. Thanks in advance.
I recommend using iterm2 or total terminal.
You can use control + ' to bring down a terminal whenever you need it.

How to create a Windows application that: detects current program and sends shortcuts

I would like to create an application for Windows that is visible in the system tray and can detect the current open window. The application that I want to make should also be able to "press on the users keyboard": sending out keyboard shortcuts to the current open window/application.
How would I go about doing this? What programming languages/tools would be useful?
Best would even be if it is portable to Mac, but this is not a must.
Portability: Not very likely you can find anything that is cross-platform for this.
For Windows: AutoIt. Does everything you want and a lot more.
For Mac: Applescript (standard component of OSX) can probably do this, but I could be wrong about that. I do have a Mac, but I never had a reason to play around with this sort of stuff.

Calling a command line in MONO on MAC OS X

I want to be able to call the automator or unix commands like ls from a mono app and ge the results back.
This can be accomplished on windows easily. The question is how is this done on the mac??
caveat: I've never written a char of mono in my life.
I imagine it's a matter of redirecting stdout and firing up a process. this linux forum shows that you can do pretty much that - OSX will behave mostly as a UNIX-like system for you, I reckon.
Oh by the way, if you want to fire up an OSX application, have a dig around inside the ".app" bundle. OSX shows these as a file, but they're actually directories. In the finder you can right-mouse click and "show package contents", or you can open up a terminal / command prompt and cd into them. For instance, you can launch the Automator like this from the terminal:
/Applications/Automator.app/Contents/MacOS/Automator
I don't know if you would want to go down this route, but if you're going to be interfacing with OSX (gui) apps, you might want to look at using Applescript as some "glue" between Mono and the app.

Synergy between mac and pc change mac hotkeys

Synergy is a program that enables you to use the same mouse and keyboard in two computers. I have a PC and mac connected directly with an Ethernet cable therefore the connection is great and it seems as if there is only one computer.
I am developing an iPad application and the only software that I have found that supports iwebkit for CSS is Expresso. I use that to edit my CSS files in the mac and I use dream weaver on my PC to edit PHP, HTML and JavaScript files. The only problem is that I am constantly using both computers to develop the application and its very frustrating using different shortcut keys for each computer. It would be very nice if I could use the same hot-keys on both computers.
So far I have tried:
Changing the modifier keys in the keyboard section under system preferences in the mac. That works but just with the keyboard from the mac not with the keyboard that I am using with synergy that controls both computers.
Creating applescripts that what they do is to send a shortcut key then compiling them and saving them as an application. After they are saved as an application I go to system preferences and try to run them with a different shortcut key. when I create that shortcut key system preferences crashes and closes without saving the changes.
Creating shortcut keys in synergy which it works but only in one computer. Synergy will always send the same keystroke regardless on which computer you are using.
Lastly I have tried looking for "IronAHK" which in a lot of posts people say it modifies the mac hotkeys but I have not been able to find it for the mac.
Is there a way to have the same universal access keys across my machines?
THe following article was very helpful for me (working from a Mac, controlling a PC):
http://www.nextofwindows.com/how-to-properly-map-keyboard-between-mac-and-pc-when-share-mouses-with-synergy/
Step 1: Configure Server
Step 2: Double-click on the PC (or Mac if the Server is a PC)
Step 3: Toggle the key Ctrl and Super to mirror each other
When adding a new computer in synergy you can change command and control keys. Here is an example in windows. I was not able to find it because synergy place this in a location where I never thought I could find it.
Now I can use control + c to copy files both in the mac and in the pc and most of the command such as control + a to select everything etc. To fix the other issues so that I can use 'home' to go to the beginning of the line for example I use the program provided by Evan Moran which was the first answer in this post.
For the mac I use KeyRemap4MacBook. It is pretty good for being free.
That said, consider using different source editors so that you can code only on one system. This will make your life a ton easier. Dreamweaver is not necessarily the best. Visual Studio is pretty good on Javascript, CSS, and HTML, and their express versions are free.
If all you need is syntax highlighting EditPlus is great on the PC and will work on all languages you mentioned. If you need to stay on a mac then TextWrangler is great as a basic source editor. Both have free trials. Good luck!

Resources