You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -259,33 +271,42 @@ if ! command -v less &>/dev/null; then
259
271
echo"[4mDEPENDS[0m: Command 'less' not found, arttime will default to 'more'.\n Though installing 'less' is recommended for better experience."
260
272
fi
261
273
262
-
if [[ $machine=~ ^.*(Linux|BSD).*$ ]];then
263
-
if!command -v notify-send &>/dev/null;then
264
-
echo"[4mDEPENDS[0m: If you want desktop notifications, you need notify-send."
265
-
fi
266
-
ifcommand -v paplay &>/dev/null;then
267
-
if pulseaudio --check &>/dev/null;then
268
-
pulserunning="1"
269
-
else
270
-
pulserunning="0"
274
+
case"${machine}"in
275
+
"Linux"|"BSD")
276
+
if!command -v notify-send &>/dev/null;then
277
+
echo"[4mDEPENDS[0m: If you want desktop notifications, you need notify-send."
271
278
fi
272
-
fi
273
-
ifcommand -v pw-play&>/dev/null;then
274
-
if {pactl info 2>/dev/null | grep "Server Name"2>/dev/null | grep "PipeWire"&>/dev/null};then
275
-
piperunning="1"
276
-
else
277
-
piperunning="0"
279
+
ifcommand -v paplay &>/dev/null;then
280
+
ifpulseaudio --check&>/dev/null;then
281
+
pulserunning="1"
282
+
else
283
+
pulserunning="0"
284
+
fi
278
285
fi
279
-
fi
280
-
ifcommand -v ogg123 &>/dev/null;then
281
-
vorbisinstalled="1"
282
-
fi
283
-
if [[ $pulserunning!="1"&&$piperunning!="1"&&$vorbisinstalled!="1" ]];then
284
-
echo"[4mDEPENDS[0m: If you want desktop sounds, you need one of: 1) pulseaudio daemon\n running, or 2) pipewire daemon running, or 3) vorbis-tools."
285
-
fi
286
-
elif [[ $machine=~ ^Darwin.*$ ]];then
287
-
echo"[4mNote[0m: Notification settings on macOS are not fully in control of an application.\n To check if you have desired notification settings, open following link.\n https://github.com/poetaman/arttime/issues/11"
288
-
fi
286
+
ifcommand -v pw-play &>/dev/null;then
287
+
if {pactl info 2>/dev/null | grep "Server Name"2>/dev/null | grep "PipeWire"&>/dev/null};then
288
+
piperunning="1"
289
+
else
290
+
piperunning="0"
291
+
fi
292
+
fi
293
+
ifcommand -v ogg123 &>/dev/null;then
294
+
vorbisinstalled="1"
295
+
fi
296
+
if [[ $pulserunning!="1"&&$piperunning!="1"&&$vorbisinstalled!="1" ]];then
297
+
echo"[4mDEPENDS[0m: If you want desktop sounds, you need one of: 1) pulseaudio daemon\n running, or 2) pipewire daemon running, or 3) vorbis-tools."
298
+
fi
299
+
;;
300
+
"Darwin")
301
+
echo"[4mNote[0m: Notification settings on macOS are not fully in control of an application.\n To check if you have desired notification settings, open following link.\n https://github.com/poetaman/arttime/issues/11"
0 commit comments