V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
arare
V2EX  ›  macOS

macOS 的 Chrome 能否按照用户创建快捷方式?

  •  
  •   arare · 2022-11-16 10:25:05 +08:00 · 1783 次点击
    这是一个创建于 498 天前的主题,其中的信息可能已经有所发展或是发生改变。

    由于要经常在 Chrome 不同用户(大于 4 个)之间切换, 用 command+tab 可以切换,但是效率比较低。 因此想看下,有没有办法把 Chrome 里面每个用户创建一个 [快捷方式] ,然后用 raycast/alfred 等设置快捷键快速准确进入?

    PS:Windows 下,Chrome 每个用户都可以在桌面创建一个快捷方式的

    11 条回复    2022-11-16 23:23:18 +08:00
    zhaoxin
        1
    zhaoxin  
       2022-11-16 10:38:05 +08:00
    怎么感觉楼主的职业是骗子?🐒
    arare
        2
    arare  
    OP
       2022-11-16 10:56:58 +08:00   ❤️ 1
    @zhaoxin 会不会说话,不会说就别说,有毛病就去看医生。龌龊的人才有龌龊的想法。用到多用户的场景多了去了
    zhaoxin
        3
    zhaoxin  
       2022-11-16 11:23:44 +08:00   ❤️ 1
    @arare 多用户的场景是多,但是最需要的就是骗子啊。再说骗子就一定龌龊吗?你就不能干一行爱一行?🐒
    arare
        4
    arare  
    OP
       2022-11-16 11:25:48 +08:00   ❤️ 2
    @zhaoxin 有病
    bear1man
        5
    bear1man  
       2022-11-16 13:21:21 +08:00
    刚刚试了一下
    办法 1:dock 栏右键 Chrome ,然后选择不同的 Profiles

    办法 2:
    $ open -n -a "Google Chrome" --args --profile-directory="Default"
    $ open -n -a "Google Chrome" --args --profile-directory="Profile 1"
    $ open -n -a "Google Chrome" --args --profile-directory="Profile 2"

    参考:https://superuser.com/questions/759535/open-google-chrome-specific-profile-from-command-line-mac
    set
        6
    set  
       2022-11-16 13:24:17 +08:00
    +1, 目前有同类需求
    Raycast: 目前没找到合适的快捷方式.
    1. raycast 弹出窗口里输入"chrome"只有一个应用启动方式,默认调用"Default" Profile
    2. 配置"Create Quicklink",在"open with"下拉框里只有个"Chrome (Default)"选项,并且不能定制
    Google 后也没有找到解决方案,有知道的大佬麻烦给说明下

    Command+Tab: 确实只能切换到最后一次激活的 Chrome 窗口,不能选择
    Command+`临时能用一下, 但也不是个 solution, 只能算是能用
    四指上划(目前使用的方式)可以选择同一 workspace 内的 chrome 窗口, 但也多了一个步骤
    set
        7
    set  
       2022-11-16 13:28:13 +08:00
    @bear1man 这是个启发,刚刚在 raycast 里配置了下, 现在可以通过 raycast 输入命令直接打开指定 Profile 的 chrome 窗口了
    ```bash
    #!/bin/bash

    # Required parameters:
    # @raycast.schemaVersion 1
    # @raycast.title Chrome Shopee
    # @raycast.mode silent

    # Optional parameters:
    # @raycast.icon 🤖

    open -n -a "Google Chrome" --args --profile-directory="Profile 2"
    ```
    arare
        8
    arare  
    OP
       2022-11-16 16:05:03 +08:00
    @bear1man 非常感谢,我试下
    arare
        9
    arare  
    OP
       2022-11-16 16:07:42 +08:00
    @set 好,感谢👍
    arare
        10
    arare  
    OP
       2022-11-16 17:00:00 +08:00   ❤️ 1
    刚才找了下资料,发现用系统自带的 shortcut 就可以实现我的需求了

    1 、打开 system preference-keyboard shorcut-app shortcut
    2 、添加 shortcuts ,选择 Google Chrome app
    3 、关键一步,menu title 填上完整的 Chrome profile 名称,这里注意要填 profile 的全称。例如我有些 profile 是登录了 Google 帐号的,全称是类似这样:Abc.Gmail (Chrome 1)
    4 、设置 shortcut ,这里注意要设置复杂一些的按键组合,比如 command+shift+option+1 ,防止跟原有的快捷键冲突。

    设置好之后,在 Chrome 里面,按 command+shift+option+1 即可跳转到 Abc.Gmail (Chrome 1) 这个 profile
    szzhiyang
        11
    szzhiyang  
       2022-11-16 23:23:18 +08:00
    macOS 的快捷方式(替身)太弱了,完全不支持参数,这点确实不如 Windows 。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5281 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:34 · PVG 17:34 · LAX 02:34 · JFK 05:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.