V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Asuler

mac 新手,请教一个 mac 使用上的问题

  •  
  •   Asuler · Aug 17, 2024 · 2815 views
    This topic created in 631 days ago, the information mentioned may be changed or developed.

    我有一个外接移动硬盘,我想一直插在我的 macbook 上。 问题是,只要 macbook 锁屏一段时间后,重新进入桌面时,右上角就会跳出硬盘未正确推出的消息 特别是晚上睡一觉,第二天起来时,右上角会弹出一堆这个消息

    移动硬盘不能一直连着吗?有没有办法可以解决?

    8 replies    2024-08-19 16:07:17 +08:00
    cJ8SxGOWRH0LSelC
        1
    cJ8SxGOWRH0LSelC  
       Aug 17, 2024
    休眠的时候,usb 断电了吧
    Asuler
        2
    Asuler  
    OP
       Aug 17, 2024
    @StinkyTofus 我不知道呀,应该是吧,有办法能解决吗
    joker999
        3
    joker999  
       Aug 17, 2024
    @Asuler 那你休眠前退出不就行了。
    Asuler
        5
    Asuler  
    OP
       Aug 17, 2024
    @joker999 我想一直插着移动硬盘呀,有时候就忘记推出了
    jorneyr
        6
    jorneyr  
       Aug 18, 2024   ❤️ 1
    可以使用 Hammerspoon 的监听合上本子后 Eject 移动硬盘,参考下面的方式进行实现。

    -- 系统事件监听回调函数,事件类型可参考 https://www.hammerspoon.org/docs/hs.caffeinate.watcher.html
    -- 系统休眠时关闭蓝牙: https://gist.github.com/ysimonson/fea48ee8a68ed2cbac12473e87134f58
    function watchCallback(event)
    -- 18 点后休眠时才自动关闭蓝牙
    local hour = os.date("*t").hour
    if event == hs.caffeinate.watcher.systemWillSleep and hour >= 18 then
    hs.execute("/opt/homebrew/bin/blueutil -p 0")
    end

    if event == hs.caffeinate.watcher.systemWillSleep then
    -- 关闭无线
    hs.execute("networksetup -setairportpower en0 off")
    end

    if event == hs.caffeinate.watcher.systemDidWake then
    -- 打开无线
    hs.execute("networksetup -setairportpower en0 on")
    end
    end

    watcher = hs.caffeinate.watcher.new(watchCallback)
    watcher:start()
    Kothy
        7
    Kothy  
       Aug 19, 2024
    我的移动硬盘一直用 c 口插着,没有出现过这种情况,要不换根 C 口线试试?
    nb85144
        8
    nb85144  
       Aug 19, 2024
    我一直开机不休眠,锁屏重新点亮,没出现过你说的问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4435 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 05:27 · PVG 13:27 · LAX 22:27 · JFK 01:27
    ♥ Do have faith in what you're doing.