Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- case $ROFI_RETV in
- 0 ) # Initial call of script
- echo -en "Google Maps\n"
- echo -en "Arch Wiki\n"
- ;;
- 1 ) # Selected an entry
- if [ "$1" = "Google Maps" ]; then
- echo -en "\x00data\x1fmaps\n"
- echo -en "\x00prompt\x1fGoogle Maps\n"
- echo -en " \0nonselectable\x1ftrue\n"
- elif [ "$1" = "Arch Wiki" ]; then
- echo -en "\x00data\x1farchwiki\n"
- echo -en "\x00prompt\x1fGoogle Maps\n"
- echo -en " \0nonselectable\x1ftrue\n"
- fi
- ;;
- 2 ) # Selected a custom entry
- if [ "$ROFI_DATA" = "maps" ]; then
- coproc ( xdg-open "https://www.google.com/maps/search/${1// /\+}" > /dev/null 2>1 )
- elif [ "$ROFI_DATA" = "archwiki" ]; then
- coproc ( xdg-open "https://wiki.archlinux.org/index.php?search=${1// /\+}" > /dev/null 2>1 )
- fi
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement