Skip to content

希望加入显示麦克风等使用状态 #162

Description

@wwsksajd

检测设备麦克风 位置 摄像头的使用状态 显示不同颜色的灯在灵动岛上

可以把高级设置变成插件 加入插件就能获得状态颜色点的自定义设置选项(类似自定义图标和颜色和下方额外想法的可选项) 防止出现太多选项 看着杂乱

使用状态和记录都在windows注册表 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore

似乎应用正在使用时,LastUsedTimeStop 为 0
可以用终端验证

$base = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore'
'location','microphone','webcam' | ForEach-Object {
  $p = Join-Path $base $_
  Get-ChildItem $p -Recurse -ErrorAction SilentlyContinue | ForEach-Object {
    $props = Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue
    if ($props.LastUsedTimeStop -eq 0) {
      [PSCustomObject]@{
        Type  = $_
        Path  = $_.Name
        Start = $props.LastUsedTimeStart
      }
    }
  }
}

图标例子
摄像头:绿色圆点
麦克风:橙色圆点
位置:圆形蓝色背景中间白色纸飞机图标

额外想法
[可以变为可选项]开了自动隐藏灵动岛就算有显示这三样也会隐藏
在播放音乐时隐藏图标或显示在音频条右边
可以自己选择是否开关这个功能

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedAllows contributors to submit PRs | 允许贡献者提交prP-LowPriority Low | 低优先级enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions