19cm

19cm

V2EX member #522781, joined on 2020-12-07 22:53:48 +08:00
Today's activity rank 3246
macOS 27 Golden Gate beta 5 来了
macOS  •  19cm  •  13 days ago  •  Lastly replied by 19cm
10
macOS 26 连接 smb 硬盘 每次都需要手动重新连接
macOS  •  19cm  •  Mar 15  •  Lastly replied by liuliangyz
3
求助 mac book pro m4 48g 1t 的
问与答  •  19cm  •  May 20, 2025  •  Lastly replied by peteretep
8
老哥们,支持代码块的思维导图软件有哪些啊?
问与答  •  19cm  •  Mar 23, 2024  •  Lastly replied by Rnreck
2
19cm's recent replies
7h 16m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #27 为啥要类似 cmd+tab, 我自己写脚本都实现了单键切换
-- 二进制路径
set bin to "/opt/homebrew/bin/SwitchAudioSource"

-- 设备定义
set device1 to "EarPods"
set icon1 to "🎧"

set device2 to "Yamaha YVC-330"
set icon2 to "🔈"

-- 获取当前设备 & 所有设备
set currentDevice to do shell script bin & " -c -t output"
set allDevices to do shell script bin & " -a -t output"

-- 判断存在性
set hasDevice1 to allDevices contains device1
set hasDevice2 to allDevices contains device2

-- ❌ 两个都不存在
if (not hasDevice1) and (not hasDevice2) then
display notification icon1 & " " & device1 & " 未连接 / " & icon2 & " " & device2 & " 未连接,暂不切换"
return
end if

-- ⚠️ 只存在 device1 ( device2 未连接)
if hasDevice1 and (not hasDevice2) then
do shell script bin & " -s " & quoted form of device1
display notification icon2 & device2 & " 未连接,已切换至" & icon1 & " " & device1
return
end if

-- ⚠️ 只存在 device2 ( device1 未连接)
if hasDevice2 and (not hasDevice1) then
do shell script bin & " -s " & quoted form of device2
display notification icon1 & " " & device1 & " 未连接,已切换至" & icon2 & " " & device2
return
end if

-- ✅ 两个都存在 → 正常切换
if currentDevice contains device1 then
do shell script bin & " -s " & quoted form of device2
display notification "已切换至: " & icon2 & device2
else
do shell script bin & " -s " & quoted form of device1
display notification "已切换至: " & icon1 & " " & device1
end if
8h 49m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #24 另外可以多加两个可配置快捷键项, 或者可以客户无限自己定义加,比如一个键快速 1 号二级,一个键切 3 号音响
这样灵活性高很多
8h 52m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #24 所以你放开单键就行了啊
10h 17m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #22 这不是很简单吗,你多个设置选项不就行行了, 一个快捷键顺序切换, 一个按你原来的
11h 6m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #20 所以要有排除设备的名单啊,比如 5 个设备,排除掉三个, 剩下的不就是在两个来回切了,f 区切是最方便点的,另外还要有记忆功能最好, 比如笔记本在家里 是哪几个设备,在公司又是哪几个设备
11h 22m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #16 本来就是切换到下一个就行啊
20h 22m ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai #16 建议改下, 切换快捷键 应该要能绑定单个 f 区按键, 比如 f12 f13 这种
不喜欢可以不用的
1 day ago
Replied to a topic by wafm MacBook Pro 求推荐一个 macbook pro 拓展坞
惠普 g2 不到一百
1 day ago
Replied to a topic by fl2d Apple macOS 下,能用快捷键切换音频输出设备么?
@hanguokai 链接有问题 直接发下 app 名字吧
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3133 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 14:12 · PVG 22:12 · LAX 07:12 · JFK 10:12
♥ Do have faith in what you're doing.