|
|
@ -19,6 +19,9 @@ if [ -f "$PID_FILE" ]; then |
|
|
|
rm "$PID_FILE" |
|
|
|
rm "$PID_FILE" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Give a grace period for all processes to terminate gracefully |
|
|
|
|
|
|
|
sleep 1 |
|
|
|
|
|
|
|
|
|
|
|
# PID of this script |
|
|
|
# PID of this script |
|
|
|
printf "%s\n" "$$" >> "$PID_FILE" |
|
|
|
printf "%s\n" "$$" >> "$PID_FILE" |
|
|
|
|
|
|
|
|
|
|
@ -31,7 +34,7 @@ acejuice_monitors() { |
|
|
|
if ! mkfifo "$NPIPE_OUT" 2> /dev/null; then |
|
|
|
if ! mkfifo "$NPIPE_OUT" 2> /dev/null; then |
|
|
|
printf "fifo '%s' already present\n" "$NPIPE_OUT" >&2 |
|
|
|
printf "fifo '%s' already present\n" "$NPIPE_OUT" >&2 |
|
|
|
fi |
|
|
|
fi |
|
|
|
echo |
|
|
|
|
|
|
|
if command -v xrandr > /dev/null; then |
|
|
|
if command -v xrandr > /dev/null; then |
|
|
|
__monitor_list="" |
|
|
|
__monitor_list="" |
|
|
|
OLDIFS="$IFS" |
|
|
|
OLDIFS="$IFS" |
|
|
@ -48,22 +51,23 @@ acejuice_monitors() { |
|
|
|
esac |
|
|
|
esac |
|
|
|
done |
|
|
|
done |
|
|
|
IFS="$OLDIFS" |
|
|
|
IFS="$OLDIFS" |
|
|
|
echo "yaaa" |
|
|
|
# Remove space character prefix in the list |
|
|
|
if [ -z "$__monitor_list" ]; then |
|
|
|
__monitor_list="${__monitor_list# }" |
|
|
|
|
|
|
|
if [ -n "$__monitor_list" ]; then |
|
|
|
printf ":MON LIST %s\n" "$__monitor_list" > "$NPIPE_OUT" |
|
|
|
printf ":MON LIST %s\n" "$__monitor_list" > "$NPIPE_OUT" |
|
|
|
fi |
|
|
|
fi |
|
|
|
unset __monitors_list |
|
|
|
unset __monitor_list |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
acejuice_monitors & |
|
|
|
acejuice_monitors & |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
|
|
|
|
|
|
|
|
acejuice-pulse --socket --newline & |
|
|
|
audio-pulse --subscribe | acejuice-pulse --socket --newline --icon ascii --icon-mute --no-value & |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
|
|
|
|
|
|
|
|
acejuice-interval --socket & |
|
|
|
acejuice-interval --socket & |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
|
|
|
|
|
|
|
|
acejuice | /usr/bin/lemonbar -p |
|
|
|
acejuice | /usr/bin/lemonbar -p & |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|
printf "%s\n" "$!" >> "$PID_FILE" |
|
|
|