diff options
Diffstat (limited to 'cycle_pa_sinks')
-rwxr-xr-x | cycle_pa_sinks | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cycle_pa_sinks b/cycle_pa_sinks index 63c8a48..c9e8d31 100755 --- a/cycle_pa_sinks +++ b/cycle_pa_sinks @@ -10,5 +10,10 @@ new_sink=$(pacmd list-sinks | awk '/index/{print; i=1} i&&/device.product.name/{ new_sink_idx=$(echo "$new_sink" | head -n1 | cut -c12-) new_sink_name=$(echo "$new_sink" | tail -n1 | cut -f2 -d'"') -echo "Setting default sink to: #$new_sink_idx ($new_sink_name)"; +msg="Setting default sink to: #$new_sink_idx ($new_sink_name)" +if [ -t 0 ]; then + echo "$msg" +else + notify-send -u low -t 2000 "$msg" +fi pacmd set-default-sink $new_sink_idx |