With osascript/applescript or bash, how can one move the currently focussed/foregrounded window to the desktop on the right?
When doing this manually by hand, I first click and hold mouse on the title bar of a window, then press Control-2 (2 means second desktop)
But I want to automate this.
Related
How can I configure PhpStorm to use the "non-native" fullscreen mode? I'd like PhpStorm to be fullscreen (without the macOS top menu bar, etc), in the same window (without creating a new window that I have to scroll between).
The terminal for macOS iTerm2 have this setting. You can choose to remove the tick from "Native full screen windows". When this tick is removed, the fullscreen mode will simply take out all space in the window, without creating a new separate window.
Native fullscreen example
Notice how a new separate "window" is created called "PhpStorm"
Non-native fullscreen example
Notice how theres still one window called "Desktop". The iTerm window fills out the whole screen though.
the only way you can do it at the moment is by adjusting the dock in mac to hide menu automatically and then spread the editor to wider and higher setting
click right on the dock in mac and goto settings and hide menu works for me
i am suffering from same issue lol after i saw iterm2 :P
In OS/X 10.11 (EL CAPITAN): How do you make the previous app window the active app? For example, if I open Excel, then open Word, then open another Excel window, when I close the last (active) Excel window, I want to go back to the Word window as active, but OS/X makes the first Excel window active rather than the Word Window.
That's because macOS isn't Windows. ;)
macOS is "application centric" not "window centric".
When you open that second Excel window, the Excel app becomes the active (front-most) application again. When you close a window in an app, the next window in its stack becomes the active window. If the app has no more windows, it's still the active app, there just isn't an active window.
This is because in macOS, the application's interface (menu bar, keyboard shortcuts, etc.) follow the active app—they aren't attached to windows, as they are in Windows, which is, by the way, how "Windows" got its name.
So what you don't want is to close a window and have all of your commands disappear on you, which is what would happen if the OS switched apps when you closed that most recent Excel window. Once you open or activate a macOS app, it stays the active app (along with all of its windows) until you Quit it or explicitly switch apps (by, say, clicking on the window of another app).
Press CMD+TAB to see all applications opened.
Using left-right arrows select Finder.
Using up-down arrors open Finder windows selection.
Using arrows select (get blue border) Finder window.
And now how can I open selected finder window?
Just hit the ENTER/RETURN key.
Tested locally on Yosemite 10.10.5. It may matter that I release the command key after up/down on Finder, before left/right selecting the window and hitting ENTER.
On MacOS El Capitan (10.11) and prior it was possible to move between spaces using the following AppleScripts:
-- Move Left a Space
tell application "System Events"
key code 123 using control down
end tell
-- Move Right a Space
tell application "System Events"
key code 124 using control down
end tell
On MacOS Sierra (10.12) these scripts will no longer move between spaces. However, when pressing the keyboard shortcut Ctrl+Left or Ctrl+Right on the keyboard, MacOS Sierra still moves between spaces.
Strangely enough, when these scripts are run while Xcode is activate, Xcode's text editor cursor will move one word left or right. If these shortcuts (Ctrl+Left, Ctrl+Right) are however pressed on the keyboard, Xcode will not jump between words, but MacOS Sierra will still move between spaces.
It looks like MacOS Sierra has changed the way how keyboard shortcuts are handled by the OS when executed through an AppleScript. They don't execute the same function any longer as when pressed manually on the keyboard.
Now on MacOS Sierra keyboard shortcuts executed with AppleScript will perform the specific action in the active app that's assigned to the keyboard shortcut. MacOS Sierra seems to ignore global shortcuts such as moving between spaces in these cases. Whenever pressed manually, keyboard shortcuts will execute system wide actions and ignore app specific actions, e.g. Xcode will not move between words when Ctrl+Left is pressed manually.
How did this behavior change from El Capitan to Sierra exactly and how can AppleScript again execute global system keyboard shortcuts?
I've installed the Gnuplot version 4.6.6 on my MacBook with Mac OS X 10.9.5. For the X11 terminal I'm using XQuartz 2.7.7.
Everything works fine, except that the mouse functionalities, as zooming, are not working. The X11 terminal recognises the mouse, as the coordinates are updated as I move the mouse on the window, but I'm unable to zoom with the right clic. On my previous Mac (OS X 10.6.8) the mouse was working just fine...any hint?
I found the problem: Gnuplot is expecting a right-clic with the mouse, but the default settings for trackpad assume "Secondary click" by tapping with two fingers.
You can keep this setting, and just modify XQuartz settings: X11 ---> Preferences ---> input, then flag "Emulate three button mouse". In this way, by holding option or command while clicking on the the trackpad, the click is interpreted as a right-click, hence allowing one to zoom.
You can "right-click" by touching the track pad with two fingers and pressing (i.e. clicking). In this situation you have to click the track pad and not just tap.
You can also tap with two fingers twice, keeping your two fingers on the pad after the second tap until the curser changes shape, then lift your two fingers from the pad. This action locks the track pad on secondary click. You can then use one finger to drag and draw your zoom-in box. Once you are happy tap once with one finger.