asmvik / asmvik/skhd

Calling chrome-cli via custom script does not work

Open
#279 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.1k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

First of all I would like to thank since it has become one of the most important tools in my daily workflow. Recently I have decided to trigger a custom script and trigger "chrome-cli" utility. My script for testing is following

`ctrl + alt - b : zsh -c 'source ~/.zshrc; env > /tmp/cliinfo.txt; date 2>&1 >> /tmp/cliinfo.txt; echo "$PATH" >> /tmp/cliinfo.txt; brave-cli list tabs >> /tmp/cliinfo.txt;'
`
it writes all other outputs to text file, however when it executes, "brave-cli list tabs" it does nothing, no errors, no output. When I execute the same command, it lists all the currently open tabs.

It might be because of the permissions required, because when I triggered the above command manually for the first time, it had asked me the "automation permission for managing brave through iTerm", but doesn't ask the same for "skhd", or it's not possible to add this kind of permission manually though.

![image](https://github.com/koekeishiya/skhd/assets/35517929/fbbcb2a2-b82c-4cb6-bd2c-a5c13f74b26b)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Ctrl+Alt-B hotkey command and compare its environment with an interactive zsh session, including the recorded PATH and automation-permission behavior. Done means brave-cli list tabs produces the expected tab output when launched through skhd, or the failure is reported clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, zsh
Domain
cli, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.