koekeishiya / skhd

Simple hotkey daemon for macOS
MIT License
6.29k stars 209 forks source link

Calling chrome-cli via custom script does not work #279

Open caltuntas opened 1 year ago

caltuntas commented 1 year ago

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

koekeishiya commented 1 year ago

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"

This is likely what is happening. I can't think of a solution immediately, so you'll probably have to do some digging on your own.