Biont / sway-launcher-desktop

TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
GNU General Public License v3.0
606 stars 28 forks source link

Suggestion: Sharing of providers #75

Open mapster opened 1 year ago

mapster commented 1 year ago

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
Biont commented 1 year ago

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.