#!/bin/sh main() { case "$1" in "--spmenu-set-profile") if [ -x "$(command -v spmenuify)" ]; then pgrep -x spmenu > /dev/null && pkill -x spmenu spmenuify && exit 0 exit 1 fi exit 1 ;; *) printf "You're supposed to run this through spmenu.\n" && exit 1 ;; esac } main "$@"