13

I got the new Macbook Pro and i found out that the touch bar goes to sleep after 75 seconds of inactivity. This function is quite annoying to me.

Is it possible to disable the sleep function of the touch bar for the 75 seconds of inactivity? I have googled it, but i didn't find anything.

  • 1
    Did you try the preference pane? I think it is in System Preferences > Energy Save. You could also search the System Prefs. pane in the top right corner, try searching there for something like "Touch Bar" – Jules Jan 17 '17 at 12:17
  • Yeah, but there isn't a property to disable the sleep function and the search does not show viable results. – Batajus Jan 17 '17 at 12:42
  • I want this too, but is there any risk of burn-in on the display if it's always on? I saw an apple watch that was pretty badly burnt in in an Apple store. So if it's the same type of display, then it might be bad to keep it always on. – Niclas Jan 18 '17 at 8:26
  • 1
    I think it could be possible, but otherwise, if you are working the whole day with the Macbook the Touch Bar does not go to sleep. I think the risk for a burn-in is very low, but i'm not sure. – Batajus Jan 19 '17 at 9:07
6

You can use my script until Apple adds a preference for the Touch Bar.

It simulates keyboard activity by sending the command for the fn-key every 60 seconds. You should not notice it while typing. Keep in mind, however, that this will prevent display sleep / system sleep as well.

Copy and paste the following code into the "Script Editor" application on your MacBook Pro with Touch Bar:

(*
1. Save as an Application: Script Editor > File > Export… > File Format: Application
2. Check "Stay open after run handler"
3. Run the app or add it to your login items: System Preferences > Users & Groups > User > Login Items > Press the "+" button

# http://apple.stackexchange.com/questions/269174/disable-the-sleep-function-of-the-macbook-touch-bar
*)

on idle
    tell application "System Events" to keystroke (key code 63) -- press fn key
    delay 60
end idle

Please let us know if this solves your issue.

  • 1
    I found out that 60 seconds interval is too long, 30 seconds works for me – Patrick Hund Jan 20 '18 at 16:46
5

As an alternative to oa-'s script (looks great, but I'd rather not forego the display sleep functionality), I searched far and wide for any other solution. I found no complete one, but here's a partial one that might alleviate the worst part of the pain. I find that the single most annoying thing about the disappearing Touch Bar is its effect on the esc key. I use that all the time! Now you have to tap the bar twice: once to wake it up, and then again to press esc. (Or alternatively, press the fn key to wake up the bar, then press esc.)

Here is a way to at least rescue esc functionality by adding it to what remains of the physical keyboard. You can remap the caps lock key to be your esc key. You'll lose caps lock functionality, which is also a drawback, but maybe not as bad as losing esc. (Alternatively, you can remap the control, option, or command key instead.) Go to System Preferences > Keyboard > Modifier Keys, and use the drop downs to choose the action you want.

https://www.imore.com/how-use-esc-key-touch-bar-macbook-pro

  • (Personally, I haven't decided yet whether this is worth it. Retraining myself to hit caps lock instead of esc might be more trouble than it's worth. But will try it out...) – Sharon Minsuk Mar 17 '18 at 18:02
  • 2
    You can also use Karabiner to remap a key to Esc in advanced, customizable ways. For example, you can make it so that pressing Ctrl sends Esc but holding Ctrl acts as normal, or you can make it so that Caps Lock acts as Esc in Emacs and MacVim but acts normal in other applications. – Rory O'Kane Oct 18 '18 at 1:33
2

I found @oa-'s answer useful. I used their script as posted in the answer.

(*
1. Save as an Application: Script Editor > File > Export… > File Format: Application
2. Check "Stay open after run handler"
3. Run the app or add it to your login items: System Preferences > Users & Groups > User > Login Items > Press the "+" button

# http://apple.stackexchange.com/questions/269174/disable-the-sleep-function-of-the-macbook-touch-bar
*)

on idle
    tell application "System Events" to keystroke (key code 63) -- press fn key
    delay 60
end idle

However it adds the applescript application to switcher which is an annoyance to me. To remove the script from the Cmd+Tab switcher, find the applescript application and edit its Info.plist file (right click the app file -> Show Package Contents, open Info.plist with text editor). You should add

<key>LSUIElement</key>
<string>1</string>

to it so it becomes hidden from app switcher. If you want to trace & kill the app later, use the terminal to hunt it down: ps aux | grep YOUR_SCRIPT_NAME and kill PROCESS_ID.

Used for assistance: https://apple.stackexchange.com/a/92017/123820

  • As another suggestion, try out open source project "My Touchbar My Rules" offering full customization of touchbar. github.com/Toxblh/MTMR – maricn Jan 3 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .