niji
V2EX  ›  Apple

刘海屏怎么让菜单栏按不同应用隐藏

  •  
  •   niji · Sep 8, 2023 · 2308 views
    This topic created in 1157 days ago, the information mentioned may be changed or developed.

    比如 Safari 、Chrome ,全屏的时候我希望菜单栏不隐藏。 在用视频播放器看视频的时候,希望菜单栏隐藏。

    4 replies  •  2023-09-09 13:48:16 +08:00
    OYSTER2DO
    OYSTER2DO
    Sep 8, 2023
    1
    macOS 应该没有这么厉害吧,毕竟连个菜单栏折叠都没有
    jorneyr
    jorneyr
    Sep 8, 2023
    2
    感觉 Hammerspoon 能做到:

    1. 监听程序切换,这个功能有
    2. 切换的时候修改系统配置的 defaults ,这个功能也有

    剩下的就是研究修改哪些系统的配置项了。
    niji
    niji
    OP
    Sep 8, 2023 via iPhone
    3
    @jorneyr 感谢提供思路
    codehz
    codehz
    Sep 9, 2023
    4
    单独显示菜单栏可以用
    defaults write com.example.SomeApp AppleMenuBarVisibleInFullscreen -bool true
    中间替换成需要设置的 app bundle id
    撤销可以
    defaults delete com.example.SomeApp AppleMenuBarVisibleInFullscreen
    其中 id 可以用 osascript -e 'id of app "TextEdit"' 查询
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1547 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 11:43 · PVG 19:43 · LAX 03:43 · JFK 06:43
    ♥ Do have faith in what you're doing.