#!/bin/sh # Media player menu with rofi if [ -z "${ROFI_OUTSIDE}" ]; then export mediaplayer=$1 export Mediaplayer=$(echo $1 | sed -E 's/(.)/\U\1/') exec rofi -no-lazy-grab -show-icons -no-custom -modi m:$0 -show m \ -kb-select-1 Super+z \ -kb-select-2 Super+x \ -kb-select-3 Super+c \ -kb-select-4 Super+v \ -kb-select-5 Super+b \ -kb-select-6 Super+m \ -kb-select-7 Super+s fi case $ROFI_RETV in 0) # Prompt printf "\00prompt\037media player\n" printf "\00message\037$...\n" # Available actions i=0 while read icon description do i=$((i+1)) printf "$description\00icon\037$icon\037info\037$i\n" done <&2 ;; esac