Closed tijptjik closed 5 months ago
I'm willing to bet it's tripping over the double quotes in your list_cmd
. The string handling isn't that sophisticated in these areas, sorry.
One idea would be to place the actual code in a separate shell script and reference that in your provider.
Thank you! That did the trick. For reference, providers.conf
[brotab]
list_cmd=/home/io/.config/sway-launcher-desktop/brotab.sh
preview_cmd=/usr/local/bin/bt list | grep '{1}' | awk -F'\t' '{print $NF}'
launch_cmd=/usr/local/bin/bt activate '{1}'
purge_cmd=/usr/local/bin/bt list | grep '{1}' || exit 43
and brotab.sh
#!/usr/bin/env bash
/usr/local/bin/bt list | awk -v FS='\t' -v OFS='\34' '{print $1,"brotab","🦊 " $2,$3}'
Though the launched items end up in the cache / history file, so to keep the tab listing current the history either needs to be disabled, or ./sway-launcher-desktop.sh purge
needs to be called before each invocation.
In an attempt to use brotab as a provider, I've added the following to
providers.conf
however, it results it the following error message upon launching sway-launcher-desktop
while directly running the
list_cmd
in the shell seems to produce desirable resultsWhat could be wrong with the list input, or would you have further suggestions on how to troubleshoot this issue?