sway-launcher-desktop icon indicating copy to clipboard operation
sway-launcher-desktop copied to clipboard

Suggestion: Sharing of providers

Open mapster opened this issue 1 year ago • 1 comments

Hi! I really love this tool. Amazingly how easy it is to extend by creating different provider configurations. I use the default providers for my application launcher, and I've created some simple providers for passwordstore and Yubikey OATH (using ykman). It would be nice to share providers through this repository as well.

If anyone is interested here are my providers:

[pass-provider]
list_cmd=find  ~/.password-store/ -name \*.gpg | sed 's:.*/.password-store/\(.*\)\.gpg:\1\o034pass-provider\o034\o33[31m 🔒\o033[0m\1:g'
preview_cmd=echo "Decrypt and copy to clipboard: {1}"
launch_cmd=pass -c {1}; notify-send "Copied {1} to clipboard"
purge_cmd=ls ~/.password-store/{1}.gpg || exit 43


[ykman-oath-provider]
list_cmd=ykman --device $(ykman list --serials | head -n 1) oath accounts list | sed 's/\(.*\):\(.*\)/\0\o034ykman-oath-provider\o034\o33[33m🔑 \o033[0m\1 - \2/g'
preview_cmd=echo "Copy OTP to clipboard: {1}"
launch_cmd=notify-send -u critical "🖣 Touch your yubikey..."; ykman --device $(ykman list --serials | head -n 1) oath accounts code {1} | tr -s ' ' | cut -d' ' -f2 | wl-copy -n; notify-send "Copied {1} to clipboard"
purge_cmd=ykman --device $(ykman list --serials | head -n 1) oath accounts list | grep {1} || exit 43

mapster avatar Jun 06 '23 10:06 mapster

Yes this is something I've been thinkind about as well. In larger projects, there would probably be a dedicated *-contrib-repo, but for now I'd also be open to merge PRs that add providers in some examples/ folder.

Biont avatar Jun 06 '23 13:06 Biont