在某些应用程序中,自动隐藏菜单栏相当烦人,因为让所有应用程序都始终显示菜单栏对我来说有点奇怪。下面是我在使用 defaults
命令查看设置后找到的解决方案:)
defaults write com.example.SomeApp AppleMenuBarVisibleInFullscreen -bool true
恢复
defaults delete com.example.SomeApp AppleMenuBarVisibleInFullscreen
将 com.example.SomeApp
替换为您要应用此功能的应用程序的捆绑标识符,例如,您可以使用 osascript -e 'id of app "TextEdit"'
来计算捆绑标识符是什么,这样就可以得到 com.apple.TextEdit
。
如果你在系统偏好设置中开启了该选项,也可以反其道而行之,将上述命令中的 true
替换为 false
,菜单栏将再次自动隐藏该特定应用程序。