I want to be able to hide the cursor programmatically. I am okay with giving any required permissions to the script.


so what i just did was to download cursorcerer pref pane. then i unzipped it. then showed package contents. then simply double clicked the resource called cursorcerer.app. now my cursor is invisible -- even after moving. so you could call this app from the terminal. quite debilitating in my environment, but could be very helpful in others!


i was able to get my cursor back by running the preference pane.

  • I have this app, but as you said, you can’t get the cursor back. And I think the app doesn’t work in the latest macOS. – HappyFace Feb 15 at 19:21
  • i wonder how he is doing it inside that app. i showed contents of that, but nothing i can pick apart – neuralstatic Feb 15 at 19:27

You can use applescript to set the cursor to the current background color of the terminal window:

tell application "Terminal"
    set invisibleColor to get background color of (get properties of (get startup settings))
    set properties of (get startup settings) to {cursor color:invisibleColor}   
end tell

Use osascript to execute applescript within a shell script.

  • I want to hide it for everything. The reason I want to do it from the terminal is to set a loop that continuously hides the cursor, as it becomes visible after moving it a little. – HappyFace Jan 14 at 8:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.