You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
xmonad/action-manager/start.sh

36 lines
685 B

#!/bin/bash
ARGS="$@"
while [[ -n "$@" ]]; do
if [[ "${1:0:1}" != "-" ]]; then
if [[ -z "$volumepipe" ]]; then
volumepipe="$1"
elif [[ -z "$commandpipe" ]]; then
commandpipe="$1"
fi
fi
shift;
done
# volumepipe
if ! [[ -p "$volumepipe" ]]; then
rm -rf "$volumepipe"
mkfifo "$volumepipe"
fi
# volumecontrol
if [[ -p "$commandpipe" ]]; then
$(echo "q" > $commandpipe)&
quit_proc=$!
sleep 1
kill $quit_proc
rm "$commandpipe"
else
rm -f "$commandpipe"
fi
mkfifo "$commandpipe"
$(sleep 1; echo "refresh" > $commandpipe)&
eval set -- "$ARGS"
exec "$(dirname "${BASH_SOURCE[0]}")/daemon.py" "$@"