Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

Managing (or setting) the Mini TouchBar Control Strip

$
0
0

While Apple documented how to customize the TouchBar, a macadmin or intrepid user may want to configure it via CLI tools.

The following is a brief overview on how to quickly set these defaults.

The Control Strip

The Control Strip is the persistant, right area of the Touch Bar. You can customize four quick use actions.


Managing (or setting) the Mini TouchBar Control Strip

You can customize it through System Preferences -> Keyboard -> Customize Touch Bar

Once there, a GUI overlay will be displayed, allowing you to drag the desired customization directly to the Touch Bar.


Managing (or setting) the Mini TouchBar Control Strip
How to configure the Control Strip The values

As of 10.12.1, these are the following values you can configure.

* com.apple.system.brightness

* com.apple.system.dashboard

* com.apple.system.dictation

* com.apple.system.do-not-disturb

* com.apple.system.input-menu

* com.apple.system.launchpad

* com.apple.system.media-play-pause

* com.apple.system.mission-control

* com.apple.system.mute

* com.apple.system.notification-center

* com.apple.system.screen-lock

* com.apple.system.screen-saver

* com.apple.system.screencapture

* com.apple.system.search

* com.apple.system.show-desktop

* com.apple.system.siri

* com.apple.system.sleep

* com.apple.system.volume

I think they are fairly easy to comprehend, so I will not be detailing each value.

Option 1 Yucky UNIX command

Use this method to quickly set the default values for your users. This could be a login-once script via outset or something similar.

Just know that by using this truly terrible method, a California macadmin loses their wings.

defaults write ~/Library/Preferences/com.apple.controlstrip MiniCustomized -array '(com.apple.system.do-not-disturb, com.apple.system.media-play-pause, com.apple.system.sleep, com.apple.system.screen-lock )' Option 2 Apple Approved Profile

By installing a profile on your devices, you can force a configuration for all users of the TouchBar.

While this might be an “Apple approved” management process, it is clunky for the following reasons:

* The GUI does not inform the user that their TouchBar is being managed.

* The user can customize their TouchBar on top of the management, but after a reboot or logout/login, it will be re-configured per the profile.

If you would like a profile example, you can find one here . This example configures the ControlStrip in the exact way as the yucky UNIX command.

Note:

While your mileage may vary, you could configure the profile to use a Set-Once value versus a Forced value. This will be similar to a defaults write however it is not gauranteed to work.

For an example profile, see here .

Option 3 Chef dynamic profiles.

This is my preferred option as you can manage the configuration of the profile, while also extending the attributes to your userbase.

A user could configure all of their machines with the following chef code:

# Configure MiniBar for DND, Play/Pause, Sleep, & Screen Lock node.default['cpe_controlstrip']['MiniCustomized'] => [ 'com.apple.system.do-not-disturb', 'com.apple.system.media-play-pause', 'com.apple.system.sleep', 'com.apple.system.screen-lock' ]

Please note that this requires the cpe_controlstrip cookbook, which you can find here

Final Notes

If you have not noticed, in all examples, there are four values set. This is because there are exactly four “buttons” you can customize. Make sure that whichever mechanism you deploy has all four values configured.

While some macadmins hate over-managing configurations, there is some benefits to this approach:

1. You can now configure a shortcut key to instantly lock your devices. Your security team may love this.

2. Some users may never know or care to customize their Control Strip. This at least allows you to be consistent.

3. More than likely you know what’s best for your company, not Apple.


Viewing all articles
Browse latest Browse all 11063

Trending Articles