#!/bin/sh # If transmission-daemon is running, will ask to kill, else will ask to start. if pidof transmission-daemon >/dev/null ; then [ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da else [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon fi sleep 3