diff --git a/cinnamon-timer@jake1164/README.md b/cinnamon-timer@jake1164/README.md index 6c81a39a83e..a95899e7048 100644 --- a/cinnamon-timer@jake1164/README.md +++ b/cinnamon-timer@jake1164/README.md @@ -6,7 +6,17 @@ All settings can be changed by right clicking on the icon and selecting configur ## Installing -0) Add sox play if you want sound capability: sudo apt-get install sox +0) If you want sound capability: + + * Add sox play: `sudo apt-get install sox` + +or + + * Add ffmpeg ffplay: `sudo apt-get install ffmpeg` + +or + + * Add mplayer: `sudo apt-get install mplayer` 1) Extract to ~/.local/share/cinnamon/applets diff --git a/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/6.4/applet.js b/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/6.4/applet.js index 9edf66c2335..a1e7182a468 100644 --- a/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/6.4/applet.js +++ b/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/6.4/applet.js @@ -394,7 +394,16 @@ class MyApplet extends Applet.TextIconApplet { } if (this.SoundPromptOn) { try { - Util.spawnCommandLine("play -v " + this.SoundVolume/100 + " " + this.SoundPath); + if (Gio.get_commandline("play") != null) + Util.spawnCommandLine("play -v " + this.SoundVolume/100 + " " + this.SoundPath); + else if (Gio.get_commandline("ffplay") != null) + Util.spawnCommandLine("ffplay -nodisp -nostats -hide_banner -volume " + this.SoundVolume + " " + this.SoundPath + " &"); + else if (Gio.get_commandline("mplayer") != null) + Util.spawnCommandLine("mplayer -really-quiet -novideo -volume " + this.SoundVolume + " " + this.SoundPath + " &>/dev/null"); + else { + global.logError("Unable to play sound. Please install sox, or ffmpeg, or mplayer package."); + Util.spawnCommandLine(`notify-send "Unable to play sound." "Please install sox, or ffmpeg, or mplayer package."`); + } } catch (e) { // spawnCommandLine does not actually throw exception when a sound fails to play @@ -494,7 +503,7 @@ class ConfirmDialog extends ModalDialog.ModalDialog { let label = new St.Label({ text: message, style_class: "timer-dialog-label" }); this.contentLayout.add_child(label); - + this.setButtons([ { label: _("Okay"), diff --git a/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/metadata.json b/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/metadata.json index a1f5a931a91..aa62829bb7c 100644 --- a/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/metadata.json +++ b/cinnamon-timer@jake1164/files/cinnamon-timer@jake1164/metadata.json @@ -1,6 +1,6 @@ { "uuid": "cinnamon-timer@jake1164", - "version": "1.3.2", + "version": "1.3.3", "name": "Timer with notifications", "description": "A timer app with visual and auditory notifications.", "website": "https://cinnamon-spices.linuxmint.com/applets/view/302",