Now make the button
You do this once, in the Shortcuts app (快捷指令). Come back here to copy each piece.
Open Shortcuts, tap +, and name it Headphones.
Call the PC
Add Get Contents of URL 获取 URL 内容. Paste this address:
Open that action with its arrow. Set Method 方法 to POST.
Under Headers 头部, add one. Paste the name on the left and the key on the right:
Keep the phone quiet
Add If 如果: Contents of URL URL 的内容 is 是 pc.
Inside If, add Set Focus 设定专注模式: turn Do Not Disturb 勿扰模式 On, until turned off.
Inside Otherwise 否则, add Set Focus again: turn Do Not Disturb Off.
Put it in reach
Settings → Accessibility → Touch → Back Tap 轻点背面 → Double Tap → Headphones. Or add it to Control Center.
Do Not Disturb also silences calls. To let calls through: Settings → Focus → Do Not Disturb → People.