From 4115a1c8e91f14bfad95e4fa3d3748e773c07343 Mon Sep 17 00:00:00 2001 From: graysky Date: Thu, 12 Sep 2019 15:17:53 -0400 Subject: [PATCH] fix version check --- MIT | 2 +- Makefile | 2 +- common/pulseaudio-ctl.in | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/MIT b/MIT index a725ff7..a186608 100644 --- a/MIT +++ b/MIT @@ -1,4 +1,4 @@ -Copyright (c) 2013-2017 graysky +Copyright (c) 2013-2019 graysky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/Makefile b/Makefile index 65b2421..fd9bc56 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 1.66 +VERSION = 1.67 PN = pulseaudio-ctl PREFIX ?= /usr diff --git a/common/pulseaudio-ctl.in b/common/pulseaudio-ctl.in index 487d357..030055d 100644 --- a/common/pulseaudio-ctl.in +++ b/common/pulseaudio-ctl.in @@ -36,7 +36,7 @@ exit 1; } # really crude pactl version check since commands are different for different # versions of pactl. sorry users of PA <5 -PAVERSION=$(pactl --version | grep pactl | pactl --version | grep pactl | sed -e 's/^pactl //' -e 's/\([0-9.]\+\).*/\1/') +PAVERSION=$(pactl --version | grep pactl | sed -e 's/^pactl //' -e 's/\([0-9.]\+\).\([0-9.]\+\)$/\1/') if [[ ${PAVERSION%%.*} -lt 5 ]]; then # really old versions PCV=0 @@ -305,7 +305,7 @@ case "$1" in *) # send to notify-send if enabled [[ $USEN -eq 1 ]] && - notify-send -a pulseaudio-ctl -t 8000 --hint=int:transient:1 "Pulseaudio Settings" "Volume level : $CURVOL %\nIs sink muted : $MUTED\nIs source muted : $SOURCE_MUTED\nDetected sink : $SINK\nDetected source : $SOURCE\nPulse version : $PAVERSION" --icon=multimedia-volume-control + notify-send -a pulseaudio-ctl -t 8000 --hint=int:transient:1 "Pulseaudio Settings" "Volume level : $CURVOL %\nIs sink muted : $MUTED\nIs source muted : $SOURCE_MUTED\nDetected sink : $SINK\nDetected source : $SOURCE" --icon=multimedia-volume-control # add pretty colors for mute status for CLI only [[ "$MUTED" = "yes" ]] && MUTED="${NRM}${RED}$MUTED${NRM}" || MUTED="${NRM}${GRN}$MUTED${NRM}" @@ -331,7 +331,6 @@ case "$1" in echo -e " ${BLD}Is source muted : $SOURCE_MUTED" echo -e " ${BLD}Detected sink : ${NRM}${BLU}$SINK${NRM}" echo -e " ${BLD}Detected source : ${NRM}${BLU}$SOURCE${NRM}" - echo -e " ${BLD}Pulse version : ${NRM}${BLU}$PAVERSION${NRM}" ;; esac